Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/mhd-01/www.mydomain.net/htdocs/migrate/engine.php on line 11
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/mhd-01/www.mydomain.net/htdocs/migrate/engine.php on line 11
Then if i try to start the process the browser will be redirected to a strange URL : http://mydomain.net/step/config/
. i receive an error because the page doesn’t exist.
Could you describe exactly what you did? From copying to the error messages? I can’t reproduce the error and the pages show up on every system I tried.
Just copied the files by ftp in the folder “migration” then i visit www.mydomain.net/migration and i received a page with those errors:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/mhd-01/www.mydomain.net/htdocs/migrate/engine.php on line 11
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/mhd-01/www.mydomain.net/htdocs/migrate/engine.php on line 11
then when I click on “start” i was redirected this URL : http://mydomain.net/step/config/
. i received an error because the page doesn’t exist.
If you want we can chat on IRC and you can try live on my webserver…
It’s only a warning but anyway:
We should not use mysql_real_escape_string if there is no connection.
Since the escaping depends on the character set used by the server.
(see dev.mysql.com/doc/refman/5.1/en/mysql-real-escape-string.html)
Here the mysql extension attempts to set automatically a connection first, but fails.(default settings from php.ini)
Thats curious as the app never uses mysql_real_escape_string()…
Idea: Did you installed the app in a subdirectory of your FusionInvoice/InvoicePlane installation? Maybe this causes the errors?
Anyway, I updated the tool and it should work now. Tested with Ubuntu 12.04, PHP 5.3.x and 5.4.x and MySQL 5.5.38 without any errors.