Page 1 of 1

Probably the dumbest question you'll ever answer

Posted: Thu Sep 10, 2009 4:58 am
by black_hat
I have a fairly complex AJAX/PHP project going and working fine when all of a sudden (and I at first thought it was a cache issue... wasn't) everywhere that PHP was executing would display the echo syntax in plain HTML!

Such that:

Code: Select all

echo '<table class="center"><tr><td class="wForm:>';
createMyList();
echo '</td><td class="wForm">';
createSList();
echo '</td></tr></table>';
 
?>
...would display in the browser:

Code: Select all

'; createSList(); echo ''; ?>
So I thought WAMP was down,
restarted it... nothing.
restarted the system... nothing.

So finally I make a stupid simple PHP page:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html>
<head>
    <!-- some java imports, css -->
</head>
<body>
<?php
echo "Hello World!";
?>
What does it return?

Code: Select all

 "; ?>
Seriously... this is getting me <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> off and I'm losing hours debugging this. Any ideas?

Re: Probably the dumbest question you'll ever answer

Posted: Thu Sep 10, 2009 5:04 am
by Weiry
if you set

Code: Select all

error_reporting(E_ALL);
does that display anything on your basic php page?

Re: Probably the dumbest question you'll ever answer

Posted: Thu Sep 10, 2009 5:10 am
by black_hat
No unfortunately not

Re: Probably the dumbest question you'll ever answer

Posted: Thu Sep 10, 2009 5:21 am
by Weiry
Hmm.. the only other thing i can think of, would be when your browsing the page using a web browser, open the source code through the browser and then check to see how much of your test php page is being outputted.
because it seems that its not recognising only select parts of php code.

Re: Probably the dumbest question you'll ever answer

Posted: Thu Sep 10, 2009 6:12 am
by jackpf
Are you using short tags? What's the entire script?