Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I have purchased a VDH package and need to be able to communicate between sub domain with the $_SESSION array. The system has been build with this is mind. I clarified that it was possible with the VDH service provide before purchase but they have not provided much help in accessing the situation.

I have done much research and following all advice given but cannot get it to work. I have a basic testing setup where one page will set the sessions variable and on another sub domain will output the session. The current result is that the session data is missing but the session ID is the same on bot test pages.

All the domains are on the same box.

Test file one

    $session_name = session_name("er435536311993");
    session_set_cookie_params(0, '/', '');
    $_SESSION['this_is_test'] = 'This was set in the sub domain';
    echo '<pre>';
    echo 'done';

Test file two

    $session_name = session_name("374WEaPW2me1392ZQWLM");
    session_set_cookie_params(0, '/', '');
    echo '<pre>';

Some places have mentioned it may be a permissions error. I have access the httpd.conf file and adjusted the user and group permissions to be the same but still the data is not passed.

From what I can tell all the domains are accessing the same tmp space where the session date is being stored.

Support mentioned that I should disabled suPHP and Euexec to make it work. This did not change the outcome.

I cannot find the solution to my problem anywhere on the net. I have tried all possible solutions I can fine from variations in the PHP code to adjusting permissions.

I have tried some of the shell commands that people mentioned but they have not worked. CMD in the shell is not something that I'm familiar with. I have Putty set up and have tired a few thing via that.

Does anyone one have any ideas? Is there anything I can try? My client is

share|improve this question

Why are you suppressing errors for session_start()? That's exactly where the errors are likely to appear.

Remove the @ symbols and check your php error log.

Also, after the first test, find the session file in your filesystem and add the output of ls -l <session file> and the contents of that file to your question. If that doesn't solve your problem, do the same after the second test.

Session files are usually in /var/lib/php5/ but yours may be different. Check your php.ini if it isn't there.

share|improve this answer
up vote 0 down vote accepted

In the end I found a solution and it worked. I needed to disable suhosin within php. I'm not even sure what suhosin is but it worked.



At the end of the php.ini files sorted it out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.