Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php 1/2 works

Status
Not open for further replies.

9amwhiskey

IS-IT--Management
Sep 6, 2005
52
US
Got a weird one here....

Installed and configured Apache and PHP on my XP box. Doing the phpinfo() test works, and for the first day of messing around with php pages, it worked no problem....variables echoed properly, etc. Now, for the past 2 days, phpinfo() and other environmental variables display properly, but no other php code does. Can't even assign a variable and display it. If you view the source, you see the script....I'm confused. Anyone have any ideas?
 
Do the files that contain the php scripts have php extensions?

Are the scripts surrounded by php tags like
<?PHP

script...

?>

Are you opening the PHP pages through the webserver, like ?



Other than that, the fact that you can see the script code when you view source means that its not getting sent through the PHP parser.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
actually just following the book's examples. <? and ?>.
 
recent distros require <?PHP. i/e short tags are turned off. i assume for compliance with xml. either use the full tag or turn short_tags back on in php.ini and restart the server.
 
thanks for the input everyone.....it was the short tags. it sounds like i am completely mental, but my newbie php pages worked using short a few days ago. i wish i knew why recently they needed the full tags. ohh well. thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top