I've installed PHP and it is working except for parameters in the URL. I'm aware of the register globals change and am trying to use $_GET to read parameters passed in the url (i.e. http://localhost/~me/test.php?myvar=2). I also noticed that if I register a session, the session url parameter (PHPSESSID) has a new value every time I visit the page. I only have this problem on my laptop, I installed the same software on my server and it works fine there. Here's some info:

Laptop:
PowerBook G4
512 Megs Memory
Mac OS 10.2.2 (Jaguar)
Apache 1.3.26
PHP 4.2.1 (openbase support added)

Server:
Xserve
Dual 1Ghz G4
512 Megs memory
Mac OS 10.2.2
Apache 1.3.26
PHP 4.2.1 (openbase support added)

Here's a code snippet from inside the body tag of test2.php:

{{

<?php

$avar = 50;

$tvar = 60;

$svar = $_GET[ "svar"];
echo "$avar";
echo "test";
echo "$tvar";
echo "test";
echo "$svar";
?>

}}<br><br>

I call this file with:

http://localhost/~mysite/test2.php?svar=2

The resulting page displays:

{{ test60test }}

On my server I access the exact same file with:

http://www.mysite.com/test2.php?svar=2

and get:

{{ test60test2 }}

Notice that it saw the svar assignment. Also note that neither case made the assignment to avar.

I've been trying to resolve this for days. Right now i'm thinking it has to do with using localhost for my local web service. I've tried setting ServerName in the apache config to both localhost and 127.0.0.1 and have had no luck. I need to have my website function when my laptop is not connected to the internet (i.e. no DNS available).

All references to $_GET I find in the archives involve the new register globals default. That isn't the problem i'm having.

I'm quite at a loss now. Any help would be appreciated.

Thanks (a lot) in advance,

---------------------------------
Robert Duran
[EMAIL PROTECTED]
[EMAIL PROTECTED]
---------------------------------

Reply via email to