phptest-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phptest-users] Login changes


From: TW
Subject: Re: [Phptest-users] Login changes
Date: Mon, 17 Feb 2003 21:11:19 -0700

Hi Everyone,

Ok, first off let me say I'm sorry for taking so long in getting this out,
but here it is. This is the logon scripts I personally use to feed people to
different sites and different databases. There are lots of changes you will
need to make, both to databases and scripts themselves. This is a copy of my
development website and as such is prone to incorrect or sloppy scripting.
It may or may not work and is provided as sample scripts only to give you
ideas.....

Standard disclaimer:
 The modifications listed here for PhpTest work for me, I take no
responsibility for anything that happens to you or your computer if you
attempt to use them. There is no support for these modifications other than
posting to this mailing list and even then I do not promise to respond. Use
these code samples at your own risk.

This is Part 1, I've done this in a rather odd way so some of it may not be
straight forward for some people. This is done with the assumption that you
know PHP scripting and what to do with it and how to fix it if it doesn't
work for you.

--------------------------

Alright let's start with the basics, I have the following directories set up
under my WWWRoot folder:

WWWRoot
        |
        |
        -- Site 1
        |
        |
        -- Site 2

Basically WWWROOT contains a default installation of PhpTest but with 90% of
the files missing, the only files there are is the basic login and include
scripts (of course these files are all modified):

/index.php
/login.php
/include/config.inc.php
/include/cuser.inc.php
/include/footer.inc.php
/include/functions.inc.php
/include/h.inc.php
/include/header.inc.php
/include/mysql.inc.php
/include/not_logged_in.inc.php

You will find these files at http://www.technowizards.net/phptest/mods_1.zip

Next is to create the website sub directories for each different site you
want to host. In this case we create Site 1, Site 2. so this will give us
the address of http://www.yoursite.com/site_1/ and
http://www.yoursite.com/site_2/ or whatever you want to call them. Each site
having a customized PhpTest.

Next is to create the databases and the additional tables and fields needed
to use the modified files. There is a mainlogin.sql and setup.sql file you
can use to add new databases to mySQL included in the mods_1.zip file, just
create new databases (one for the main login and one for the actual site)
and import the mySQL files and it will create the necessary tables/fields
for you.

After that is done install Phptest 0.6.3 as usual in the Site 1 and Site 2
folders. Each site should have it's own database and don't forget to modify
the config.inc.php file for each site. I've gone through and adjusted the
'cUser' session  and created a 'User2' for the sake of simplicity and
debugging in the Site 1 and Site 2 folders in my version.

So hopefully what you end up with is a main page that asks for company,
username and password. The script verifies the existence of the the company
in the main login database and then passes the username and password to the
login.php of that companies directory, and away you go.

Cheers!

TW





reply via email to

[Prev in Thread] Current Thread [Next in Thread]