You are not logged in.
Noticed that all php scripts stopped working after Mysql upgraded and servers were rebooted. everything is up to date. I rolled back the following and it started working again.
mysql
mysql-clients
libmysqlclient
Mysql seemed to be running ok otherwise.. I tested perl dbi connections with no issues, and connected with mysql admin tools across the network with no issues. All problems point to PHP connecting to Mysql. I tried running php test scripts from cli to test DB connectivity, but they would not connect. Any advise is greatly appreciated.
Thanks,
J
Offline
The new mysql works fine here. In fact PHP does not even use the mysql lib to connect to the mysql server. It would be helpful if you could post the complete error message.
Offline
Apologies, I have been trying to get a more intuitive error message, but this is all I have so far:
Fatal error: Call to undefined function mysql_connect() in /public/www/cacti/test.php on line 6
Below is test.php code
<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "XXXX";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (`Error connecting to mysql`);
if ($conn) {
echo "CONNECT OK";
}
$dbname = "mysql";
mysql_select_db($dbname);
?>
Offline
Well, just make sure to have the mysql.so module enabled in your php.ini.
Offline
It is enabled. It has been working fine up until the mysql upgrade. As soon as I downgrade it works again.
Offline
I somehow doubt that. That error is not related to mysql itself. PHP simply does not know about this function which indicates that the mysql module is not loaded. Check the output of php -m and create a file containing "<?php phpinfo(); ?>" and check that output as well. (means look if the mysql module is listed) This will even work if mysql is not started or even not installed at all.
Offline
I'm having MySQL errors as well with my Rails apps after upgrading :
Status: 500 Internal Server Error
uninitialized constant MysqlCompat::MysqlRes
Haven't changed anything either, just did a 'pacman -Syu' and it broke =\
Offline
Still researching the issue. Seems to be isolated to libmysqlclient-5.5.10-2. Downgraded only that package and everything is still working.
Offline
I'm having MySQL errors as well with my Rails apps after upgrading :
Status: 500 Internal Server Error uninitialized constant MysqlCompat::MysqlRes
Haven't changed anything either, just did a 'pacman -Syu' and it broke =\
You've to rebuild it. See https://bbs.archlinux.org/viewtopic.php … 98#p904498
Offline
So would it be safe to say that my PHP issues are caused by the same problem?
Offline
Problems with python too, I've just did on my virtualenvs:
pip uninstall MySQL-python and pip install MySQL-python
Thanks bash for the tip.
Offline
So would it be safe to say that my PHP issues are caused by the same problem?
No. As Pierre said, php from [extra] doesn't need to be rebuilt and php52 (5.2.17-5) from [community] has been rebuilt.
Offline
Uninstalled php and deps, reinstalled/upgraded and all is working.... Can't explain it.
Thanks,
J
Offline