php not working post-wamp installation
Posted by: jcstevens (---.meditech.com)
Date: June 10, 2010 02:12PM

I went from a hand-built wamp server to using WampServer. The problem that I am having is with my php pages (with html embedded). They are breaking and showing php code as printed text at the same point on each page. I have tried editing the code to no avail and I'm sure I'm missing something simple. Any help would be appreciated!!

The point at which my pages are breaking looks like this:

************************************************************
// Select the fields from the appropriate tables

print "<br><br>
<a name=\"laptops\"></a>
<font color=\"#009933\" size=\"+2\">Loaner Laptops</font>";

$query =
"SELECT laptopName, laptopModel, serialNum, ename, date, powercord, comment from laptop
where ename = '' or ename is NULL
ORDER BY laptopName, laptopModel";

$result = mysql_query($query);

// Determine the number of records returned
$number = mysql_numrows($result);

// Print the relevant information

print "<form action=\"Loanersubmit.php\"
************************************************************

Everything from Loaner Laptops (on line 5 as layed out in this post) up to the <form tage is showing as printed text on the php output in the browser.

I did notice a warning in phpmyadmin that my PHP MySQL library version 5.0.51a differs from MySQL server version of 5.1.36, so I installed 5.0.51a but that did not resolve this issue.

I'm sure it is something silly like deprecated tags or something, but I need some help!

Thanks,
Johnny

Options: ReplyQuote
Re: php not working post-wamp installation
Posted by: yfastud (Moderator)
Date: June 10, 2010 02:15PM

use full tag <?php ... ?> or enable short_open_tag through wamp tray icon

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: php not working post-wamp installation
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 10, 2010 02:15PM

maybe its just <? and not <?php


left click wamp> php> settings> short_open_tags

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: php not working post-wamp installation
Posted by: jcstevens (---.meditech.com)
Date: June 10, 2010 03:00PM

Awesome!!! Thank you so much for the quick responses... that is exactly what the issue was.

Options: ReplyQuote


Sorry, only registered users may post in this forum.