This step-by-step guide explains how to set up PHP in the standalone mode.
- Log into the target (e.g. web) server as root.
- Download PHP sources (any), extract the archive, and enter the directory.
- Compile and install standalone PHP:
./configure --prefix=/hsphere/shared/apache/php \
--localstatedir=/var/hsphere/php && make && make install
You can add other options, too.
- Add the following lines to /hsphere/local/config/httpd/httpd.conf :
AddType application/x-httpd-php-external .php4 .phpext
Action application/x-httpd-php-external "/php/bin/php"
#.php4, .phpext - extensions for scripts executed with external php as a user
ScriptAlias /php/bin/ /hsphere/shared/apache/php/bin/
- Execute apache config test and ensure there are no errors in the config file:
- Restart apache: