Bug with session_start() (php)

Discussion in 'Programming' started by Malek, Jun 30, 2007.

  1. #1
    I have created an online game which has been up and running for about 8 month now. Then suddenly nobody could load anything, there was just a white page. So I tried to see what was wrong, I removed and readded stuff alot until it suddenly worked again. I don't think that I actually changed anything at the end.

    Now the same (or similar) problem has shown up again. This time I've noticed that it is the session_start() that makes it crash. When I comment that line it works. But since it's a game... I need that line...

    I have looked around and seen that it might be if I use the encoding of UTF-8 in my php file, which I am not doing...

    Since I didn't change anything to any file for a while now and then this suddenly happened I really have no idea what it can be.

    Any help would be appreciated:)
     
    Malek, Jun 30, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Place these two lines at the top of your code and see what or if something changes.

    
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    
    PHP:
    Maybe your host upgraded to PHP 5 and your scripts are not compatible.
     
    nico_swd, Jun 30, 2007 IP
  3. Malek

    Malek Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It seems that safe mode is on on the server...

    Warning: session_start() [function.session-start]: SAFE MODE Restriction in effect. ...

    I assume that I can't really change that by myself since I don't own the server and I can't access the php.ini file or am I misstaken? Is there any way that I can fix that by myself? Or to get around it?
     
    Malek, Jun 30, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    I didn't think safe mode would affect sessions as well. Hmm... I guess you could email your hosting and ask them to change that. Sessions are a very basic thing and shouldn't be disabled on ANY host.
     
    nico_swd, Jun 30, 2007 IP
  5. Malek

    Malek Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I checked if it could be that I have no more space to use on the server so I removed lots of files that I don't use. Now I have lots of space left and it's still the same. So I msged the webmaster there and hope he has a good answer:)
     
    Malek, Jun 30, 2007 IP