Pear.ini updater script for Magento (when moving server)


/ Published in: PHP
Save to your folder(s)

Lastly, in order to make magento connect to work correctly edit the pear.ini (downloader/pearlib/pear.ini) and update al the paths that you see in this file. Otherwise magentoconnect will try to upgrade your old site when you use it.

(the files downloader/pearlib/pear downloader/pearlib/peardev downloader/pearlib/pecl may also need the paths updating if you have changed the path)

(Note: Updating this file -pear.ini- is a tedious job, because when you change the paths, you also need the update the field before it which starts with “s:”. You need to type in the length of characters of the path field that you have updated.)

A simple helper script to generate a new the pear.ini file: drop your old pear.ini in the same directory as the PHP script, adjust the paths in the script, open it in a browser and paste the contents into your new pear.ini.

Note: The code splits the ini file into lines by detecting the “n” character - depending on the operating system you are running on the correct new line character to split your file may vary.

URL: http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.