Welcome Guest | Login

Problem deploying php scripts - maybe something I need to do about php sessions?

I'm trying to install a PHP-based search script on my site, which I used at my old host. The search works fine here, but I can't log in to the admin page in order to request an index update. I posted the issue on their forum. First someone said php can't be in safe mode, but I checked php config here and it's not in safe mode. Then someone said the login uses session-based authentication. That was interesting, because I'm having another problem with a little script I wrote to capture form data and that's not working either, and that uses sessions.

Is there something someone can suggest I should check to make sure my session-based PHP scripts work properly when I move them here? It's been quite awhile since I've done PHP set-up. Thank you.

2007-09-19 09:23 AM

Hi,

Session based php scripts are working fine on the sever. I have tried the following script to test this.

<?php
session_start();  
if(isset($_SESSION['views']))
   $_SESSION['views'] = $_SESSION['views']+ 1;
else
   $_SESSION['views'] = 1;

echo "views = ". $_SESSION['views'];
?>
It's working fine for me. I have tested this on the same server you are on.

2007-09-19 02:05 PM

Thank you very much for testing. I don't know what's going on. I'll see if there's some other way to run the search indexer from the command line, and I'll find some replacement for the other script.

It's probably not worth spending too much time dealing with my legacy PHP stuff, since I want to get back to working on my Rails applications!

Moving multiple Web sites to a new server is such a pain. But I'll be glad when I'm all moved in here.

2007-09-19 08:30 PM

The search script is working now, I looked at the code, and it was using <? instead of <?php when I added the php, I was able to log in. In case anyone else moving a site here has the same problem, I figured I'd post the solution.

2007-09-19 10:32 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!