Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Darabase backup Error


akyboy

Recommended Posts

Posted

Hi guys,

When i want to backup my db in admin panel, as soon as i click backup i get this error:

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/gzip) is not within the allowed path(s): (/home/kgfloats/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kgfloats/public_html/admin/backup.php on line 443

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/bin/zip) is not within the allowed path(s): (/home/kgfloats/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kgfloats/public_html/admin/backup.php on line 444

 

 

Does anybody know how to fix this?

what is the problem here?

 

Tnx!

Posted

google is your friend. :) use this in a google search:

site:www.oscommerce.com/forums "open_basedir restriction in effect. File(/usr/bin/gzip) is not within the allowed path"

 

often times, entering your error message into a google search brings you right to a solution in seconds, rather than waiting for someone to answer your question in the forums.

Posted

tnx!!!!!

 

The code in backup.php only looks if the file/executable of gzip and zip exist to determine if you can zip or gzip backups. Unfortunately, the open_basedir stuff was invented after that and while the file exists it won't allow you to use it.

 

The remedy is to make sure backup.php thinks the file is not there. This is a bit hidden IMO, in admin/includes/application_top.php around line 40:

CODE

// Used in the "Backup Manager" to compress backups

define('LOCAL_EXE_GZIP', '/usr/bin/gzip');

define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip');

define('LOCAL_EXE_ZIP', '/usr/local/bin/zip');

define('LOCAL_EXE_UNZIP', '/usr/local/bin/unzip');

 

If you change it (I think this should work) you won't have the problem anymore:

CODE

// Used in the "Backup Manager" to compress backups

define('LOCAL_EXE_GZIP', 'gzip'); // originally: '/usr/bin/gzip');

define('LOCAL_EXE_GUNZIP', 'gunzip'); // originally '/usr/bin/gunzip');

define('LOCAL_EXE_ZIP', 'zip'); // originally: '/usr/local/bin/zip');

define('LOCAL_EXE_UNZIP', 'unzip'); // originally: '/usr/local/bin/unzip');

Archived

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

×
×
  • Create New...