Forums / Install & configuration / Best way to handle "migrate.php --restore" upgrading problem

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.

eZ debug

Timing: Jan 18 2025 10:24:05
Script start
Timing: Jan 18 2025 10:24:05
Module start 'content'
Timing: Jan 18 2025 10:24:06
Module end 'content'
Timing: Jan 18 2025 10:24:06
Script end

Main resources:

Total runtime0.6545 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.9922180.7891
Module start 'content' 0.00520.5096 768.7813540.5625
Module end 'content' 0.51490.1396 1,309.3438332.8906
Script end 0.6545  1,642.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5966210.0002
Check MTime0.00150.2306210.0001
Mysql Total
Database connection0.00080.117910.0008
Mysqli_queries0.589790.09941940.0030
Looping result0.00170.26091920.0000
Template Total0.631096.420.3155
Template load0.00200.299320.0010
Template processing0.629196.110520.3145
Template load and register function0.00010.022310.0001
states
state_id_array0.00080.121810.0008
state_identifier_array0.00100.148520.0005
Override
Cache load0.00160.2448140.0001
Sytem overhead
Fetch class attribute can translate value0.00110.162830.0004
Fetch class attribute name0.00110.168940.0003
XML
Image XML parsing0.00100.151830.0003
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00350.5358290.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs