Re: weird behaviour of Sessions directory on MediaTemple (dv) host
- From: internet@xxxxxxxxx
- Date: Fri, 30 Nov 2007 10:09:24 -0800 (PST)
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.
On Nov 30, 1:48 am, inter...@xxxxxxxxx wrote:
i just migrated my Oscommerce based site from mediatemple GS plan (a
shared hosting) to a DV plan (virtual private/dedicated)
the new url is:http://72.47.210.90/
the new server installs CentOS 4.4 (more specs herehttp://kb.mediatemple.net/article.php?id=239)
the server's FS looks like this:
* drwxrwxrwx --- tmp
* ....
* drwxr-xr-x --- usr
* drwxr-xr-x --- var
o tmp
o ...
o www
+ html
+ ...
+ vhosts
# ...and so on...
+ ...
o db
o ...
o lib
and so on.....
at first, I saw the session was not working properly, and i was
getting warnings from the application (Warning: The sessions directory
does not exist)
I then tried to create TMP folders everwhere (www, vhost,
domainname.com, httpdocs ), always giving chmod 777, right owner, and
eventually changing the session.save_path accordingly, but always with
same error.
Later i did more test, and i realized the session files are actually
created in the right folder when the pages load, but:
the main problem is:
1. a new session file is created on every page reload, so the session
information are not kept between one page an another
plus, other strange details which are not creating problems directly,
but may be related:
2. is_dir() function doesnt see the session folder path
[is_dir('/var/www/vhosts/mydomain.com/tmp') returns FALSE]
3. for testing, i tried to printout the dir structure from within php:
while (false !== ($file = readdir('./'))) {
if ($file != "." && $file != "..") {
echo "$file\n";
}
}
on other servers it will return the folder content, eg:
html
cgi-bin
.htaccess
while on this server i get nothing, just like i was on the root of the
server!
mediatemple is not answering on this, and i am lost!
could anyone enlighten me?
.
- References:
- Prev by Date: Re: mounted NFS blocks "forever"
- Next by Date: pppd call problem
- Previous by thread: weird behaviour of Sessions directory on MediaTemple (dv) host
- Next by thread: connecting internet using N73 to my pc(suse 10.2)
- Index(es):
Relevant Pages
|