Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Safemode on-CPanel hosting, no server root access-HOW Do I..


Recommended Posts



I am using virtual hosting (no direct root access, only within my own domains)..and the path to the temp folder for sessions, as I understand it is in the root of the server..which is running in safe mode..


What do I need to add to my config.php &/or sessions.php to have osC reference the temp in the root of my domain, so that (hopefully) I won't see this anymore:



Warning: SAFE MODE Restriction in effect. The script whose uid/gid is 1356/1363 is not allowed to access /tmp owned by uid/gid 0/0 in /home/pearls/public_html/pearlscart/includes/header.php on line 30

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

[end paste]



My host provides the osC as an add on script..so should support..but I've seen posted elsewhere here that hosts will not turn off safemode..and have had no reply from mine (Yet) about turning it off..so please assume I can't.


Thanks for any help



Link to comment
Share on other sites

try saving sessions in mysql.

see pearlcart/includes/configure.php for the setting.




"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites



Many thanks, that was quick fix..


save sessions was set to "default handler".. now is set to MySQL, and error is gone.


For the sake of shortening ppl's reading on the thread..

I'd already posted elsewhere in forums..when creating a /tmp file, and chmod to 755 did not work to remove the error..I setup a /tmp in (virtual) root/ /public_html and includes/ and chmod to 777..which also did not work.


Thanks toolcrazy.


..looks like I might get something done, after all!



Link to comment
Share on other sites

  • 2 weeks later...

All of a sudden out of no where I was receiving a safe mode error in conjunction to the /tmp. sessions directory will not work untill this directory is created.


many thanks for your help on this one - I too had the problem for days and couldn't figure it out by creating the /tmp directory and chmoding it to 777. It did not work for me either. I opened oscommercecart/includes/configure.php and adited to mysql and the error message went away


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




thank you

Link to comment
Share on other sites

I have created /tmp dir and chmod to both 777 and 755, didn't work, so I edited the 'mysql' for STORE SESSIONS and I still get the SAFE MODE error. Any other help?

Link to comment
Share on other sites

Talk to your provider about amending your open_basedir path by adding


/tmp/ to the end.






It's the only other way to get rid of the safe mode errors. It give PHP a /tmp/ dir to store things in. You get the safe mode error becuase OSC is trying to get to the root tmp dir and PHPSafe Mode won't let it.



Link to comment
Share on other sites


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

  • Create New...