Problem with database connection, host deactivated mysql_pconnect function!

Problem with database connection, host deactivated mysql_pconnect function!

asdrenasdren Posts: 20Questions: 0Answers: 0
edited November 2012 in Editor
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

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi,

    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
  • asdrenasdren Posts: 20Questions: 0Answers: 0
    edited November 2012
    Sorry I mixed the Editor with DataTables.

    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/
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Sounds like you are probably using PHP 5.2 or before. Can you confirm if that is the case? The PHP libraries that Editor ships with utilise features of PHP 5.3+.

    Allan
  • asdrenasdren Posts: 20Questions: 0Answers: 0
    Hi allan, thanks for your great support, I updated to PHP Version 5.3.18 and now it's working.

    Will it work if I update to PHP 5.4.8?

    Thanks
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Should work just fine on all PHP versions later than 5.3 :-)

    Allan
This discussion has been closed.