Forums / Installing on a Linux/Unix Server / open_basedir restrictions

open_basedir restrictions

Locked

Started by teva on 12 May 2006, 10:26 AM · Views: 19,589

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
12 May 2006, 10:26 AM
#1
teva avatar

teva

Zen Follower

Join Date:
Sep 2004
Posts:
101
Plugin Contributions:
0

open_basedir restrictions

I have found this in many archive post, that has link to some fix. But url is from old forum, so it does not work. Can anyone please show me the right path to get fix for install error on PHP open_basedir restrictions = /home/usr/lib/php:/usr/local/lib/php:/tmp

Also. what does .htaccess in install dir do? I had to rename it so i could get install to work. Otherwise i get internal server error. Why is that?

Tnx

15 May 2006, 9:05 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

The orange "open-basedir" WARNING message is not an error. Installation should proceed fine if you're only getting the warning in orange letters.

If you're getting a PHP error about "foreach basedir" at the top of the System Inspection page, then you need to upgrade to v1.3.0.1 which contains several code fixes.
Latest version is here: http://sourceforge.net/project/showfiles.php?group_id=83781&package_id=171544

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 May 2006, 7:32 PM
#3
cloakendagger avatar

cloakendagger

New Zenner

Join Date:
Apr 2006
Posts:
22
Plugin Contributions:
0

Re: open_basedir restrictions

What if its not in orange but in red with a big "X" next to it. I host from godaddy and im doing an upgrade from 1.27 - 1.3.0.1.

16 May 2006, 7:44 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

cloakendagger:

What if its not in orange but in red with a big "X" next to it. I host from godaddy and im doing an upgrade from 1.27 - 1.3.0.1.

Then it likely suggests a potential problem. Can you post the actual results here?
Does it let you proceed with upgrading?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 May 2006, 8:10 PM
#5
cloakendagger avatar

cloakendagger

New Zenner

Join Date:
Apr 2006
Posts:
22
Plugin Contributions:
0

Re: open_basedir restrictions

PHP open_basedir restrictions = /usr/local/psa/home/vhosts/dakotafiresupply.com/httpdocs:/tmp

It seems to install correctly but Im just wondering if its anything to worry about.

16 May 2006, 8:17 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

In theory, the restrictions list:
/usr/local/psa/home/vhosts/dakotafiresupply.com/httpdocs:/tmp

should contain a subset of your actual path(Path_Translated ), which in theory would be:
/usr/local/psa/home/vhosts/dakotafiresupply.com/httpdocs

In which case, there would be no problem.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jun 2006, 5:59 PM
#7
jeffdm avatar

jeffdm

New Zenner

Join Date:
May 2006
Posts:
14
Plugin Contributions:
0

Re: open_basedir restrictions

DrByte:

In theory, the restrictions list:
/usr/local/psa/home/vhosts/dakotafiresupply.com/httpdocs:/tmp

should contain a subset of your actual path(Path_Translated ), which in theory would be:
/usr/local/psa/home/vhosts/dakotafiresupply.com/httpdocs

In which case, there would be no problem.

Using a similar advice doesn't work on my site. The original open_basedir is:
/tmp:/var/tmp:/usr/local/bin:/usr/local/lib/php:/home/myusername

I put this line in my .htaccess file:
*
php_admin_value open_basedir \
"/home/myusername/mysite.com/www/html/shop:/tmp:/var/tmp:/usr/local/bin:/usr/local/lib/php:/home/myusername"
*

The screeen throws back a "500" error unles I comment out that line in the .htaccess file.

2 Jun 2006, 7:57 PM
#8
sajiepaj avatar

sajiepaj

New Zenner

Join Date:
Apr 2005
Location:
Wales
Posts:
49
Plugin Contributions:
0

Re: open_basedir restrictions

I have the following (in red):
PHP open_basedir restrictions = /home/diyfavou/:/usr/lib/php:/usr/local/lib/php:/tmp

When I try to continue and install I get the following error:

Warning: main(includes/templates/template_default/templates/database_setup_default.php): failed to open stream: No such file or directory in /home/diyfavou/public_html/newstore/zc_install/includes/templates/template_default/common/tpl_main_page.php on line 29

Warning: main(includes/templates/template_default/templates/database_setup_default.php): failed to open stream: No such file or directory in /home/diyfavou/public_html/newstore/zc_install/includes/templates/template_default/common/tpl_main_page.php on line 29

Fatal error: main(): Failed opening required 'includes/templates/template_default/templates/database_setup_default.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/diyfavou/public_html/newstore/zc_install/includes/templates/template_default/common/tpl_main_page.php on line 29

I have installed Zen loads of times, but am stumped with this...

Sara

DIY Favour Boxes
One Eyed Cat
I've been Zenned - how come I still have to think?

2 Jun 2006, 8:30 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

What does your "path_translated" setting show?

Can you post a URL to your zc_install/techsupp.php ?
I'm interested in seeing what your PHP "include_path" is set to.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jun 2006, 8:37 PM
#11
sajiepaj avatar

sajiepaj

New Zenner

Join Date:
Apr 2005
Location:
Wales
Posts:
49
Plugin Contributions:
0

Re: open_basedir restrictions

OOPS - hold on just a minute or two as I'm re-uploading the zen files as we speak....;-)

DIY Favour Boxes
One Eyed Cat
I've been Zenned - how come I still have to think?

2 Jun 2006, 8:47 PM
#12
sajiepaj avatar

sajiepaj

New Zenner

Join Date:
Apr 2005
Location:
Wales
Posts:
49
Plugin Contributions:
0

Re: open_basedir restrictions

OK - now I feel like an idiot, as it has installed like a dream!! I decided to just re-upload all the files, and although I did nothing different it's worked without any errors.

You have no idea how many times I've tried this without success...

Next HUGE problem is to migrate the product database:-((

Thanks for looking anyway - hope I haven't wasted too much of your time.

Sara

DIY Favour Boxes
One Eyed Cat
I've been Zenned - how come I still have to think?

2 Jun 2006, 9:40 PM
#13
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: open_basedir restrictions

There's one thing there that doesn't make sense. They have Safe Mode set to 'Off' on the server, but then they define a path for one of its functions e.g.
PHP Safe Mode= OFF
PHP open_basedir = /home/diyfavou/:/usr/lib/php:/usr/local/lib/php:/tmp

Vger

3 Jun 2006, 3:08 AM
#14
2ewenique avatar

2ewenique

New Zenner

Join Date:
Jun 2006
Posts:
7
Plugin Contributions:
0

Re: open_basedir restrictions

Vger:

There's one thing there that doesn't make sense. They have Safe Mode set to 'Off' on the server, but then they define a path for one of its functions e.g.
PHP Safe Mode= OFF
PHP open_basedir = /home/diyfavou/:/usr/lib/php:/usr/local/lib/php:/tmp

Vger

I've run into the same problem.. If i use the preinstalled fantastico to install Zencart.. no problem... but it only installs 1.3

I'm in the process of trying to upgrade now... getting the same error list just a few posts above in conjuction with the Red X and type in the checker... :(

Reuploading files, going to see if it fixes anything...:down:

3 Jun 2006, 3:48 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

okay, so if the warning is red, what happens when you click the "install" or "upgrade" or "database upgrade" buttons?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Jun 2006, 2:42 PM
#16
bananajoe avatar

bananajoe

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
2
Plugin Contributions:
0

Re: open_basedir restrictions

Hi,
I have the following in red: PHP open_basedir restrictions = /tmp:/usr/share/pear:/home/nas01l/r/revo.co.uk/user
when i get to the system inspection panel while installing zen cart - which seems to be a similar problem as other posts here, but i am not sure how to go about fixing the problem.

In my zc_install/techsupp.php page the PATH_TRANSLATED= "/home/nas01l/r/revo.co.uk/user/htdocs/revostore/zc_install/techsupp.php" and the include_path is .:/usr/share/pear

If i continue to install, zen cart seems to install ok but when viewing the admin and catalog sections there is no style sheet - which i have checked and they are all there on the server and when i view source all pages have links to the style sheets - but nothing... I have also deleted and re-copied (a few times) up live the latest version of zen cart, but still no luck in solving the issue.

Please can someone help - is there any more info i can give to help someone find a solution or let me know what i am doing wrong.

16 Jun 2006, 4:02 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: open_basedir restrictions

bananajoe:

If i continue to install, zen cart seems to install ok but when viewing the admin and catalog sections there is no style sheet - which i have checked and they are all there on the server and when i view source all pages have links to the style sheets - but nothing... I have also deleted and re-copied (a few times) up live the latest version of zen cart, but still no luck in solving the issue.

If the installation completes, but the store and admin aren't loading stylesheets, then either the installer grabbed the wrong path, or the wrong URL was supplied, or your server doesn't like the .htaccess protection settings provided with Zen Cart.

Can you post a copy of your /includes/configure.php file, without the password?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2006, 9:00 AM
#18
bananajoe avatar

bananajoe

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
2
Plugin Contributions:
0

Re: open_basedir restrictions

Heres a copy of the /includes/configure.php file. I did however disable the .htaccess files and this seemed to work - but they are obviously there for a reason, so I assume the server is configured in a way that doesn't like zen cart - my hosting provider is Fasthosts. What would i need to ask them to do to help remedy this? I was on to them to help me out in any way but they said there servers are set up fine to run with zen cart - but being more specific in my request could help this along (Unless there is an easier way you can see - as in have i managed to configure zen cart incorrectly - which seems more than likely):blush:

Anyway thanks for replying/helping

<?php /** * * @package Configuration Settings * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 */ // Define the webserver and path parameters // HTTP_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> define('HTTP_SERVER', 'http://www.revo.co.uk'); define('HTTPS_SERVER', 'https://www.revo.co.uk'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', 'false'); // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! // * DIR_WS_* = Webserver directories (virtual/URL) // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) define('DIR_WS_CATALOG', '/revostore/'); define('DIR_WS_HTTPS_CATALOG', '/revostore/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/'); define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/'); define('DIR_WS_PHPBB', '/'); // * DIR_FS_* = Filesystem directories (local/physical) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/nas01l/r/revo.co.uk/user/htdocs/revostore/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zencart_'); define('DB_SERVER', '213.171.193.146'); // eg, localhost - should not be empty define('DB_SERVER_USERNAME', 're3o5bd'); define('DB_SERVER_PASSWORD', '*****'); define('DB_DATABASE', 'inoxbud'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db' // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/nas01l/r/revo.co.uk/user/htdocs/revostore/cache'); ?>
16 Jun 2006, 11:49 AM
#19
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: open_basedir restrictions

Agh! Now we've gotten to the root of the problem - Fasthosts. Sorry, but you couldn't have picked a worse provider for running a dynamic php shopping cart with.

  1. Their shared ssl (which they charge £45 a year for) doesn't work with Zen Cart.
  2. You can't even opt to buy a full ssl - because they don't allow it.

Vger

16 Jun 2006, 4:02 PM
#20
solihull avatar

solihull

New Zenner

Join Date:
Jun 2006
Posts:
4
Plugin Contributions:
0

Re: open_basedir restrictions

I too have the problem:

Hosting is supplied by 8hosting

Setup Inspection comments in red as follows:

PHP open_basedir restrictions = /home/glassbe:/usr/lib/php:/usr/local/lib/php:/tmp

Heres a copy of the /includes/configure.php file

<?php /** * configure.php * * @package initSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: dist-configure.php 3071 2006-02-27 23:09:54Z drbyte $ * @private */ // Define the webserver and path parameters // HTTP_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> define('HTTP_SERVER', 'http://localhost'); define('HTTPS_SERVER', 'https://localhost'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', 'false'); // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! // * DIR_WS_* = Webserver directories (virtual/URL) // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/'); define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/'); define('DIR_WS_PHPBB', '/phpBB2/'); // * DIR_FS_* = Filesystem directories (local/physical) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); // prefix for database table names define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db' or optionally 'mysql' in some cases // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/enter/your/path/to/public_html_or_htdocs/and/zencart/here/zen/cache'); ?>

Any help would be appreciated.