Hawaiianz Posted April 22, 2015 Posted April 22, 2015 Aloha,I just tried using the cron job for the first time in IPB 4.0.2, and I get the exception below from cron.Anyone know what might be causing this exception? Exception: IPS\Db\Exception Object ( [query] => [binds] => Array ( ) [message:protected] => No such file or directory [string:Exception:private] => [code:protected] => 2002 [file:protected] => /home/theaccount/public_html/system/Db/Db.php [line:protected] => 121 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/theaccount/public_html/system/Task/Task.php [line] => 110 [function] => i [class] => IPS\_Db [type] => :: [args] => Array ( ) ) [1] => Array ( [file] => /home/theaccount/public_html/applications/core/interface/task/task.php [line] => 56 [function] => queued [class] => IPS\_Task [type] => :: [args] => Array ( ) ) ) [previous:Exception:private] => )
bfarber Posted April 22, 2015 Posted April 22, 2015 Looks like that error was thrown during the database connection.http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directoryYou can also verify you don't have a socket connection defined in conf_global.php that is incorrect, however if your main website is working fine and only cron is failing, I'd lean towards the most likely cause being you have a different cli php.ini that has an incorrect socket configured there. Your host likely will need to assist.
Hawaiianz Posted April 22, 2015 Author Posted April 22, 2015 I finally got it working.In "conf_global.php" i changed 'sql_host' from "localhost" to "127.0.0.1":'sql_host' => '127.0.0.1'The rest of the board (IPB 4.0.2) runs fine using "localhost", but the cron job fails to open the database unless I use "127.0.0.1".
Hawaiianz Posted April 23, 2015 Author Posted April 23, 2015 Thank you very much for helping me figure this out, bfarber.I also really appreciate you fixing the gallery upload loop bug (PHP 5.3.x) so quickly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.