Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

SQLSTATE[HY000] [2002] No such file or directory [duplicate]

Hi,

I have a problem with plugin installation in my 2.3.1 version.

After adding it into default /download folder, i am unable to install it via WEB GUI (i am getting blank page / plugin already installed).

In /var/log/httpd/error_log i am getting:

PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_plugins/functions_check.php:49\nStack trace:\n#0 /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_plugins/functions_check.php(49): PDO->__construct('mysql:host=;dbn...', 'root', 'root')\n#1 /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_plugins/ms_pluginsmanager.php(124): check(Array)\n#2 /usr/share/ocsinventory-reports/ocsreports/require/header.php(437): require('/usr/share/ocsi...')\n#3 /usr/share/ocsinventory-reports/ocsreports/index.php(44): require('/usr/share/ocsi...')\n#4 {main}\n  thrown in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_plugins/functions_check.php on line 49, referer: http://starsq.ddns.net:4433/ocsreports/index.php?function=pluginsmanager

I have gooled that the problem could be in:

I had the exact same problem. None of the above solutions worked for me. I solved the problem by changing the "host" in the /app/config/database.php file from "localhost" to "127.0.0.1".

http://stackoverflow.com/questions/20723803/pdoexception-sqlstatehy000-2002-no-such-file-or-directory

Any ideas where / how to change the value of PDO from localhost to 127.0.0.1?

in OCS Inventory NG server for Unix by (200 points)

Please log in or register to answer this question.

 
Powered by Question2Answer
...