eusonlito / PHPFileNavigator

PHPfileNavigator is state-of-the-art, open source web based application to complete manage your files and folders.
11 stars 4 forks source link

Error with MySQLi #3

Open mr-potato-head opened 7 years ago

mr-potato-head commented 7 years ago

PFN doesn't work with MySQLi. On login page, I have these errors :

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /var/www/pfn/data/include/mysql.php on line 197 [2016/09/14 22:35:27] [/var/www/pfn/data/include/mysql.php] [192] [LOCK: LOCK TABLES pfn_usuarios READ,pfn_raices READ,pfn_accesos READ,pfn_sesions READ,pfn_bloqueo_ip READ,pfn_grupos READ,pfn_configuracions READ,pfn_raices_usuarios READ,pfn_raices_grupos_configuracions READ;] []

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /var/www/pfn/data/include/mysql.php on line 99 [2016/09/14 22:35:27] [/var/www/pfn/data/include/class_usuarios.php] [111] [SELECT COUNT(*) as intentos FROM pfn_accesos WHERE ip = "127.0.0.1" AND ultimo >= "1473885317" AND estado = 0;]

The DB handle seems to be lost after connection.

eusonlito commented 7 years ago

Can you give me some additional info? PHP version, MySQL version, OS. Thanks.

mr-potato-head commented 7 years ago

Indeed, my previous post is clearly not precise enough.

System infos :

I tried to install PFN 2.3.3 but it was impossible. The last step failed with a lot of DB errors. So, after that I just get the last version (master). I can complete installation if I comment lines 88 and 90 of instalar.inc.php ($erros[] can't be empty). If I don't comment, I have the following message : - It has not been possible to use the selected database

After installation, I can't log with admin credential. screenshot_error

After some research in the source code (in spanish unfortunately !), I think the problem comes from the MySQLi Database handle. The mysqli_connect call is ok and I get a not null var_dump of $this->conexion (mysql.php). In all other places where $this->conexion is used, the value is NULL.

You know the source code, you will probably find the bug very quickly ! Don't hesitate to ask me some more tests.

Thx for help ;) The app seems to be cool, I'm in a hurry to try it !

eusonlito commented 7 years ago

Try to change the mysql server host from localhost to 127.0.0.1 and try a new installation.

mr-potato-head commented 7 years ago

Same error. Have you ever tried with MariaDB ?