Jump to content

Cron Exception (using IPB 4.0.2)


Hawaiianz

Recommended Posts

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] => 
)

 

Link to comment
Share on other sites

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-directory

You 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.

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...