php-windows Digest 1 Dec 2005 20:57:14 -0000 Issue 2842

Topics (messages 26557 through 26563):

PHP not returning variables!
        26557 by: Matt Firth
        26558 by: Jay Blanchard
        26559 by: Matt Firth
        26560 by: Jay Blanchard
        26561 by: Matt Firth
        26562 by: Jay Blanchard

Access violation
        26563 by: Fawaz Shareef

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi,
I have PHP 5 and Apache 1.3 on Windows 98. Its running OK, but whenever a 
global is specified in the address, it is not passed on to the script.

For example:
"Page.php?var=value" produces the same document as just "Page.php" when they 
should produce different documents.

I know it is not a bug in my script as I've had the script running fine on 
my other server (PHP5, Apache 2.0, Windows XP Pro)

Any suggestions?

Many thanks in advance,
Matt Firth. 

--- End Message ---
--- Begin Message ---
[snip]
For example:
"Page.php?var=value" produces the same document as just "Page.php" when they

should produce different documents.

I know it is not a bug in my script as I've had the script running fine on 
my other server (PHP5, Apache 2.0, Windows XP Pro)
[/snip]

You have echo'd $_GET['var'] and was the proper value?

--- End Message ---
--- Begin Message ---
Thanks for the reply :)
That works fine. But its wierd how the old code doesnt work on my new 
server.

Before, the following code worked fine when requesting 
"test.php?var=myvalue"

<?
global $var;
echo $var;
?>

But on the new server it doesnt, it produces a blank page. The following 
however, does work.

<?
echo $_GET['var'];
?>

Any idea why there acting differently?

Matt :)

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> [snip]
> For example:
> "Page.php?var=value" produces the same document as just "Page.php" when 
> they
>
> should produce different documents.
>
> I know it is not a bug in my script as I've had the script running fine on
> my other server (PHP5, Apache 2.0, Windows XP Pro)
> [/snip]
>
> You have echo'd $_GET['var'] and was the proper value? 

--- End Message ---
--- Begin Message ---
[snip]
But on the new server it doesnt, it produces a blank page. The following 
however, does work.

<?
echo $_GET['var'];
?>

Any idea why there acting differently?
[/snip]

Yep, because register_globals (in the php.ini--if you change it make sure to
restart your web server so that ther settings take effect) is 'off' in the
new server. This is the recommended practice. As I understand it there will
ot even be a register_globals setting in PHP6.

--- End Message ---
--- Begin Message ---
ahh! Thanks :D
Well, I may aswell edit my scripts now if they may need editing in the 
future anyway for PHP6.

Many Thanks!
Matt.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> [snip]
> But on the new server it doesnt, it produces a blank page. The following
> however, does work.
>
> <?
> echo $_GET['var'];
> ?>
>
> Any idea why there acting differently?
> [/snip]
>
> Yep, because register_globals (in the php.ini--if you change it make sure 
> to
> restart your web server so that ther settings take effect) is 'off' in the
> new server. This is the recommended practice. As I understand it there 
> will
> ot even be a register_globals setting in PHP6. 

--- End Message ---
--- Begin Message ---
[snip]
ahh! Thanks :D
Well, I may aswell edit my scripts now if they may need editing in the 
future anyway for PHP6.
[/snip]

That is a good plan for more reasons than that! There have been many a holy
war over the register_globals issue.

--- End Message ---
--- Begin Message ---
Hi,
 
I have installed php 5.1.1, IIS 5 and MySQL 4.1.7 and I am getting the
following error every now and then.
 
"PHP has encountered an Access Violation at 77FCCAAF"
 
Sometimes I am able to view php files but most of the times I get this
error and php hangs. Can anyone help
 
Fawaz
____________________________________________________
Learn real skills for the real world - Apply online
at http://www.ucol.ac.nz or call 0800 GO UCOL
(0800 46 8265) or txt free 3388 for more information
and make a good move to UCOL – Universal College of
Learning.

Enrol with a public institute and be certain of your
future
____________________________________________________

--- End Message ---

Reply via email to