Help - Search - Members - Calendar
Full Version: Strange (sudden) PHP/MySQL problem
The Planet Forums > Control Panels > cPanel/WHM
Skie
It seems that overnight, 2 of my servers suddenly experienced problems with PHP and MySQL.

They're using WHM 10.8.0 cPanel 10.8.2-C68. I upgraded 1 of them to WHM 10.8.0 cPanel 10.8.2-R69, but that didn't seem to make a difference. They both make use of phpsuexec and were using PHP 5.0.5 and MySQL 4.1. Everything has been working fine for several months until some time last night. I have 2 other servers with the exact same config and both are still working just fine. I was using the Expert setting within EasyApache (6 to initially set everything up, then 7 to rebuild when needed). I haven't touched these servers in the last couple of days and when I did it was to restart Apache earlier in the week.

Essentially, the problem is as follows. When trying to access any PHP script that connects to MySQL (forums, CMS, etc), I would receive the following error:

QUOTE
Call to undefined function: mysql_connect()


Another error that I began receiving is the following:

QUOTE
Security Alert! The PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.


I'm still unsure of what has happened to these 2 servers. It seems as if PHP 5.0.5 is no longer able to connect to MySQL. I've run EasyApache several times, both with and without phpsuexec, and it has not fixed the problem.

I finally re-ran EasyApache with option 2 which apparently installed PHP 4.4.1. Everything seems to be working now, but it's not 100%. Specifically, on 1 server, I still can't run a simple PHP file with just phpinfo() in it (my browser just wants do download the file) but it works on the other server. This might be due to some edits I may have done in php.ini. I'll have to locate my changes and revert them to see if that fixes the final issues. Later tonight, I'll try PHP 5.1 and see if that works any better.

Does anyone have any ideas?
funksta
I am getting a similar problem

http://forum.ev1servers.net/showthread.php?t=61770

Thanks
Skie
While investigating this further, I tried upgrading back to PHP 5.0.5 using Option 7. However, I noticed that after easyapache finished, the server was still using PHP 4.4.1. Looking into this further, I noticed an error regarding the file libz.la not being found. Even though this error existed, easyapache went on its merry way, but apparently it didn't update properly.

After reading this thread http://forums.cpanel.net/showthread.php?t=51476 and following the instructions provided, both of my servers are back on PHP 5.0.5 and working as they should be. Hopefully this may help others that are having the same problem as me.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.