Best way to handle "migrate.php --restore" upgrading problem

Author Message

Josh Rader

Tuesday 13 October 2009 10:23:13 am

In the process of upgrading from 4.0.1 to 4.0.4, I get an error when I run "php extension/ezurlaliasmigration/scripts/migrate.php --restore". It says there a call to undefined function mysql_escape_string and the script won't run. I have been trying to fix this error for over a week now.

I originally thought this was because the mysql extensions were not loading. However, phpinfo.php shows settings for MySQL and mySQLi and when I changed the extension path in php.ini, I got errors for all the dll extension files in Event Viewer (Windows), but when I put the extension path back, the errors went away. This leads me to believe that the mysql extensions are, in fact, loading.

I also read that mysql_real_escape_string is supposed to be used instead of mysql_escape_string, but I'm using PHP 5.2.11 and this should not be a problem. I changed the migrate.php script to be mysql_real_escape_string instead of mysql_escape_string and I still got the same error, but with "mysql_real_escape_string" instead.

I know I can't be the only one who has had this problem. Any advice on what to do now? Seems like I've tried everything. Is there an updated migrate.php script I can use? Thank you.

Ɓukasz Serwatka

Wednesday 14 October 2009 12:16:33 am

Hi,

That is command line script, so I would check if all required modules are loaded when you execute PHP CLI command.

Simply run php.exe -m from command line and check if mysql is listed.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Josh Rader

Wednesday 14 October 2009 11:07:05 am

I checked this, already. Mysql is *not* listed when I do php -m. However, when I go to phpinfo.php, mysql and mysqli are both listed. Also, when I changed the extension path in php.ini, I got errors on all of dll extensions, but when I set the extension path back, I did not get the errors, which I mean means the php_mysql.dll extension is loading. I have the extension uncommented in php.ini and the dll is definitely in the extension directory. Also, the libmysq.dll file is in the Windows\system32 directory.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.