Thanks again for replying.
The master value should not be an issue as the scripts will only look at
the local. However, since it uses a local php.ini the phpinfo shows
both the master and local values for session.auto_start as 'on'. I
tried adding session_start(); to the scripts and yes, that does work.
However, it brings up the question...why isn't session.auto_start
working on servers that run suPHP?
I looked into this a little further and it appears that the script is
not respecting the local php.ini for session control and instead wants a
hard php.ini path to look at instead. I put this line in his .htaccess:
suPHP_ConfigPath /home/joedro5/public_html
And it magically started working on both servers that run
suPHP...however, this problem is not reproducible on servers that run
plain old phpsuexec. I think this is worth reporting as a bug or
limitation of suPHP...not an major one, but just something to be aware
of
Thank you so much Greg for your help...I could not have figured this out
without you...I guess sometimes I need a different point of view in
order to push me in the right direction!
Thanks
On Thu, 2008-02-14 at 08:27 +0100, Gregory Agerba wrote:
> Hi Vanessa,
>
> It sounds your session doesn't start.
>
> I took your script, and made some changes to them and tried them over
> my server, which also run over suPHP.
>
> Here are the script :
>
> index.php =
>
> <?php
>
> // Start session
> session_start();
>
> // Check and show if the session is already set or not
> if(isset($_SESSION['msg']))
> {
> $msg = $_SESSION['msg'];
> die($msg);
> }
> else
> {
> $msg = "";
> die('no message');
> }
>
> ?>
>
> <a class="hd4" href="scripts/msgtestscript.php" title="Test Msg">Test
> Msg</a>
>
> msgtestscript.php :
>
> <?php
>
> // Start de session
> session_start();
>
> // Set the message
> $_SESSION['msg'] = "This is the Session Msg";
>
> // Redirect to index
> header("Location: index.php");
>
> ?>
>
> in your phpinfo, the session_start value is set to on on both servers,
> but one doesn't have it a master value, only a local.
>
> Maybe you should check around that.
>
> -------------------------------------------------------------
> Gregory Agerba
> System & network engineer
>
> <mailto:[EMAIL PROTECTED]>
> -------------------------------------------------------------
>
>
> 2008/2/13, Vanessa Vasile <[EMAIL PROTECTED]>:
>
> Hi Gregory,
>
> I'm a system administrator for the webhosting company that
> hosts the site mentioned, and I had already tried enabling
> register_globals and session.auto_start (which is what allowed
> his script to work on another server running php 5.2.5 without
> suPHP). Here are the phpinfo pages of the servers that his
> script does not work on, both of which run suPHP:
>
> http://edge25.inmotionhosting.com/phpinfo.php
> http://biz30.inmotionhosting.com/phpinfo.php
>
> Here are phpinfo files for two servers where the script does
> work, and suPHP is not installed:
>
> http://biz29.inmotionhosting.com/phpinfo.php (5.2.4)
> http://v-nessa.net/phpinfo.php
>
> I'm a PHP programmer myself and even I can't figure this one
> out...the only difference I can see between the servers that
> the script work on and the ones it doesn't is the presence of
> suPHP. Here's the code of the script on the test page, minus
> all the CSS/html stuff:
>
> index.php:
>
> <?php $page_title = "Joe's Test Site";?>
> <?php
> if (isset($_SESSION['msg'])):
> $msg = $_SESSION['msg'];
> else:
> $msg = "";
> endif;
> ?>
>
> <p><a class="hd4" href="scripts/msgtestscript.php"
> title="Test Msg">Test Msg</a></p>
>
>
>
> <td class="msg" align="center"><?php echo "Msg = " .
> $msg; ?></td>
>
> When you click the test link, it executes another page with
> the following code:
>
> <?php
> $_SESSION['msg'] = "This is the Session Msg";
> header("Location: ../index.php");
> ?>
>
> But the session variable is not carried between the two pages.
> However, I wrote another test script that shows the session
> variable being passed when the code is executed within the
> same page, instead of being passed between pages:
>
> <?php
>
> if (empty($_SESSION['sessid'])) {
> $_SESSION['sessid'] = 1;
> } else {
> $_SESSION['sessid']++;
> }
> ?>
>
> Test session, number: <?php echo $_SESSION['sessid']; ?>
> <br />
> <a href="test.php?<?php echo htmlspecialchars(SID); ?>"> click
> to test session save</a>.
>
> http://joedrolet.com/testsite/test.php
>
>
> Thanks,
> Vanessa
>
>
>
>
> On Wed, 2008-02-13 at 20:41 +0100, Gregory Agerba wrote:
>
> > Hi Vanessa,
> >
> > I believe this is not relative to suPHP.
> >
> > Isn't something more relative to register global set to
> > ON/OFF on one of your host, but not on the other one ?
> >
> > Maybe you can also provide us the phpinfo page ?
> >
> > -------------------------------------------------------------
> > Gregory Agerba
> > System & network engineer
> >
> > <mailto:[EMAIL PROTECTED]>
> > -------------------------------------------------------------
> >
> > 2008/2/13, Vanessa Vasile <[EMAIL PROTECTED]>:
> >
> > I was wondering if anyone has any thought about
> > this....
> >
> > There seems to be an issue with suPHP and the
> > passing of session variables between pages. Please
> > see:
> >
> >
> > http://joedrolet.com/testsite/index.php
> >
> > If you click on 'test msg' it should echo the
> > session variable back to where it says 'msg= ' You
> > can see that this works here:
> >
> >
> > http://v-nessa.net/testsite/index.php
> >
> >
> > After testing on numerous servers it appears that
> > the session variable is only NOT being passed when
> > the server runs suphp...all other php configurations
> > are almost identical, as well as the php versions.
> >
> > Is this a bug with suphp, and is there any setting
> > that can correct this?
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > suPHP mailing list
> > [email protected]
> > http://lists.marsching.biz/mailman/listinfo/suphp
> >
> >
> >
>
> Vanessa V.
>
> 888-321-4678
>
> 213-258-4422 (Int'l)
>
> NEW: 24x7 EMAIL and PHONE Technical Support
>
> Did you know?
>
> We'll Build, Update and Promote Your Site for You! Visit
> www.inmotionhosting.com/webdesign
>
> Answers to commonly asked questions, as well as other useful
> tools, can be found at http://support.inmotionhosting.com
>
> How am I doing? Please feel free to email my manager at
> [EMAIL PROTECTED]
>
>
>
>
>
>
> _______________________________________________
> suPHP mailing list
> [email protected]
> http://lists.marsching.biz/mailman/listinfo/suphp
Vanessa V.
888-321-4678
213-258-4422 (Int'l)
NEW: 24x7 EMAIL and PHONE Technical Support
Did you know?
We'll Build, Update and Promote Your Site for You! Visit
www.inmotionhosting.com/webdesign
Answers to commonly asked questions, as well as other useful tools, can
be found at http://support.inmotionhosting.com
How am I doing? Please feel free to email my manager at
[EMAIL PROTECTED]
_______________________________________________
suPHP mailing list
[email protected]
http://lists.marsching.biz/mailman/listinfo/suphp