Site disappears after reuploading. PHP Safe mode and Error accessing directories.

Permalink
Hi!

I have a test site, where I show my progress to the client. When I upload a new verison (from my local machine, using XAMPP), I just delelte the files and empty the database.

This afternoon I made some stupid things with permissions, which totally broke the online site, so I thought - OK, I'll just delete everything, then reupload my local copy. That's when things went wrong.

I turned off the cache, deleted the cache, tmp and trash folder, uploaded the files, edited the site.php, imported the database, and then...nothing.

It gives me HTTP 500 Error from a browser.
From host's error log I see the following:

[Sat Jun 30 00:53:12 2012] [error] [client 89.134.162.248] PHP Warning:  session_start(): SAFE MODE Restriction in effect.  The script whose uid is 1901 is not allowed to access /tmp owned by uid 0 in /home/wellnesshotelvisegrad.hu/public_html/concrete/startup/session.php on line 32
[Sat Jun 30 00:53:12 2012] [error] [client 89.134.162.248] PHP Fatal error:  session_start(): Failed to initialize storage module: files (path: ) in /home/wellnesshotelvisegrad.hu/public_html/concrete/startup/session.php on line 32


It doesn't make too much sense to me, but I checked, and files/tmp is owned by the same id as all the files (1901)

Please, help me out with this mess.

 
jasteele12 replied on at Permalink Reply
jasteele12
That's because it's not using files/tmp

The script whose uid is 1901 is not allowed to access /tmp

:)
gd42 replied on at Permalink Reply
But why does it want to access an other tmp? It didn't do that before, and it sure doesn't do that on my local copy. There isn't a tmp directory anywhere. I have 2 folders on my ftp: public_html and log.

Any idea what this "SAFE mode restirctions in effect" is? I mean, I'm all for safety, but restricting anybody to view my site seems a bit overkill. It's a site for a hotel. Not even remotely dangerous.
jasteele12 replied on at Permalink Best Answer Reply
jasteele12
I think it was 5.5.2 that started using files/tmp/ for session storage (normally in /tmp) but safe mode can't use that one.

Not sure how you got it to do that (maybe when you deleted files/tmp), but at this point it doesn't really matter.

Put this in your config/site.php and point it wherever directory you want that you own (I'd suggest here):
// Define session.save_path
define('DIR_SESSIONS',
  '/home/wellnesshotelvisegrad.hu/public_html/files/tmp');
gd42 replied on at Permalink Reply
Thanks! Now the site loads, and my error log is filling up nicely...
Various modules stop working.

Somehow I have to figure out what causes this security mode, since it seems to be the cause of all the problems.

Could it be that when I changed the permissions on the public_html folder it somehow corrupted up all the permissions?

Or is it from the hosting service? The strange thing is that the same site works perfectly from my computer, and did work perfectly from the webhost...