PHP
Revision as of 10:17, 5 May 2007 by Aquila deus (talk | contribs) (New page: === Server setup === ==== Zend Core + Apache ==== * Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=10577 mod_fcgid], a FastCGI module for apache (the official one sucks). *...)
Server setup
Zend Core + Apache
- Install mod_fcgid, a FastCGI module for apache (the official one sucks).
- Install Zend Core (official php distribution)
- Uninstall arch linux's php package.
- Download and install zend core from http://www.zend.com/products/zend_core ; don't install the bundle apache or tell it to setup your web server. It always installs to /usr/local/Zend/Core due to hard-coded path.
- Create a script /usr/local/bin/zendcore and create symlinks to php, php-cgi, pear, phpize under /usr/local/bin
#!/bin/bash
export LD_LIBRARY_PATH="/usr/local/Zend/Core/lib"
exec /usr/local/Zend/Core/bin/`basename $0` "$@"
- Setup Apache:
- In /etc/httpd/conf/httpd.conf, add
LoadModule fcgid_module lib/apache/mod_fcgid.so
AddHandler fcgid-script .php
FCGIWrapper /usr/local/bin/php-cgi .php
SocketPath /tmp/fcgidsock
SharememPath /tmp/fcgidshm
- In /etc/httpd/conf/httpd.conf, add
- Disable Zend Optimizer (so you can use cache):
- Edit /etc/php.ini, uncomment the following line near the end of file:
zend_extension_manager.optimizer="/usr/local/Zend/Core/lib/zend/optimizer"
- Edit /etc/php.ini, uncomment the following line near the end of file:
- Install APC (Alternative PHP Cache):
- Run pear install pecl.php.net/apc as superuser.
- Edit /etc/php.ini, add the line after "; Zend Core extensions..." (line 1205):
extension=apc.so