Thanks for your answer.
I tried the command in the command line as an administrator. So the permissions should be sufficient, I think. Yes, each time I run the command, the error appears.
Funny you mention it, today I tried to use '127.0.0.1' instead of 'localhost' in the config_db.php. After changing that, I couldn't access the web ui at all. Error:
A link to the SQL server could not be established. Please check your configuration.
Le serveur Mysql est inaccessible. Vérifiez votre configuration
GLPI 9.4.5 Copyright (C) 2015-2019 Teclib' and contributors
And the same error as before in the command line.
Now I'm confused. What could be the reason that 127.0.0.1 isn't working? Probably that's the reason it doesn't work from the command line...
]]>Is the cron executed with the web server user?
Is the error appearing each execution of cron?
Regards.
]]>Thanks
]]>does nobody have an idea?
thanks,
]]>I'm running GLPI 9.4.4 on my Synology NAS with web station. It runs fine and I can open the application in my browser without any issues.
Now, to be able to get notifications without logging in I understand that I have to run the cron.php from a scheduled job. To schedule the job is not an issue, but the job itself.
Whenever I run it from a scheduled job or manually in a command line I get this error:
Command:
/usr/local/bin/php73 /volume1/web/glpi/front/cron.php
Error:
A link to the SQL server could not be established. Please check your configuration.
Le serveur Mysql est inaccessible. Vérifiez votre configuration
The command should be correct as I use PHP 7.3.
Also, my config_db.php should be correct as I can open the application. It contains:
<?php
class DB extends DBmysql {
public $dbhost = 'localhost';
public $dbuser = 'XXXX';
public $dbpassword = 'XXXX';
public $dbdefault = 'glpi';
}
Is there any place I need to configure the connection for the cron.php or something like this?
Thanks for any help,
Viktor