PDA

View Full Version : PHP not updating



gsharma
07-29-2008, 02:22 AM
I am using custombuild 1.2 Beta to update 5.2.5 (CLI) to 5.2.6 (CGI).


./build php5-cgi

The script shows that the installation is complete


Make Complete
Copying php.ini..
/usr/local/etc/php5/cgi/php.ini already exists, skipping.
Increasing memory limit to 20M...
Installing php...
Installing PHP SAPI module: cgi
Installing PHP CGI binary: /usr/local/php5/bin/
Installing PHP CLI binary: /usr/local/php5/bin/
Installing PHP CLI man page: /usr/local/php5/man/man1/
Installing build environment: /usr/local/php5/lib/php/build/
Installing header files: /usr/local/php5/include/php/
Installing helper programs: /usr/local/php5/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php5/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR - already installed: 1.7.1
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php5/include/php/ext/pdo/
Installing ZIP headers: /usr/local/php5/include/php/ext/zip/lib
PHP 5.2.6 with suPHP Installed.


However, when I check the version on PHP it shows


[root@vps custombuild]# php -v
PHP 5.2.5 (cli) (built: Feb 29 2008 16:39:01)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies


Can anyone help me to identify why PHP is not being installed? I am trying to install FastCGI, but the tutorial for installing fast-cgi (by tillo) on DA suggests installing PHP - CGI.

Thanks for any help.

smtalk
07-29-2008, 02:43 AM
Why don't you read Custombuild FAQ (http://directadmin.com/forum/showthread.php?t=19221)?


/usr/local/php5/bin/php-cgi -v

gsharma
07-29-2008, 12:37 PM
Why don't you read Custombuild FAQ (http://directadmin.com/forum/showthread.php?t=19221)?


/usr/local/php5/bin/php-cgi -v


I did read it, but perhaps not that well. Thanks a lot for the help with this. This helped me debug my actual goal of running my site on fastcgi.

I followed this thread http://www.directadmin.com/forum/showpost.php?p=124878&postcount=450 (except #4. I don't want Xcache at this time.)

At the end when I comment


#LoadModule php5_module /usr/lib/apache/libphp5.so
and uncomment

LoadModule fastcgi_module /usr/lib/apache/mod_fastcgi.so

and restart apache, it stops interpreting PHP and forces a download. The download file contains the PHP code as text.

Once again thanks for your help.

gsharma
07-29-2008, 09:04 PM
More on the problem:

The browser tries to open the PHP file with an application named

application/x-httpd-php5

Here is the FastCGI config (/etc/httpd/conf/extra/httpd-fcgi.conf)


<IfModule mod_fastcgi.c>
ScriptAlias /fcgi5 /opt/fcgi/php5.fcgi

<Directory "/opt/fcgi">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
SetHandler fastcgi-script
</Directory>

AddHandler fastcgi-script .fcgi

FastCgiIpcDir /tmp
FastCgiWrapper /opt/fcgi/suexec
FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION

AddType application/x-httpd-php5 .inc .php .cphp .phtml .php5

Action application/x-httpd-php5 /fcgi5

</IfModule>


And /opt/fcgi/php5.fcgi contains


#!/bin/sh
PHPRC="~"
export PHPRC
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=50000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/php5/bin/php-cgi

smtalk
07-30-2008, 03:23 AM
Check /etc/httpd/conf/extra/httpd-php-handlers.conf.

gsharma
07-30-2008, 03:32 AM
Check /etc/httpd/conf/extra/httpd-php-handlers.conf.

It has



AddHandler application/x-httpd-php .inc .php .php3 .php4 .php5 .phtml
AddHandler application/x-httpd-php-source .phps


Does this need to be deleted?