jacopo Posted November 29, 2007 Posted November 29, 2007 just migrated my shop from mediatemple GS plan (a shared hosting) to a DV plan (virtual private/dedicated) the new site is: http://72.47.210.90/ the server FS looks like this: drwxrwxrwx --- tmp .... drwxr-xr-x --- usr drwxr-xr-x --- vartmp ... wwwhtml ... vhosts...and so on... [*]... [*]db [*]... [*]lib and so on..... as you can see, i have a TMP folder at the FS root. i also have one in /var/ i also tried to create TMP forlders everwhere (www, vhost, domainname.com / httpdocs ), always giving chmod 777 but i always get the same error: "The sessions directory does not exist: /tmp" what am i getting wrong here? where should the tmp folder be placed, under such environment? or should i change the variable to what path? please help! i am loosing sleep on a path string :'( ,immagine when i'll have to do something serious! Expresionario.com | Pura Sub-cultura!
jacopo Posted November 29, 2007 Author Posted November 29, 2007 by doing some testing i found out the following: the session file is actually created correctly under the set session.save_path ("/var/www/vhosts/mydomain.com/tmp" in my case now) the problem is that php is_dir() function doesnt see that path [is_dir('/var/www/vhosts/mydomain.com/tmp') => FALSE] and the session doesnt work correctly, so that a new session file is created on every page reload. For the records, we had this platform running on any different type of server and never had this problem (plus it's osc...) Expresionario.com | Pura Sub-cultura!
jacopo Posted November 30, 2007 Author Posted November 30, 2007 ok, as i didnt receive any reply, i will answer myself, as i finally found the solution: my application (oscommerce) check in php (using is_dir function) the existence of the session directory in order to work. But PHP doesnt see '/' as the server's FS root (the actual '/' ) but as '/var/www/vhosts/mydomain.com/tmp' therefore, in the original settings of the server, php could not find either '/tmp' , '/var/lib/php/session/' nor '/var/www/vhosts/mydomain.com/tmp' as it just couldnt read from the root. I then followed the instruction at http://kb.mediatemple.net/article.php?id=652, and created the '/var/www/vhosts/mydomain.com/tmp' folder, but is_dir('/var/www/vhosts/mydomain.com/tmp') was still returning false. finally, i changed the PHP session settings back to the orginal '/tmp' value; is_dir('/tmp') now doesnt check the actual FS '/tmp', but '/var/www/vhosts/mydomain.com/tmp'; but now i've created it, so it will now return TRUE. Expresionario.com | Pura Sub-cultura!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.