Mysql_pconnect undefined?

software development


I have a dozen, maybe more, php scripts using mysql that have been in production for years that suddenly went down, perhaps within the last two weeks. Many of these scripts use a connection file to manage connections to mySQL databases. It looks like when they hit the line $LyleTrap = mysql_pconnect($hostname_LyleTrap, $username_LyleTrap, $password_LyleTrap) or trigger_error(mysql_error(),E_USER_ERROR);

I get an error Fatal error: Call to undefined function mysql_pconnect() in /home/ykfpdata/ on line 9

mysql_pconnect is now undefined? When did that happen? Is this related to the move to Ubuntu 12.04 and php 5.3 on Oct 12, 2014? Checked my domain settings and found PHP to be set 5.3x FastCGI.
Following instructions at I changed the site’s .htaccess file by commenting out the AddHandler and Action lines:

Options +ExecCGI #AddHandler php5-cgi .php #Action php-cgi /cgi-bin/php-wrapper.fcgi #Action php5-cgi /cgi-bin/php-wrapper.fcgi
and the table producing scripts run without error. Still, my charting scripts are producing no output. Looking at these scripts, like
, it looks like my charting library will not load without me creating a custom php.ini. Getting the message " Error Loading ChartDirector for PHP Extension

It appears this PHP system has not loaded the ChartDirector extension by using an extension statement in the PHP configuration file (typically called “php.ini”). An attempt has been made to dynamically load ChartDirector on the fly, but it was not successful. Please refer to the Installation section of the ChartDirector for PHP documentation on how to resolve this problem."


I finally got the charting scripts to work, even though the ChartDirector docs and the Dreamhost wiki on php.ini gave somewhat contradictory advice.
First I upgraded my site to use php 5.4 from the panel.

Next, I thought I’d have to create a custom php.ini and add the line “extension=phpchartdir540.dll” But then I would either have to 1. (copy all the chartdirector stuff to the system php extension directory) or 2. (copy all the stuff from the system php extension directory and the chartdirector .dll to a directory under my home and use the custom php.ini to use this new location as the extension directory). Since I didn’t have write permissions to the system php directory (/usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525), it would have to be option 2. But I had an idea to just add the line “extension=phpchartdir540.dll” to my ~/.php/5.4/phprc and it worked!