Hi,
I am trying to compile PHP to include PCNTL for multi-threading.
The version in the CentOS repository is 5.3.3. which I have installed but which does not exist on the PHP site as a source download.
I have downloaded the latest version (5.4.8) and have compiled following the instructions here.
After restarting Apache (hhtpd) PHPInfo reports version 5.4.8 but the command line reports 5.3.3.
Which php reports
php -v reports
php -v /usr/local/bin/php
php [script] works fine
/usr/local/bin/php [script] reports
I have confirmed the sockets are correct
ls -l /var/lib/mysql/mysql.sock
grep sock /etc/php.ini (irrelivent lines returned removed).
So, two things...
Any ideas / suggestions most welcome.
RB
I am trying to compile PHP to include PCNTL for multi-threading.
The version in the CentOS repository is 5.3.3. which I have installed but which does not exist on the PHP site as a source download.
I have downloaded the latest version (5.4.8) and have compiled following the instructions here.
After restarting Apache (hhtpd) PHPInfo reports version 5.4.8 but the command line reports 5.3.3.
Which php reports
Code:
/usr/local/bin/php
php -v reports
Code:
[localhost ~]# php -v
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost ~]#
php -v /usr/local/bin/php
Code:
[localhost ~]# php -v /usr/local/bin/php
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost ~]#
php [script] works fine
/usr/local/bin/php [script] reports
Code:
Warning: mysql_connect(): No such file or directory in /var/www/nnplus/www/lib/framework/db.php on line 21
fatal error: could not connect to database! Check your config.
I have confirmed the sockets are correct
ls -l /var/lib/mysql/mysql.sock
Code:
srwxrwxrwx. 1 mysql mysql 0 Dec 15 13:45 /var/lib/mysql/mysql.sock
grep sock /etc/php.ini (irrelivent lines returned removed).
Code:
mysql.default_socket = /var/lib/mysql/mysql.sock
mysqli.default_socket = /var/lib/mysql/mysql.sock
So, two things...
- Why is the 'which php' version different to the php version reported by doing a -v with the php listed in the which php return ?.
- Why is the mysql connect not working ?.
Any ideas / suggestions most welcome.
RB