ID:               22760
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dud_boi at hotmail dot com
 Status:           Open
 Bug Type:         Output Control
 Operating System: Windows Server 2003 RC2
 PHP Version:      4.3.1
 New Comment:

Are you getting an 'undefined variable' error from your code?  $var
must be initialized before you can concatenate to it...

<?php
/* Initialize the var first */
$var = '';
$var .= $_SERVER['HTTP_REFERER']."<br>";
echo $var;
?>

Also, if there is no referer to the page (easily spoofed) or if the
page is loaded directly, it'll return an empty string.

Try that and repost to the report...

~ Andrew Heebner


Previous Comments:
------------------------------------------------------------------------

[2003-03-18 06:08:55] dud_boi at hotmail dot com

oops..i realised why.. anyway, your search page still seems to have
problems

------------------------------------------------------------------------

[2003-03-18 06:07:15] dud_boi at hotmail dot com

Terribly sorry, i realised that sometimes my code just doenst appear. I
have <?php
$var .= $_SERVER['HTTP_REFERER']."<br>";
echo $var;
?>
which i inserted into a file. it doesnt parse the code at all. when i
view source, it acutally appears as is. My other php codes are working
fine.

p.s. when i search for things on the php.net site, if there are
results, they just dont appear

------------------------------------------------------------------------

[2003-03-18 05:50:28] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


------------------------------------------------------------------------

[2003-03-18 05:45:22] dud_boi at hotmail dot com

Sometimes on my site, theres an echo problem, where nothing is being
echoed. Im not sure if its just me, but your search functions seems to
hvaing that problem too..

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22760&edit=1

Reply via email to