[Migrationtool] Migration tool doesn't work for me

I get this error:

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.

Any suggestions? Thanks in advance.

I’ll take a look at it. Which specs (OS, Apache version, PHP version, …) does your server has?

mydomain.com/step/config is the first step of the conversion process and the tool should display a config form there:

Step 1 (mydomain.com)

Step 2 after clicking start (mydomain.com/step/config)

OS: Linux Debian Squeeze
PHP Version 5.3.3-7+squeeze9
Webserver: Apache
You can have a look here: http://www.alessandropagano.net/info.php

Do you copied the .htaccess file to your webserver directory?

Yes ! This is the content:

Remove index.php

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

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…

Ah okay I think the /migration directory is the problem. Are you able to install the tool on a local machine or on a single domain? If yes try this.

But I’m still not sure about the mysql error as the app shouldn’t connect to any MySQL servers at the start. But I’ll investigate this.

I tried the mysql connect errors still remains and when i click on “start” i find a 505 error.

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)

Ok but the first step doesn’t start…

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.

it doesn’t work…

I think that the error is in .htaccess file…

Did you installed the tool in a subdirectory of your InvoicePlane installation? If yes try a subdomain.

If not please take a look at the config and enable the debug mode (set it to true).
Then post the output here.

I installed the tool in www.mydomain.net and in ww.mydomain.net/invoiceplan/migration/ and it doesn’t work.