#22760 [Opn->Bgs]: Echoing Problems
| From: | sniper@php.net | Date: | Tue, 18 Mar 2003 17:34:37 +0000 |
| Subject: | #22760 [Opn->Bgs]: Echoing Problems | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35848@lists.php.net to get a copy of this message | ||
ID: 22760
Updated by: sniper@php.net
Reported By: dud_boi at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Windows Server 2003 RC2
PHP Version: 4.3.1
New Comment:
user error.
Previous Comments:
------------------------------------------------------------------------
[2003-03-18 08:12:13] andrew@php.net
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
------------------------------------------------------------------------
[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] andrew@php.net
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