From: spiggy <th...@me...> - 2002-05-19 08:11:43
|
i was asking about this a while back and since my old boss asked again... i thought id give it a try. and it looks like i have the darn thing running :) to remind you of the problem: 30 different student clubs that want a website. having a set of files for all would be a bit tiresome to upgrade so requirement is one shared set of files and one database per site. anyone available to test this? it was so easy in the end that i am thinking i must have missed something big. this is how i did it: 1. register_globals=on 2. create a directory configs and place the sites config.php files there, in my case i am using club1_config.php, club2_config.php, club3_config.php (i am including the examples i used). create databases for every site 3. add include('open_session.php') to header.php 4. replace config.php with my version (a short one) 5. goto http://yoursite/?cl=club1, http://yoursite/?cl=club2 and http://yoursite/?cl=club3 and do a fresh install for all. login as admin and change the theme so it is different for every site. if you run into issues, chances are that open_session is not included in that file. i have not thought about user logins etc.. since it is not that important for this project. installing modules produces some errors for not being able to include open_session but the modules still install fine. of course i could set the full path for open_session.php and this issue would be gone. i have tested this with mozilla/linux/php4.2 only and all browser reports are welcome :) the session stuff is not 100% clear to me so any ideas for config.php are also very welcome. for instance how to make sure if someone types a name that does not exist, the user goes to clubs.php file. i tried several versions but nothing produced the desired effect (i am a session dummie :) my demo site is at http://demo.phpgirl.com/clubs.php (very crude :). i am keeping this page outside phpwebsite so it fits with the rest of the main school site and to keep a list of links to all the clubs. thats it, i am done for today (well, it is 3am :) paivi |