Apache/PHP with various db

Apache/PHP with various db

Post by Lucie » Fri, 15 Dec 2000 22:37:01



Hi, I am operating a web server with various vhosts.
Some use php/mysql, some plain html.
For performance reasons I decided to built apache with php (built with
mysql)
But now, I have to put online a site using PHP/Oracle.
If I compile a new apache/php with mysql AND oracle I'm afraid to get
something big that will be used only for one site.
I was wondering : is there a way to tell apache to load modules only when
needed (something like putting AddModule/LoadModules directives in
<Virtualhost>) or any solution to avoid to launch a big process including
php and all its lib just for a simple html page.

Maybe someone had this type of problem and found a clever way to handle it.

Thank you for your answers

Lucien

 
 
 

Apache/PHP with various db

Post by smarl.. » Sat, 16 Dec 2000 00:39:40




Quote:> Hi, I am operating a web server with various vhosts.
> Some use php/mysql, some plain html.
> For performance reasons I decided to built apache with php (built with
> mysql)
> But now, I have to put online a site using PHP/Oracle.
> If I compile a new apache/php with mysql AND oracle I'm afraid to get
> something big that will be used only for one site.

Actually, this isn't a big problem.  But if you want to change which
modules get loaded into php, you need to edit the php.ini file, not the
apache httpd.conf file, since the oracle/postgres/mysql/db2 etc. modules
are loaded into libphp.so by direction from php.ini.

In terms of executable size, you're only talking a few hundred k at most
to add a module for another database (usually less than that.) while php
4s optimizations use about 4 to 10 times the memory of the size of your
scripts, plus a fair bit of storage for all the data your script is
manupulating.

Sent via Deja.com
http://www.deja.com/

 
 
 

Apache/PHP with various db

Post by Miguel Cru » Sat, 16 Dec 2000 12:16:22



> For performance reasons I decided to built apache with php (built with
> mysql) But now, I have to put online a site using PHP/Oracle. If I compile
> a new apache/php with mysql AND oracle I'm afraid to get something big
> that will be used only for one site. I was wondering : is there a way to
> tell apache to load modules only when needed (something like putting
> AddModule/LoadModules directives in <Virtualhost>) or any solution to
> avoid to launch a big process including php and all its lib just for a
> simple html page.

Don't worry that much about the size of the executable; it's not as if there
are actually separate RAM copies of it.

I think you'll find that any solution involving selectively making various
database drivers available will actually be more resource-intensive. Just go
ahead and build MySQL and Oracle into it.

miguel

 
 
 

1. Apache w/ PHP and SSL: w/ PHP OK - w/out PHP NOK

Hi,

        I've been assigned the task of building an Apache server with
support for Sybase, PHP4, OpenSSL 0.9.6/mod_ssl ?, and apache 1.3.14.

I followed Israel Denis Jr/Eugene Otto's "The Soothingly Seamless
Setup of Apache, SSL, MySQL, and PHP" at DevShed, but compilation of
apache fails if I add PHP.  The same procedure w/out PHP works OK
(either port 80 or port 443.) As a non-developper, I'm totally in the
dark.

[/home/samba/temp/Apache/apache_1.3.14]# SSL_BASE=../openssl-0.9.6
/configure --enable-module=ssl
--activate-module=src/modules/php4/libphp4.a --enable-module=php4
--prefix=/usr/local/apache

Configuring for Apache, Version 1.3.14
(snip)
-L/home/samba/temp/Apache/openssl-0.9.6  -o helpers/dummy
helpers/dummy.c   -rdynamic -Lmodules/php4 -L../modules/php4
-L../../modules/php4 -lmodphp4  -lpam  -ldl -lresolv -lm -ldl -lcrypt
-lnsl  -lresolv   -lm -lcrypt  -lssl -lcrypto
/usr/bin/ld: cannot find -lmodphp4
collect2: ld returned 1 exit status
make: *** [dummy] Error 1

Any idea?

Thx
FF.

2. resolv.conf question

3. Apache & PHP: DB connection pooling question

4. Need help with "execl()" in a CGI program

5. Max partition and file sizes in various OSs/DB devel envs

6. Realtime MPEG encoder

7. Apache Rewrite domain.com->index.php domain.org->index2.php

8. Moving /var to new partition

9. Solaris - PHP- Apache- Oracle : Problem getting PHP installed

10. install db before installing php? 3 questions

11. Where can I get an extention to connect from php to PostgeSQL DB on Unix?

12. PHP on Linux: connection to an Oracle DB ?

13. Berkley DB, mod_auth_db and PHP Puzzle.