Magento Forum

Page 1 of 2
Magento Connect screws everything up after trasfering the installation to the production server
 
carin
Member
 
Total Posts:  33
Joined:  2008-10-21
 

Hello,

after transfering the installation I get this error when I try to update an installed core package:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/virtual/*the old domain*/htdocs/js/lib/flex.js.bak) is not within the allowed path(s): (/var/www/virtual/*the new domain*/:/var/www/conf/vu2802/session/:/tmp/:/tmp:/usr/share/php/:/var/lib/php5) in /var/www/virtual/*the new domain*/htdocs/downloader/pearlib/php/PEAR/Installer.php on line 897

in some files under downloader I found the old path to the dev server. Has someone experience with that?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
James Hayton
Jr. Member
 
Total Posts:  28
Joined:  2008-09-22
 

I think you can check the pear.ini file and you have to manually edit it… I may be wrong, but try running a search for pear.ini and you should find out how to change it.. If not, let me know and Ill try to provide an explanation…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Delete the downloader/pearlib/pear.ini file, and a new one will be generated on the next run. The config still reference the old directory paths, which will cause problems. As far as I know, you cannot simply update the existing pear.ini either, as it uses a serialized format and it won’t work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
carin
Member
 
Total Posts:  33
Joined:  2008-10-21
 

Thanks for your reply! But so far no luck:

I changed the paths in pear.ini --> Fatal error: Call to undefined method PEAR_Error::set() in /var/www/virtual/*new domain*/htdocs/downloader/Maged/Pear.php on line 111

Then I deleted the pear.ini --> same error message as in my first post. I never saw a new pear.ini built automatically. When should that happen?

cheers

PS: Is it a good idea to backup the database and the custom theme, then run a new clean installation over the already existing database and add the custom theme?

PSS: I thought the process of transferring a dev install to a production install is a daily task!? How is one supposed to do it if not simply transferring database and files?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Your install has probably become boken after the first failed upgrade. You can try a clean install, then replace the database and theme but make sure you install the sme version as your current site.

Transferring a site is usually a trivial process. However, if it is not done right the first time, the recovery might be a bit more involved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
carin
Member
 
Total Posts:  33
Joined:  2008-10-21
 

Thanks for the hints. Okay I’ll try the new installation.

Do you know a source where can find the right way to do a transfer?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

That’s not the only file that’s storing your absolute path, you need to edit all of the files below:

downloader/pearlib/pear.ini
downloader
/pearlib/peardev
downloader
/pearlib/php/peclcmd.php
downloader
/pearlib/php/pearcmd.php
downloader
/pearlib/pear
downloader
/pearlib/pecl

You can either update the absolute path in them, or replace it with a relative path, so it should look like this:

./downloader/blah/blah

...instead of:

/home/username/public_html/downloader/blah/blah

You also need to delete the following directory (there’s simply too many files in here to manually edit, so I think it’s easier to just delete):

downloader/pearlib/php/.registry/

Or, an easier option might be to delete the entire downloader directory. Then, download the same version of Magento that your store is running and put the clean directory back in place:

http://www.magentocommerce.com/downloads/assets/X.X.X/magento-X.X.X.zip

Replace the X’s with the version you want to download.

 
Magento Community Magento Community
Magento Community
Magento Community
 
carin
Member
 
Total Posts:  33
Joined:  2008-10-21
 

Thanks for your extensive post. I`ll give it a go on Monday.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

By the way, I’ve added this to a wiki:

http://www.magentocommerce.com/wiki/groups/227/downloader_upgrades_wrong_store

Could you please confirm which method you used, and if you choose to replace the downloader directory entirely, if extensions still show up in Magento Connect after doing so?

I don’t believe they would, but any updates you can provide in that wiki will help.

Maybe a staff member can provide some incite as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
carin
Member
 
Total Posts:  33
Joined:  2008-10-21
 

My summarisation:

The manual replacing didn’t work for me. Still got the same error messages. So I did the following:

1. Backup website and database.
2. Make a screenshot of your installed extensions in Magento Connect Manager.
3. On your server delete the folder “downloader”.
4. Download* the Magento version that your shop is currently running at.
5. Copy “downloader” from the downloaded Magento version to your website.
6. After that the list in Magento Connect Manager is empty. To fill the list again you need this screenshot and you need to (re)install the extensions.

So far I didn’t notice any drawbacks doing it that way.

* as Crucial mentioned before:
http://www.magentocommerce.com/downloads/assets/X.X.X/magento-X.X.X.zip
(Replace the X’s with the version you want to download.)

 
Magento Community Magento Community
Magento Community
Magento Community
 
jpbauer
Sr. Member
 
Total Posts:  159
Joined:  2008-10-09
Paris IDF
 

Hi

I’ve the same problem an try your solution but the update is blocking on package magento-core/Mage_All_Latest and crash again the download folder.

My current version is 1.2.0.2 and want to upgrade to the latest one.

Thank you for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
jpbauer
Sr. Member
 
Total Posts:  159
Joined:  2008-10-09
Paris IDF
 

Hi again

No Idea to solve the problem ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
heriquet
Member
 
Total Posts:  52
Joined:  2008-08-27
 

Hi,

I got the same issue.

JP, did you solved this ?

Thanks,

Heriquet

 
Magento Community Magento Community
Magento Community
Magento Community
 
jpbauer
Sr. Member
 
Total Posts:  159
Joined:  2008-10-09
Paris IDF
 

Hello

The only solution I’d found is to reinstall the magento_downloder_x.y.z.tar corresponding to your version.

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
WayLay Design
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2009-03-16
Las Vegas, NV.
 

I had this exact same problem which is what lead me to this thread in the first place. There were some great suggestions but none of the solutions fit mine so thought I’d post my solution.

Problem: After moving from testing environment with different directory to live site with root directory Magento Connect Manager can no longer install extensions because it is still looking for the testing environment directory.

Solution: One post mentioned downloading the version of Magento they were using and replacing the downloader folder with a fresh new one from the Magento download. This worked except for now Magento Connect shows no extensions.

So, I replaced my downloader folder with a fresh new copy from my original Magento software download file.

Then I copied all of the folders from my original test environment in directory my_testing_url/public_html/my_testing_directory/downloader/pearlib/download (this is where all of the folders for installed extensions resides) These folders will be named based on the extensions that are installed. I put these copies in the same relative directory in my live environment, my_live_url/public_html/downloader/pearlib/download.

Lastly, I copied the registry entries located in the testing environment directory my_testing_url//public_html/my_testing_directory/downloader/pearlib/php/.registry/.channel.connect.magentocommerce.com_community and also the .channel.connect.magentocommerce.com_core folder. I pasted these registry entries in the same relative directories in my live environment and VOILA....

Now I can install extensions in my live environment and all of my extensions installed from my testing environment are still there. I hope this helps someone. If it doesn’t seem clear just PM me and I will provide more explanation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WayLay Design
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2009-03-16
Las Vegas, NV.
 

..One other note...while most if not all extensions will work as they always did, it may be necessary to reinstall certain extensions but using this method this can be easily done through Magento Connect Manager by clicking the corresponding drop down menu next to the extension to be reinstalled and choosing the reinstall option.

Much easier than trying to track down extensions that may no longer be available for your older version of Magento if you have not yet upgraded.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2