Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error when backing up through admin


bigbob2

Recommended Posts

Posted

Our host has upgraded our PHP recently and now when I go to the backup part of the admin, I get the error:

 

Warning: exec() has been disabled for security reasons in /home/hosting/public_html/domain.com/store/admin/backup.php on line 151

 

Is anyone able to tell me how to fix this?

 

Thanks

Kevin

 

 

 

Posted

This is one of those things where I'm not sure that an application (like osC) should be trying to replicate system utility functions. The code is trying to run (via exec) either 'zip' or 'gzip' against a database export, and download it to your PC. You can certainly do this manually, or even write a shell script to do it with a single command. You might want to first talk to your host and see why they are banning exec(), and what they would suggest for accomplishing the task of backing up your database and downloading it to your PC. Perhaps they even have some tools already available for this, that could even be run on a cron job (task scheduler)!

 

Since the exec() call seems to be just for zip/gzip, you might even consider skipping this step and modifying the code (PHP) to just download the .sql file directly. It will be noticeably larger than a zipped/gzipped file, but that may be the price to pay for security.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...