Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

open_basedir restriction in effect PROBLEM URGENT


holeyman

Recommended Posts

hI

 

i HAVE THIS MEASSGE AT THE top of THE SCREEN AND CANT SOLVE IT, HAVE I BEING HACKED OR SOMETING BECAUSE IT JUST HAPPEND.

 

Warning: session_save_path(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/militariauk/public_html) in /home/militariauk/public_html/oscommerce/catalog/includes/functions/sessions.php on line 118

 

Warning: Cannot modify header information - headers already sent by (output started at /home/militariauk/public_html/oscommerce/catalog/includes/functions/sessions.php:118) in /home/militariauk/public_html/oscommerce/catalog/includes/functions/general.php on line 1174

 

REGARDS

Anthony

Link to comment
Share on other sites

by default, osCommerce has /tmp in a few settings in the admin/configuration area of the store (sessions, logging, etc). and these need to be changed to match your dir structure.

thus, i would create a dir named tmp at /home/militariauk/tmp and use that path instead of just /tmp. your host may have one already created there.

also, set 'mysql' to the store sessions section of your configure.php files.

Link to comment
Share on other sites

by default, osCommerce has /tmp in a few settings in the admin/configuration area of the store (sessions, logging, etc). and these need to be changed to match your dir structure.

thus, i would create a dir named tmp at /home/militariauk/tmp and use that path instead of just /tmp.  your host may have one already created there.

also, set 'mysql' to the store sessions section of your configure.php files.

 

 

many thanks for answersing , this is driving me mad, its not a hobby but a business and i feel lost , stupid question but where do i create the dir ?

Link to comment
Share on other sites

If, on the last line of both configure.php files you set them to read 'mysql' where indicated then this will store sessions in the database. You won't need to create a 'tmp' folder to store them, and the error message will disappear.

 

Vger

Link to comment
Share on other sites

Hi thanks again

 

This is the configure file it seems to be set to Mysql`already? (on both configure files)

 

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

The Cache function also uses a 'tmp' folder. You should not use Cache on a shared server, so set Use Cache to false also and the error should go.

 

In your configure.php files you should not have use_pconnect set to 'true'

 

Vger

Link to comment
Share on other sites

hi

 

the cache is set to false and stll the same error? one minute it was working and then all these problems out of the blue, cannot understand the problem, please any more suggestions i am desparte.

Link to comment
Share on other sites

then it is how your host has the server configured. i had run into that problem before, took almost a year for the host to actually admit they had the server configured incorrectly.

thus create the tmp dir how i explained earlier, see what happens

Link to comment
Share on other sites

Hi again

 

i have created a folder called tmp in my webspace and changed all cash and sssions settings to /home/militariauk/tmp but still get these errors?

 

Warning: session_save_path(): open_basedir restriction in effect. File(/home/militariauk/tmp) is not within the allowed path(s): (/home/militariauk/public_html) in /home/militariauk/public_html/oscommerce/catalog/includes/functions/sessions.php on line 118

 

Warning: Cannot modify header information - headers already sent by (output started at /home/militariauk/public_html/oscommerce/catalog/includes/functions/sessions.php:118) in /home/militariauk/public_html/oscommerce/catalog/includes/functions/general.php on line 1174

 

Warning: Cannot modify header information - headers already sent by (output started at /home/militariauk/public_html/oscommerce/catalog/includes/functions/sessions.php:118) in /home/militariauk/public_html/oscommerce/catalog/includes/functions/general.php on line 29

Link to comment
Share on other sites

try setting the file permissions to 777 on the tmp dir, should not have to but some hosts have it so you can not access them properly

Link to comment
Share on other sites

is this the problem? where i create this directory, i already made one in the webspace but no luck, please help

 

The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

Link to comment
Share on other sites

thanks for the reply, i changed it here in the admin section under sessions, see belwow, no luck

 

 

 

Title Value Action

Session Directory /home/militariauk/tmp

Force Cookie Use True

Check SSL Session ID True

Check User Agent True

Check IP Address True

Prevent Spider Sessions True

Recreate Session True

Session Directory

Please make any necessary changes

 

Session Directory

If sessions are file based, store them in this directory.

Link to comment
Share on other sites

Warning: session_save_path(): open_basedir restriction in effect. File(/home/militariauk/tmp) is not within the allowed path(s): (/home/militariauk/public_html)

 

This error to me suggests that your access is limited to your public_html directory.

 

Normally, open_basedir is used to limit user access to their /home/ directory and subdirectories by entries in the appropriate <virtualhost> section in apache's httpd.conf file,

 

eg:

php_admin_value open_basedir "usernname/home/"

 

Maybe check with your host how they have configured this to restrict your access?

Link to comment
Share on other sites

how did you set the paths to the referenced /tmp dir locations in the admin/configuration/sessions, logging, etc

 

thanks for the reply, i changed it here in the admin section under sessions, see belwow, no luck

Title Value Action 

Session Directory /home/militariauk/tmp 

Force Cookie Use True 

Check SSL Session ID True 

Check User Agent True 

Check IP Address True 

Prevent Spider Sessions True 

Recreate Session True 

Session Directory

Please make any necessary changes

 

Session Directory

If sessions are file based, store them in this directory.

Link to comment
Share on other sites

THANKS AGAIN

 

 

BELOW ARE SETTINGS FOR SESSIONS, AND THEN SETTINGS FOR LOGGING AND THEN SETTINGS FOR CACHE

 

Sessions

 

Title Value Action

Session Directory /home/militariauk/tmp

Force Cookie Use True

Check SSL Session ID True

Check User Agent True

Check IP Address True

Prevent Spider Sessions True

Recreate Session False

Session Directory

 

Logging

 

Title Value Action

Store Page Parse Time true

Log Destination

Log Date Format

Display The Page Parse Time true

Store Database Queries true

Store Page Parse Time

 

 

Cache

 

Title Value Action

Use Cache true

Cache Directory /home/militariauk/tmp

Use Cache

Link to comment
Share on other sites

Session Directory tmp/

Force Cookie Use False

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions True

Recreate Session False

 

You do not need to store sessions in files in a 'tmp' folder. By editing the last line of both configure.php files to read 'mysql' where indicated sessions are stored in the database and not in files. You would then set Use Cache to 'false' also.

 

Vger

Link to comment
Share on other sites

  • 3 weeks later...

I'm also experiencing this exact problem - i've done a couple of oscommerce store sites before, have gone through cross referencing the config files and admin settings for any similarities or differences. Nothing i can see - very strange.

 

Did anyone suggest anything?

Link to comment
Share on other sites

Hi

I have had exactly the same problem since yesterday, and have searched the forums too.

Eventually I went to look at my webhost's help site, and found the following page:

http://www.supanames.co.uk/support/open_basedir.html

My hosts are Supanames, and have just introduced new security on PHP systems. It threw me as I couldn't process credit card payments on my site as we normally do.

However, having read their article, I have gone back to the OSCommerce Admin for my site, and gone to the Sessions tab. Within this page there is a setting for Session Directory, which was set to just "/tmp". Following the Supanames advice, I have changed this to "/home/gavinorcom/public_html/tmp" and all is now well again!

You will need to substitute your own web name for the "gavinorcom" bit, but the rest should work.

 

Found this on another thread - put the updated pathway into sessions page using my own web name. And it worked a charm. Great stuff.

Link to comment
Share on other sites

  • 2 years later...

Yep.. had to redirect my /tmp folder here using Ilisys servers. Waiting for a tech support reply (it's a Sunday) but I've fixed the problem now.

 

They obviously did an upgrade(?) yesterday/last night and it has created some dramas. Reading the error message carefully actually will tell you what's wrong... it gives the new folder location.

 

Cheers.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...