Date: 07/17/00
- Next message: mark jatana: "[phplib] Warning: Variable passed to reset()"
- Previous message: toby cabot: "Re: [phplib] Template block nesting"
- Maybe in reply to: francis: "[phplib] HELP: multiple phplib on the same server"
- Next in thread: fbouchard: "Re: [phplib] SOLVED HELP: multiple phplib on the same server"
- Reply: fbouchard: "Re: [phplib] SOLVED HELP: multiple phplib on the same server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hope this helps, this is how I setup phplib includes for my intranet site (have full access to the server, using RedHat 6.2, Apache, MySQL, php3 as a module):
I have other applications running that don't use PHPLIB (just haven't converted them) and a number of different applications.
What I did was include the following in the httpd.conf file for each area/application for the website:
<Directory /home/httpd/html/testarea/projects> // adjust as approp.
php3_magic_quotes_gpc on
php3_magic_quotes_runtime off
php3_magic_quotes_sybase off
php3_track_vars on
php3_auto_prepend_file /home/httpd/php/prepend.php3
php3_include_path /home/httpd/wplib:/home/httpd/php //adjust as approp.
</Directory>
Change the directory to wherever you want to put your files for your application and auto_prepend_file to where ever you have installed the library. With the include path I have folders under the document root for each application - any files that override the standard phplib files go in here e.g. local.inc with database name and password, specific functions for the application etc.
The benefit of this is that you can have a number of different applications running with PHPLIB and using different databases.
You can also do this with the .htaccess files but you will need to see the documentation on how to do this.
(Covered in the manual near the end of Chapter 2)
David Nind
>>> francis <fbouchard <email protected>> 17/07/00 >>>
I agree with you guys for keeping all thedata in the same database, but since
our database is already very complex (support multilanguage descriptiors ...)
and our product are pretty different, that the database neesds and web pages
are pretty different, we accepted the cost of doing the support of different
databases.
I understand now the prepend that i will do in my pages instead of the
auto_prepend. Thanks a lot.
but: I am still confused with php3.ini. Two points:
1- How should i set the include path. What I guess is that i will put all my
phplib directory. This yaw php will be able to find all what it needs (I still
have a doubt though that this parameter is not used ?)
2- In the prepend file there is a variable _PHPBLIB["libdir"], Will this
variable be set properly ? (maybe by point one). In this case, how php will
know which path to choose ?
Thanks for all
Manish Namdeo a *crit :
> Doing it the way you are suggesting is really a bad rogramming since product
> is an entoity & just because it is a different product, it should not go
> to a different database.
>
> But in any case -
> this is how you will do it.
>
> 1) /-Products/Product1
> /-Products/Product1/libs/php (PHPLIB) -Just Change the local.inc here
> 2) /-Products/Product2
> /-Products/Product2/libs/php (PHPLIB) -Just Change the local.inc here
>
> Your pages can access phplib & other functionality like this
>
> include('libs/php/prepend.inc');
>
> This way the maintenance will be low & you will be able to replicate changes
> with minimum effort.
> You can even think of building some logic in the process.
>
> Manish
>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: mark jatana: "[phplib] Warning: Variable passed to reset()"
- Previous message: toby cabot: "Re: [phplib] Template block nesting"
- Maybe in reply to: francis: "[phplib] HELP: multiple phplib on the same server"
- Next in thread: fbouchard: "Re: [phplib] SOLVED HELP: multiple phplib on the same server"
- Reply: fbouchard: "Re: [phplib] SOLVED HELP: multiple phplib on the same server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

