Jump to content

Archived

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

AndreD

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect.

Recommended Posts

I have recently moved shop to another server.

now I get this: (when I press "backup" in admin pages)

-Everything else works fine, as far I know.

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/gzip) is not within the allowed path(s): (/home/helihob:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/helihob/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/helihob:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/helihob/public_html/admin/backup.php on line 444

Share this post


Link to post
Share on other sites
now I get this: (when I press "backup" in admin pages)

-Everything else works fine, as far I know.

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/gzip) is not within the allowed path(s): (/home/helihob:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/helihob/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/helihob:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/helihob/public_html/admin/backup.php on line 444

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:

// 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:

// 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');

Share this post


Link to post
Share on other sites

I have a simmular problem. My error says:

 

JFolder::create: Infinite loop detected

JFTP::store: Bad response

Waarschuwing! - Verplaatsen bestand mislukt

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla/tmp) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/file.php on line 323

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla/tmp/com_events1.4.3RC.zip) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/archive/zip.php on line 127

 

Kan het installatiepakket niet vinden

 

What to do in this case?

I won't mind dutch replies in my personal mailbox. My tech english isn't that great.

 

Thanks in advance,

Best regards,

snelsnel.

Share this post


Link to post
Share on other sites
I have a simmular problem. My error says:

 

JFolder::create: Infinite loop detected

JFTP::store: Bad response

Waarschuwing! - Verplaatsen bestand mislukt

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla/tmp) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/file.php on line 323

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa/home) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local/psa) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr/local) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/usr) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/folder.php on line 363

 

Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/usr/local/psa/home/vhosts/hvspijkenisse.nl/httpdocs/joomla/tmp/com_events1.4.3RC.zip) is not within the allowed path(s): (/var/www/vhosts/hvspijkenisse.nl/httpdocs:/tmp) in /var/www/vhosts/hvspijkenisse.nl/httpdocs/joomla/libraries/joomla/filesystem/archive/zip.php on line 127

 

Kan het installatiepakket niet vinden

 

What to do in this case?

I won't mind dutch replies in my personal mailbox. My tech english isn't that great.

 

Thanks in advance,

Best regards,

snelsnel.

 

maybe you should ask in the joomla forums


Regards

 

Mark A Reynolds

Share this post


Link to post
Share on other sites

Hi,

 

Very fast indeed. I googled a part of the error message and found this page with a simmular question and a working reply!

Therefore: exuse me for posting on the wrong forum, but still it seems like a topic with contributions from members with true knowledge and possibly an answer to my problem.

 

Best regards,

snelsnel.

Share this post


Link to post
Share on other sites
Hi,

 

Very fast indeed. I googled a part of the error message and found this page with a simmular question and a working reply!

Therefore: exuse me for posting on the wrong forum, but still it seems like a topic with contributions from members with true knowledge and possibly an answer to my problem.

 

Best regards,

snelsnel.

 

snelsnel we really shouldn't support that issue here since it has nothing to do with oscommerce but one sugguestion which would get the error "messages" to stop, is to put an @ sign in front of is_file and is_dir on lines 363 and 127. This only supresses the errors. If there are any other issues you really need to go to the correct forum.

 

is_dir would be @is_dir

 

I only provided help because I know the frustration of trying to find the answer

 

oscommerce members, this soultion will work for you as well but i would recommend the method Jan Zonjee used

Share this post


Link to post
Share on other sites

If you are getting open basedir errors, it is usually because you are trying to access a global tmp directory or something (which you are obviously not allowed to do on most shared hosting setups).

 

Usually (almost certainly in osC), if you change your configuration from the standard /tmp to simply tmp, it will work.

 

Rob


Rob Bell - Inspired Graphix

Customising osCommerce in Australia, and the world!

View my profile for web and email links.

 

I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture.

However viewing my profile may provide links to my website or something like that which you may find useful.

Share this post


Link to post
Share on other sites
If you are getting open basedir errors, it is usually because you are trying to access a global tmp directory or something (which you are obviously not allowed to do on most shared hosting setups).

 

Usually (almost certainly in osC), if you change your configuration from the standard /tmp to simply tmp, it will work.

 

Rob

 

In addition, you would need to create the tmp folder in the root (most likly) and change the permissions to 777 on the folder.

Share this post


Link to post
Share on other sites

Even when this forum was not the rigt one for my question, you guys were sure very helpfull.

In this case the problem was due to a serverupgrade.

The solution: at the global configuration of Joomla! change /usr/local/psa/home to /var/www both on server and system tab.

 

Thanks a lot, good luck with your forum.

snelsnel.

Share this post


Link to post
Share on other sites
you are right, that fixed it.

Thank you very much.

 

NO, this is not fixed

this solutions eliminates the error message, but the problem was not fixed

 

this is a path to gzip:

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

this is not a path to gzip:

define('LOCAL_EXE_GZIP', 'gzip');

 

test (with 'zip'):

	  if (file_exists(LOCAL_EXE_ZIP)) {
	echo "<br><b>ZIP (zip vorhanden)</b><br>";
  } else {
	echo "<br><b>NO ZIP (keine Kompression)</b><br>";
  }

 

RESULT: "NO ZIP (keine Kompression)"

 

ZIP works in my account. my templates and modules for websitebaker are zip files and this works fine.

 

I speak with the technicians and looking for a solution.

 

bei beichen

heinerle

Share this post


Link to post
Share on other sites

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:

// 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:

// 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');

 

Thank you very much, i had the same problem, i fixed with your advice.

 

Regards.

Share this post


Link to post
Share on other sites

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:

// 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:

// 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');

 

Gracias de España (Spain)

Share this post


Link to post
Share on other sites

Hello to all,Well I need a huge help from you guys..I really get problem in installing the osecommerce v2.3..please help

 

Well fisrtly I upload all the files in the oescommerce v2.3 using 2 software:

1) Dreamveaver cs5

2) Zymic hosting site

 

Next After uploading all the files,I set all the permissions required..

However When I open the webpage,I get these errors:

 

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../catalog/includes/includes/local/configure.php) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT) in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 25

 

Warning: include() [function.include]: open_basedir restriction in effect. File(../../catalog/includes/includes/configure.php) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT) in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 28

 

Warning: include(../../catalog/includes/includes/configure.php) [function.include]: failed to open stream: Operation not permitted in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 28

 

Warning: include() [function.include]: Failed opening '../../catalog/includes/includes/configure.php' for inclusion (include_path='.:/usr/lib/php') in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 28

 

Warning: require(DIR_WS_FUNCTIONScompatibility.php) [function.require]: failed to open stream: No such file or directory in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 41

 

Fatal error: require() [function.require]: Failed opening required 'DIR_WS_FUNCTIONScompatibility.php' (include_path='.:/usr/lib/php') in /www/99k.org/d/v/d/dvdonline/htdocs/shop/includes/application_top.php on line 41

 

 

Another thing do you know a good web hosting where maybe it will be much easier to install the osecommerce together with the necessary steps thnks;)...

 

Thanks for helping..URGENT REPLIES AND SOLUTIONS REQUIRED!!!

 

Ailine Ng

Share this post


Link to post
Share on other sites

×