Problem with database connection, host deactivated mysql_pconnect function!
Problem with database connection, host deactivated mysql_pconnect function!
I just installed the latest version of Datatables and the Editor Trial version. I followed this tutorial: http://editor.datatables.net/tutorials/installing
Once everything was done I loaded my site http://myWebSite.com/DataTables-1.9.4/extras/Editor/examples/ and got this popup error:
[quote] DataTables warning (table id = 'example'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error. [/quote] I searched the forum and found this thread: http://datatables.net/forums/discussion/10773/editor-examples-json-parsing-error/p1
Where I found this:
[quote] So basically your server is returning a 500 error because it can't find the function mysql_pconnect ( http://php.net/manual/en/function.mysql-pconnect.php ). That is the method that is being used to connect to your MySQL database (assuming you have one), but it sounds like your PHP install doesn't have the mysql_* functions compiled in (you can confirm with phpinfo). [/quote]
I contacted my host and they said that the function mysql_pconnect was indeed deactivated due to some cluster environment issue.
So my question is, is there any other way I can connect to my MySQL database with the Editor. If so, how?
Thanks in advance
Once everything was done I loaded my site http://myWebSite.com/DataTables-1.9.4/extras/Editor/examples/ and got this popup error:
[quote] DataTables warning (table id = 'example'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error. [/quote] I searched the forum and found this thread: http://datatables.net/forums/discussion/10773/editor-examples-json-parsing-error/p1
Where I found this:
[quote] So basically your server is returning a 500 error because it can't find the function mysql_pconnect ( http://php.net/manual/en/function.mysql-pconnect.php ). That is the method that is being used to connect to your MySQL database (assuming you have one), but it sounds like your PHP install doesn't have the mysql_* functions compiled in (you can confirm with phpinfo). [/quote]
I contacted my host and they said that the function mysql_pconnect was indeed deactivated due to some cluster environment issue.
So my question is, is there any other way I can connect to my MySQL database with the Editor. If so, how?
Thanks in advance
This discussion has been closed.
Replies
Are you using the current 1.2.2 trial version of Editor? It doesn't use `mysql_pconnect` anywhere in the code. The older 1.1 libraries do, but Editor 1.2+ uses PDO with MySQL drivers.
Regards,
Allan
After further searching on threads in the forum I tried using Firebug and now I found the error, but I don't understand why I get this error, since I have only uploaded the filed you provided in the trial zip file (the latest 1.2.2 version). Not changing the files what so ever, a simple ftp upload. This is the error Firebug gives me as response:
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /xxx/DataTables-1.9.4/extras/Editor/examples/php/browsers.php on line 12
I get this error when I try to load the page:
http://www.mysite.com/xxx/DataTables-1.9.4/extras/Editor/examples/
Allan
Will it work if I update to PHP 5.4.8?
Thanks
Allan