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.

eZ debug

Timing: Jan 18 2025 11:46:35
Script start
Timing: Jan 18 2025 11:46:35
Module start 'layout'
Timing: Jan 18 2025 11:46:35
Module start 'content'
Timing: Jan 18 2025 11:46:35
Module end 'content'
Timing: Jan 18 2025 11:46:35
Script end

Main resources:

Total runtime0.0175 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.6406152.6563
Module start 'layout' 0.00550.0032 742.296939.4922
Module start 'content' 0.00870.0063 781.789189.3359
Module end 'content' 0.01500.0025 871.125034.3047
Script end 0.0175  905.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003218.3792140.0002
Check MTime0.00137.5259140.0001
Mysql Total
Database connection0.00073.797010.0007
Mysqli_queries0.002916.622230.0010
Looping result0.00000.102110.0000
Template Total0.00179.510.0017
Template load0.00095.291210.0009
Template processing0.00074.154910.0007
Override
Cache load0.00073.743910.0007
General
dbfile0.00031.484880.0000
String conversion0.00000.044940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs