PDO error - mysql5.sock missing, not loaded

Post your support requests/solutions for phpJobScheduler [website]
davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1807
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

PDO error - mysql5.sock missing, not loaded

Postby davidgwalker » Thu May 29, 2014 7:43 pm

I have received the following from David H (thunderpoet), it relates to "1und1.de" managed server, but may also be useful to those experiencing the issue on other servers too.

    I finally found the answer at http://codecanyon.net/item/freelance-co ... 27/support

    Even though my php.ini file usually works for any other connection with just this to connect to the mysql 5.4 server on my exclusive hosting server --

    register_globals = off

    mysql.default_socket = "/tmp/mysql5.sock"
    mysqli.default_socket = "/tmp/mysql5.sock"

    APPARENTLY step 1 to make your product work needed this, too, in the php.ini

    ini_set('mysqli.default_socket', '/tmp/mysql5.sock');
    ini_set('mysql.default_socket', '/tmp/mysql5.sock');
    ini_set('pdo_mysql.default_socket', '/tmp/mysql5.sock');

    there are 2 duplications here but I left the original top lines in for the time being while using the "ini_set" as well.

    Then, I had to change the PDO connection in your pjsfiles/functions.php at lines 393 to 398.

    I had to add the unix_socket for 1und1.de happiness (and mine)

    try {
    $this->dbconn = new PDO(DBDRIVER.":host=".DBHOST.";port=".DBPORT.";dbname=".DBNAME.";unix_socket=/tmp/mysql5.sock",DBUSER,DBPASS,$options);
    return $this->dbconn;
    }
    catch (PDOException $e){ $this->reportDBError($e->getMessage()); }
    }

    For SHARED Hosting at 1und1.de the socket information is not needed and will not work if it IS configured.

    But for people at 1und1.de who have their mysql installed on the same machine as their hosting files and using the socket connection this seems to be the only way to make phpJobScheduler magically appear.

Hope it helps you

Dave

Return to “phpJobScheduler [forum]”

Who is online

Users browsing this forum: No registered users and 2 guests