echo statement doesn't work
Posted: Mon May 28, 2007 11:11 pm
There is something very bizarre going on here - but I don't know where to start in trying to figure this out.
I have a script that was working fine in the past. Now it dies. but here is the strange thing:
It dies at various different points depending on what I do with the echo statements. For example if I have this:
It is fine (but dies later on)
If i have this:
It dies on that line.
When I say it dies later on, I mean it dies on some other statement further down. For example, in this line, it dies half way through:
how do I know? Because if I break that down into parts, it dies on the first letter d:
None of this makes any logical sense at all, so can anyone shed any light on what on Earth is going on? This is on my own dedicated server, ... hmm, just tried to run phpinfo(), but the script died at that point:
So I put it at the beginning, and it worked.
so - php 5.2.1 on apache/linux
in total it is a very simple script, nothing complicated, dies at around line 95.
Any ideas?
Thanks
Noel
I have a script that was working fine in the past. Now it dies. but here is the strange thing:
It dies at various different points depending on what I do with the echo statements. For example if I have this:
Code: Select all
print "<br>url: ";
print $url;If i have this:
Code: Select all
print "<br>url: ".$url;When I say it dies later on, I mean it dies on some other statement further down. For example, in this line, it dies half way through:
Code: Select all
if($value!="not used")if($hidden!="")$update=$update.',`hidden`=\''.$hidden.'\'';Code: Select all
if($value!="not used"){
echo "if 1<br>\n";
if($hidden!=""){
echo "if 2, ".strlen($update)."<br>\n";
$update.="";
echo "if 2a<br>\n";
$update.=",";
echo "if 2a ,<br>\n";
$update.="h";
echo "if 2a h<br>\n";
$update.="i";
echo "if 2a i<br>\n";
$update.="d";
echo "if 2a d<br>\n";
$update.="d";
echo "if 2a d<br>\n";
$update.="e";
echo "if 2a e<br>\n";
$update.="n";
echo "if 2b<br>\n";
$update.='=\'';
echo "if 2c<br>\n";
$update.=$hidden.'\'';
echo "if 2d<br>\n";
}
echo "if 1b<br>\n";
}Code: Select all
print_r($tags);
print "hello";
phpinfo();so - php 5.2.1 on apache/linux
in total it is a very simple script, nothing complicated, dies at around line 95.
Any ideas?
Thanks
Noel