|
Standalone PHP Installation in HSphere |
|
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
--with-zlib-dir
--with-jpeg-dir
--with-png-dir
--with-gd
--with-mysql=/usr
--with-gettext
--disable-debug
--enable-versioning
--enable-sockets
--enable-track-vars
--with-pgsql=/usr
--enable-ftp
--enable-inline-optimization
--localstatedir=/var/hsphere/php && make && make installYou can add other options, too. Notes:
- 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
<Directory /hsphere/shared/apache/php/bin>
Options +ExecCGI
</Directory>
ScriptAlias /php/bin/ /hsphere/shared/apache/php/bin/ - Execute apache config test and ensure there are no errors in the config file:
/hsphere/shared/apache/bin/apachectl configtest - Restart apache:
/hsphere/shared/apache/bin/apachectl stop /hsphere/shared/apache/bin/apachectl start
|