You are not logged in.
Hi.
In my /var/www/html/glpi/files/_log/php-errors.log I have two events:
1. glpiphplog.WARNING: *** PHP Warning (2): mysqli::real_connect(): (HY000/2002): No such file or directory in /var/www/html/glpi/inc/dbmysql.class.php at line 185
2. *** PHP Warning (2): error_log(/var/www/html/glpi/files/_log/cron.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php at line 658
I don't know Linux (Ubuntu) and I don't know what can I do with it. Can anyone help to solve the problem please? I set:
sudo chmod -R 777
for both - inc and files folders. But the problem still exists.
--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS
Offline
Hi,
I encounter the same kind of issue, but I don't know if it's serious or not :
PHP Warning (2): error_log(/var/www/html/glpi/files/_log/cron.log): failed to open stream: Permission denied in /var/www/html/glpi/inc/toolbox.class.php at line 677
I checked the permissions (I run GLPI on a Debian box), but the toolbox.class.php file seems correct :
-rw-r--r-- 1 www-data www-data 109126 Mar 2 14:22 toolbox.class.php
Thanks for your answer.
Samuel
GLPI 9.5.4
FusionInventory 9.5.0+1.0
Offline
Sounds you have a problem with the owenership of the files. Under which user the cron-job is running ? try to running the cron-job with a user-id www-data
btw: running a linux server without knowledge isn´t a good idea ...
Offline
777 ??? ARGH! not a good idea.
BTW, on top of glpi directory (eg /var/www/glpi) do:
chown -R www-data:www-data *
(if apache is running with www-data user.. )
Offline
btw: running a linux server without knowledge isn´t a good idea ...
True, but sometimes there is no other option. And... somehow I have to start get this knowledge
Under which user the cron-job is running
* * * * * root /usr/bin/php7.4 /var/www/html/glpi/front/cron.php &>/dev/null
0 6,9,12,16 * * * root /var/www/html/glpi/bin/console ldap:sync -u --ldap-filter=objectClass=user -q
Under which user the cron-job is running
BTW, on top of glpi directory (eg /var/www/glpi) do:
chown -R www-data:www-data *
During the first installation I started with:
sudo chmod -R 755 config/ files/ marketplace/
sudo chown -R www-data:www-data files/ config/ marketplace/
But I had problems with that and that's why I switched to the 777.
Thank you all for your reply, but it has been a while and a little bit changed. Now I don't see the "failed to open stream" error. Still have "No such file or directory" but my /var/www/html/glpi/files/_log/php-errors.log is now spammed by:
[2021-05-03 08:17:48] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 19 found! {"user":"8@chronos"}
[2021-05-03 08:17:50] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 1307 found! {"user":"8@chronos"}
I have to deal with this first, and then I'll try with your advice.
--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS
Offline
Try to disable fusioninventory plugin.
Seems related: https://nmb48.top/fusioninventory/fusio … ssues/3159
Offline
Hello !
Sounds you have a problem with the owenership of the files. Under which user the cron-job is running ? try to running the cron-job with a user-id www-data
Indeed, my cronjob was executed by root and not www-data. I changed my cronjob and I'll check the logs tomorrow. Some of my logs were owned by root and not www-data, therefore I changed the ownership as well (chown -R www-data:www-data).
Best regards,
Samuel
Offline
Just for Reference
I had the same issue, after investigations the selinux was the reason.
Offline