Error for cron jobs

Hello.

I am trying to setup a cron job for dolibarr and get some odd error. I have few dev installs with working crone.

For a production, I have set a cron in CPanel to execute cron_run_jobs.php every 5 minutes. Filepath is correct, but no jobs get executet. This is what I have in cron_run_jobs.php.log:


Warning: mysqli::__construct(): (HY000/2002): No such file or directory in /path_to_folder/htdocs/core/db/mysqli.class.php on line 201
> ErrorInternalErrorDetected:
/path_to_folder/scripts/cron/cron_run_jobs.php
> DatabaseTypeManager:
mysqli
> RequestLastAccessInError:
ErrorNoRequestInError
> ReturnCodeLastAccessInError:
ErrorNoRequestInError
> InformationLastAccessInError:
ErrorNoRequestInError
> Message:
host=localhost, port=3306, user=/username/, databasename=/dbname/, No such file or directory

1 Like

Hello,

Try to change localhost by 127.0.0.1 in conf.php

One more thing … tha main directory is renamed from ‘htdocs’ to another value. Can this also be an issue?
As the dolibarr itself is working OK.

Changed ‘localhost’ to ‘127.0.0.1’ in conf.php and jobs got executed.

It could but the error that your reported is from MYSQL connection.

Perfect !