Kijk... Dit is hoe ik dus altijd begrepen heb dat je apache moet compileren met PHP...
MAAR: Dan krijg je dus een .so module voor PHP... Wat ik nu gelezen heb is dat je PHP ook IN de binary van HTTPD kunt compileren zodat apache, wanneer een php iets wordt opgeroepen, niet de module hoeft te laden maar het DIRECT kan verwerken... De binary is dan wel iets groter, maar omdat je veel PHP gebruikt en dit nu ingebouwd zit is het ook SNELLER omdat ie niet steeds die module hoeft aan te spreken...
Mijn vraag is nu, HOE DOE JE DAT??
En daarbij... Hoe can in andere .c files (ook modules die je normaal met apxs erbij zet) ER-IN compileren?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| $ gunzip -c apache_1.3.x.tar.gz | tar xf - $ cd apache_1.3.x $ ./configure $ cd .. $ gunzip -c php-4.1.x.tar.gz | tar xf - $ cd php-4.1.x $ ./configure ./configure --prefix=/usr --with-mysql --with-apache=../apache_1.3.x --with-gd --with-gettext=/usr --enable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/lib --with-db3 --with-interbase=shared --with-pgsql=shared --with-ldap --with-imap --with-curl=shared --with-pdflib=shared --with-apache=../apache_1.3.x $ make $ make install $ cd ../apache_1.3.x $ ./configure --prefix=/etc --activate-module=src/modules/php4/libphp4.a (The above line is correct! Yes, we know libphp4.a does not exist at this stage. It isn't supposed to. It will be created.) $ make (you should now have an httpd binary which you can copy to your Apache bin dir if is is your first install then you need to "make install" as well) $ cd ../php-4.1.x $ cp php.ini-dist /usr/local/lib/php.ini You can edit /usr/local/lib/php.ini file to set PHP options. Edit your httpd.conf or srm.conf file and add: AddType application/x-httpd-php .php |
MAAR: Dan krijg je dus een .so module voor PHP... Wat ik nu gelezen heb is dat je PHP ook IN de binary van HTTPD kunt compileren zodat apache, wanneer een php iets wordt opgeroepen, niet de module hoeft te laden maar het DIRECT kan verwerken... De binary is dan wel iets groter, maar omdat je veel PHP gebruikt en dit nu ingebouwd zit is het ook SNELLER omdat ie niet steeds die module hoeft aan te spreken...
Mijn vraag is nu, HOE DOE JE DAT??
En daarbij... Hoe can in andere .c files (ook modules die je normaal met apxs erbij zet) ER-IN compileren?