I installed the new version of OpenEMR(openemr-4.2.0) on SiteGround’s shared servers using CentOS.
After the installation was completed, I got the following error:
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in …/library/adodb/drivers/adodb-mysql.inc.php on line 383
Now, when I am trying to access the application I get the following error:
OpenEMR has already been installed. If you wish to force re-installation, then edit …/library/classes/…/…/sites/default/sqlconf.php (change the ‘config’ variable to 0), and re-run this script.
How can I change the installation and use mysqli? Has anybody else came across this problem?
Host will generally not permit users to install extensions at will.
Error Correction Edit 2/13/15:
When Wiki was offline yesterday, unable to check config variable in the Upgrade manuals. Zero is incorrect, should be 1.
If installation was complete, then shouldn’t be running the setup.php script again. Aren’t you able to login?
Regarding the deprecation message; note it’s not an error message and can be ignored (for now at least); see below for details on this:
Since php version 5.5, mysql_connect has been deprecated(it still works, but it throws the deprecated message). It appears the plan by php is to drop support for this in php version 7 (with possible release in 2016 sometime); note these are kind of rumors. The conversion to mysqli or PDO is not simple (but won’t be that tough since most of the mysql calls are centralized and wrapped in functions). See here for a quick summary: http://www.open-emr.org/wiki/index.php/Active_Projects#Convert_connector_to_MySQLi_or_PDO
You can essentially ignore the deprecated message for now, but it is a reminder for the community that this needs to be dealt with before php no longer supports it. Definitely a project that will need completing, so feel free to dive in. The community would gladly provide guidance.
My mistake was that I tried to change the php settings, but off course I didn’t have permission to do so, because I was on a shared server. I thought that some differences on the php settings won’t influence the set up.
Since it’s been a long time that I have used the cpanel I was unaware of the PHP variables manager. Using this plugin I was able to make the php changes on a directory level(only for the OpenEMR directory). I removed the previous installation, dropped the database and I tried again from the beginning. The set up ran smoothly.