On 12-29 09:59, Miles Thompson wrote:
> Sean,
>
> What's going on in incl.php. Are you issuing a session_start()?
No, I was not.
> What if it's rearranged like so, as I understand you have to register the session
>variable
> before using it.
>
> include("incl.php");
> session_start();
> session_register("mine");
> $mine++;
> echo $mine;
No dice, either. Actually, I had tried several permutations of the order before
posting. :)
>
> There's the divide and conquer approach too. What do you see if you comment out the
>include,
> then issue a phpinfo() and a die()?
Okay, I tried commenting out include, resulting in this code:
session_start();
session_register("i");
$i++;
echo $i;
When I run the above, I get this:
Fatal error: Failed to initialize session module in
/usr/local/apache/htdocs/sesstest.php on line 6
Which is getting somewhere, in a way. Line 6 is session_start();
What part from phpinfo() output were you interested in? Or did you want to
see all of it?
Thanks for the help.
>
> HTH and Merry Christmas / Happy New Year - Miles Thompson
>
> On Friday 28 December 2001 11:26 pm, Sean LeBlanc wrote:
> > I asked this on php-install list, but got no response so here goes...
> >
> > I simply cannot get session to work correctly. Here's the test script:
> >
> > include("incl.php");
> > session_start();
> > $mine++;
> > session_register("mine");
> > echo $mine;
> >
> > incl.php includes code to save/retrieve session information to/from DB. It
> > calles session_set_save_handler at the end.
> >
> > What happens is I get an error because it is trying to read the variable
> > out and I get a DB error, but my session writing routine is never
> > called...I know, because I have a print in there. And of course, the var
> > doesn't increment upon refreshes - it remains 1.
> >
> > I've seen this before, and it was fixed, but I forget how it was done, as I
> > didn't actually implement the solution (I hear and I forget, I do and I
> > remember, I guess). About my system:
> >
> > FreeBSD 4.4
> > Apache 1.3.20
> > PHP 4.0.6
> >
> > Any and all help appreciated.
--
Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome
ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome
One learns to itch where one can scratch.
-Ernest Bramah
Management QOTD:Get hopping on the domain expertise!!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]