NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Novice - Problems with sessions??


Joined: 04 Oct 2007
Posts: 1
Reply with quote
I'm a novice/beginner. I'm trying to understand why an application that I use in production works just fine running on Apache, but bombs running in PHPEd.

I'm playing with web-cyradm to see if I can make some changes that I'd like. When I bring up the index.php page, it continually redirects..

<?php
if (!defined('WC_BASE')) define('WC_BASE', dirname(__FILE__));
$ref=WC_BASE."/index.php";
if ($ref!=$_SERVER['SCRIPT_FILENAME']){
header("Location: index.php");
exit();
}
?>

That block of code seems to be responsible for the issue. It works just fine running on Linux. I can tell that I never get a session and that somehow, that block of code causes the page to redirect continally. Can someone help me out here? I'm on a 30 day eval Smile
View user's profileFind all posts by ErrolDCSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
it's because different web servers and even different configurations of the same server are putting different values in $_SERVER['SCRIPT_FILENAME']. Just try and compare Apache when php is used as CGI with one used as Php For Apache Module (php4apache or php5apache dll) and you'll see totally different stuff there. The same goes for Srv server that comes with PhpED.
If your script depends on the functionality that is available in a particular Apache configuration, I'd highly recommend to start using Apache for your development with PhpED. It's not that hard Smile Basicly Run Mode, URL and Remote Directory in the project properties is all you have to change.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Novice - Problems with sessions??
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic