Probably the dumbest question you'll ever answer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
black_hat
Forum Newbie
Posts: 9
Joined: Thu Sep 10, 2009 4:48 am
Location: Los Angeles

Probably the dumbest question you'll ever answer

Post 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?
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: Probably the dumbest question you'll ever answer

Post by Weiry »

if you set

Code: Select all

error_reporting(E_ALL);
does that display anything on your basic php page?
User avatar
black_hat
Forum Newbie
Posts: 9
Joined: Thu Sep 10, 2009 4:48 am
Location: Los Angeles

Re: Probably the dumbest question you'll ever answer

Post by black_hat »

No unfortunately not
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: Probably the dumbest question you'll ever answer

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Probably the dumbest question you'll ever answer

Post by jackpf »

Are you using short tags? What's the entire script?
Post Reply