FTP Upgrade Error

I'm trying to upgrade from 2.1.4 to 2.2.1, but I'm getting the following error when trying to input the FTP information:



Error

CS-Cart software was not found in the directory you entered.



I understand what the error means and how it's triggered (looks for config.php in the “FTP directory” setting). But for some reason, I can't figure out why I'm receiving the error. The FTP account is jailed to the httpdocs directory, so the root of the FTP account is the httpdocs directory. CS-Cart also resides in the httpdocs root. I have put “/” and “” in for the directory setting, but both are still triggering the error. Any ideas?



I tried to debug the issue myself by adding a few var_dumps() and print() statements in fn_uc_ftp_connect() in the “/controllers/admin/upgrade_center.php” file, but nothing was printing out. I'm pretty sure this is where all the checks are taking place for the FTP info, but apparently the debugging isn't working.



Thanks for any help you can provide.

Have you tried upgrading without entering any FTP info? If there's no FTP info it will use HTTP rather than FTP which works in 9 out of 10 cases.

The user that Apache runs as doesn't own the files, and I'd rather not set all CS-Cart files to a+w. Any way around this?

It's really what PHP runs as, which could be the same as apache but it depends on the PHP “method” being used… But that's a minor point.



If the cart can't create files or write to files then you have to use FTP as the upgrade method and that FTP user must have permission to do so.



Normally a cart is setup with ownerships set to the owner/group that PHP runs as (usually someone's cpanel user).

[quote name='tbirnseth' timestamp='1315006490' post='120883']

It's really what PHP runs as, which could be the same as apache but it depends on the PHP “method” being used… But that's a minor point.



If the cart can't create files or write to files then you have to use FTP as the upgrade method and that FTP user must have permission to do so.



Normally a cart is setup with ownerships set to the owner/group that PHP runs as (usually someone's cpanel user).

[/quote]





The FTP user I'm trying to enter into CS-Cart owns all the files, and this isn't the same user as PHP runs as. The problem is, CS-Cart won't accept the directory I'm entering.

I'm sure what you are entering is failing the ftp chdir command.

If you're using a full path (something like /home/me/public_html) you might try using either nothing at all or just public_html



Since no one knows how you have that FTP user configured (chroot jail to their own directory or chroot'd to the root of the site or chroot'd to the home directory of the user) you'll have to figure that out. Try using filezilla with the FTP user you're using. You might then be able to determine what path to use once you're in that way and you have a little bit of a visual.

From my OP:


[quote]The FTP account is jailed to the httpdocs directory, so the root of the FTP account is the httpdocs directory. CS-Cart also resides in the httpdocs root. I have put “/” and “” in for the directory setting, but both are still triggering the error.[/quote]



Just for fun I also tried the full server path but that didn't work.



Is there any way I could somehow output the result of ftp_pwd() to the error that gets reported to the admin page? I tried modifying the upgrade_center.php controller but wasn't seeing any of my debug text.