Most recent edit on 2008-05-26 20:37:56 by AsoBJ
Additions:
wget http://us2.php.net/distributions/php-5.2.6.tar.bz2∞
tar xjf php-5.2.6.tar.bz2
cd php-5.2.6%%
Deletions:
wget http://us2.php.net/distributions/php-5.2.3.tar.bz2∞
tar xjf php-5.2.3.tar.bz2
cd php-5.2.3%%
Edited on 2007-09-11 15:50:12 by AndrewBoring
Additions:
%%make && make install
Deletions:
%%make -j 2 && make install
Edited on 2007-08-09 12:26:45 by TimDorr
Additions:
wget http://us2.php.net/distributions/php-5.2.3.tar.bz2∞
tar xjf php-5.2.3.tar.bz2
cd php-5.2.3
cp -a sapi/cgi/php-cgi /usr/local/php5-fcgi/bin/php
==Create the FastCGI dispatcher:==
cat
EOT > /usr/local/cpanel/cgi-sys/php5.fcgi
#!/bin/sh
PHP_FCGI_CHILDREN=0
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=100
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/php5-fcgi/bin/php
EOT
chown root:wheel /usr/local/cpanel/cgi-sys/php5.fcgi
chmod 755 /usr/local/cpanel/cgi-sys/php5.fcgi
sed -i "s/
AddType application\/x-httpd-php .phtml/
AddType application\/x-httpd-php .phtml\nAction application\/x-httpd-php5 \/php5.fcgi\nAddType application\/x-httpd-php5 .php5/" /usr/local/apache/conf/httpd.conf
Deletions:
wget http://us2.php.net/distributions/php-5.2.0.tar.bz2∞
tar xjf php-5.2.0.tar.bz2
cd php-5.2.0
sed -i "s/AddType application\/x-httpd-php .phtml/AddType application\/x-httpd-php .phtml\nAction application\/x-httpd-php5 \/php5.fcgi\nAddType application\/x-httpd-php5 .php5/" /usr/local/apache/conf/httpd.conf%%
Edited on 2007-08-08 10:41:38 by AndrewBoring
Additions:
./configure --prefix=/usr/local/php5-fcgi --with-libdir=lib64 --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-ftp --enable-memory-limit --with-mysqli --with-mysql=/usr --with-zlib --enable-sockets --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --enable-gd-native-ttf --with-pdo-mysql=/usr --enable-bcmath
Deletions:
./configure --prefix=/usr/local/php5-fcgi --with-libdir=lib64 --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-ftp --enable-memory-limit --with-mysqli --with-mysql=/usr --with-zlib --enable-sockets --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr \
--with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --enable-gd-native-ttf --with-pdo-mysql=/usr --enable-bcmath
Edited on 2007-08-08 10:41:11 by AndrewBoring
Additions:
Configure and compile
Back to Main
Deletions:
Edited on 2007-08-08 10:40:59 by AndrewBoring
Additions:
Get php source and supporting libs
Configure and compile
./configure --prefix=/usr/local/php5-fcgi --with-libdir=lib64 --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-ftp --enable-memory-limit --with-mysqli --with-mysql=/usr --with-zlib --enable-sockets --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr \
--with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --enable-gd-native-ttf --with-pdo-mysql=/usr --enable-bcmath
Individual:
Add to Apache:
sed -i "s/AddType application\/x-httpd-php .phtml/AddType application\/x-httpd-php .phtml\nAction application\/x-httpd-php5 \/php5.fcgi\nAddType application\/x-httpd-php5 .php5/" /usr/local/apache/conf/httpd.conf
Deletions:
./configure --prefix=/usr/local/php5-fcgi --with-libdir=lib64 --enable-fastcgi --enable-discard-path \
--enable-force-cgi-redirect --enable-ftp --enable-memory-limit --with-mysqli --with-mysql=/usr \
--with-zlib --enable-sockets --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr \
--with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --enable-gd-native-ttf \
--with-pdo-mysql=/usr --enable-bcmath
Add to Apache:
%%sed -i "s/AddType application\/x-httpd-php .phtml/AddType application\/x-httpd-php .phtml\nAction application\/x-httpd-php5 \/php5.fcgi\nAddType application\/x-httpd-php5 .php5/" /usr/local/apache/conf/httpd.conf
Oldest known version of this page was edited on 2007-08-08 10:39:37 by AndrewBoring []
Page view:
Adding php5 as a FastCGI on your VPS
If you need to run php4 as an Apache module, but want to run php5 (like ASO uses on the shared servers), here are cut'n'paste instructions for compiling php5 and adding it to Apache as a
FastCGI:
Each of these lines needs to be run individually:
yum install -y libxml2-devel
cd /usr/local/src
wget http://us2.php.net/distributions/php-5.2.0.tar.bz2
tar xjf php-5.2.0.tar.bz2
cd php-5.2.0
This is all one line:
./configure --prefix=/usr/local/php5-fcgi --with-libdir=lib64 --enable-fastcgi --enable-discard-path \
--enable-force-cgi-redirect --enable-ftp --enable-memory-limit --with-mysqli --with-mysql=/usr \
--with-zlib --enable-sockets --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr \
--with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --enable-gd-native-ttf \
--with-pdo-mysql=/usr --enable-bcmath
make -j 2 && make install
cp php.ini-dist /usr/local/php5-fcgi/lib/php.ini
Add to Apache:
This should be all one line
sed -i "s/AddType application\/x-httpd-php .phtml/AddType application\/x-httpd-php .phtml\nAction application\/x-httpd-php5 \/php5.fcgi\nAddType application\/x-httpd-php5 .php5/" /usr/local/apache/conf/httpd.conf
[[VPS Back to VPS]]
[[Wecome Back to Main]]
httpd restart