Mysql_pconnect function problem

markleeds wrote on Friday, April 14, 2006:

I set up a new test area for openemr with the latest version of PHP 4 and Mysql 4.  Everything runs smoothly, until I tried processing some claims. 

The log file showed that there was an error in using a non-existent function mysql_pconnect.

I googled around for answers to this problem.  Most recommended making sure that php was compiled with mysql support.  Of course I did this or OpenEMR would not work!

Others recommended turning off mysql.allow_persistent in php.ini.  This should route all calls to mysql_pconnect to mysql_connect.  I did this, restarted the server and verified with phpinfo() that it had taken effect.  Still, the same error came up.

I did find mention that mysql_pconnect does not work with mysql 4 and above.  Even so, the fix above should have worked.

Has anyone else dealt with this problem?

The function call is located in the adodb driver.

Speaking of php and mysql versions, I thought there used to be a place here or in the wiki where you could see the supported versions.  I can’t seem to find it now. 

I think it won’t be long before we can claim to support the latest versions of the LAMP programs.

Thanks!

Mark

sunsetsystems wrote on Friday, April 14, 2006:

Claim processing uses the command-line version of PHP (which is separate from mod_php), and this must also be compiled with MySQL support.

– Rod
www.sunsetsystems.com

markleeds wrote on Friday, April 14, 2006:

Thank you!

markleeds wrote on Friday, April 14, 2006:

I found that another problem is that I am trying to install everything under one directory:

/usr/local/emr

I did not realize that the path for freeb is hardcoded into freeb itself.

The remainder of my problems resolved by moving freeb to /usr/share/freeb.

markleeds wrote on Saturday, April 15, 2006:

Just in case anyone else comes across the same problem:

I installed PHP in a non-standard directory.

This means that I had to find where php was being called as a command line program and provide the complete path.

In openemr/interface/billing/billing_report.php:

I changed this line:

php -q process_bills.php

To this:

/usr/local/emr/php/bin/php -q process_bills.php

That’s the absolute path to my php executable.

Otherwise, OpenEMR was functioning fine, because I compiled PHP as an Apache module originally.

I don’t know if I had to do this, but before I did the above, I recompiled PHP with the line pointing to apxs removed, supposedly to compile it as a command line program and not an apache module.