AutoSitemap Administration Tool: impossible to update table "zones".

Submitted by teruha on Sat, 2007-12-29 10:12.

When I want to use “Add zone” the program turns over the following 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.33/e/s/t/estocett/www/autositemap/admin.php on line 108

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home.33/e/s/t/estocett/www/autositemap/admin.php on line 108

Thanks for your help.

Submitted by dmorison on Sat, 2007-12-29 11:41.

Hello,

Are there any errors displayed if you run the setup script (autositemap/setup.php)? Running this script after installation will test the database connection...

Cheers,
David.

Submitted by teruha on Sat, 2007-12-29 14:44.

Hi,

I have make a new installation after having removed the two tables “urls” and “zones” (phpMyadmin) and the problem remains the same one.
I am using PHP Version 4.4.7 and MySQL Version 5.0.44-log. The tables are created in "utf8_unicode_ci". All functions well except “admin.php” as mentioned before.

I also installed "autositemap" on my test system Linux (Using PHP Version 5.2.3 and MySQL Version 5.0.37-log) and that functions perfectly! On this system the tables are created in “latin1_swedish_ci).

I also seek a solution from my side.

Still information: When I carry out “Add zone” an incomplete record is created in the table “zones”. The fields “id” and “include” have a value equal to 1, the other fields are empty !

Sorry for my english.
Best regards.

Submitted by dmorison on Sat, 2007-12-29 14:51.

Hello,

It might be better to use mysql_escape_string instead of mysql_real_escape_string. In autositemap/admin.php, look for this code on line 109:

    return mysql_real_escape_string($text);

...and change this to:

    return mysql_escape_string($text);

Hope this helps,
Cheers,
David.

Submitted by teruha on Sat, 2007-12-29 15:29.

Hi,

The solution suggested is perfect: The problem is solved.

Still thank you for your assistance.

Happy new year to you and to all your team.