Image

Imageandr3 wrote in Imagephp

i need some help [solved]



[fixed]i fixed it, setting the php.ini session.save_path to a subfolder inside my home.. it works now. check http://files.andr3.net/Untitled.php. should work as expected. Thank you all!! :)



I've ran into a problem which i can't solve nor understand.. so i'm gonna need your masterminds to help me out.. if you can. thanks ;)


Description
i'm using php sessions and when i run my site on my computer, it runs smoothly. no problems. but when i uploaded to my host server my session values started to get lost. like, i set a certain variable with a different value, and two pages after (or simply reloads) that value either disappears or returns to the old value..

i ran a few tests, and realised i suspect it was due to a php.ini option.. "register_argc_argv". If i have it On (which i need it to be, since i'm using argv's throughout my website), this "leaks" occur, but if i set it off, it works out fine, apparently.

Test pages
Check out these two pages, the only difference between them is the php.ini. on one it has the register_argc_argv on, and the other has it off.

What does the test page code do?
The code simply starts the session with session_start(), and then print_r()'s the $_SESSION. After that it echo's that it's gonna change a certain session variable's value, and does it. source code is available below.

"How do i test it?"
Just open one at a time, and wait it to load. at first the $_SESSION should be empty, of course. after that, reload a couple of times. it should have the value set after the 1st reload..

anyways, you probably know what i'm asking..
Is there any link between register_argc_argv and how php handles sessions?


Page1 (register_argc_argv ON)
http://files.andr3.net/Untitled.php


Page2 (register_argc_argv OFF)
http://www.andr3.net/Untitled.php
(if you happen to see the variable disappearing, the error is still there after all. i have refreshed it dozens of times, and it's always there)

Here's the page code: http://wwww.andr3.net/Untitled.phps

If you need to have a look at the php_info() page, let me know.

i've searched the web, asked around irc.. and nothing. :-\

Thanks!