PHP behaving strangely
Posted: 21. December 2010 18:52
I've had an older version of xampp running on my system for over a year. I've uninstalled the old and installed the new ver (1.7.3) and now php doesn't produce the same result.
http://slipperycritters.com/index.php gives me what I would expect for the current state of the programming. On my local system, I get the following (ugly)
Any idea why the php is failing to run? I can go to localhost and pull up phpinfo and it looks okay . . . I think. Ideas?
http://slipperycritters.com/index.php gives me what I would expect for the current state of the programming. On my local system, I get the following (ugly)
Slippery Critters
Clean fun in the tub!
Home
Policy
Shopping Cart
"; $cnt=1; echo"\n\t\t"; do { $ID=$stock[ID]; $this_item_array=mysql_query("SELECT * FROM `SC_Images` where `StockID` = '$ID' and `SortOrder` = '0' limit 0,1"); $this_item=mysql_fetch_array($this_item_array); $img=explode("_", $this_item[Image]); $img=array_reverse($img); $tn=$this_item[ID]."_TN_".$img[0]; $image=$this_item[Image]; if ($cnt==1) { echo "\n\t\t \n\t\t\t "; } else { echo " "; } echo "
"; if (file_exists("StoreImages/$tn")) { echo""; } echo "
$stock[Name]
"; if ($cnt == 3) { $cnt=1; echo " \n\t\t
\n"; } else { $cnt++; echo "\n\t\t\t"; } } while ($stock=mysql_fetch_array($ss)); if ($cnt==2) { echo " "; } elseif($cnt==3) { echo " "; } echo "
\n\t\t"; } } }else { //2nd if $qry="select * from `SC_Gifts` where `ID` = '$i'"; $q2="SELECT * FROM `SC_Images` where `StockID` = '$i' order by `SortOrder` limit 0,1"; $ss=mysql_query($qry,$db) or die ("Couldn't retrieve catalog item. $qry"); $is=mysql_query($q2,$db) or die ("Couldn't retrieve header image. $q2"); $stock=mysql_fetch_array($ss); //Display item $image=mysql_fetch_array($is); //Header image ; //Image list echo ""; if (file_exists("StoreImages/$image[Image]")) { echo "
"; } echo "
$stock[Name]
"; echo '
'; $ex_filter=$image[ID]; $q3="SELECT * FROM `SC_Images` where `StockID` = '$i' and `ID` != '$ex_filter' order by `SortOrder`"; $mi=mysql_query($q3,$db) or die ("Couldn't retrieve images list. $q3"); $icnt=0; while ($i_list=mysql_fetch_array($mi)) { if ($icnt == 0) { // set up a floating div to hold the images? echo "\n\t\t
\n"; } $icnt++; //create and test for thumbnail $iarray=explode("_",$i_list[Image]); $TN=$iarray[0]."_TN_".$iarray[1]; if (file_exists("StoreImages/$TN")) { if ($i_list[Caption] > '') { $trunc = strip_tags($i_list[Caption]); // get rid of the html, because javascript doesn't translate it $trunc = str_replace("'", "'", $trunc); $trun = htmlspecialchars($trunc); } echo "\t\t\t\n"; } } if ($icnt > 0) { echo "\n\t\t\n"; } echo $stock[Description]; echo "
"; if ($stock[Price] > '0.00') { echo "
"; echo "$".$stock[Price].""; echo ""; echo ""; echo ""; echo ""; echo "
Quantity: "; echo "
"; } echo "
"; } //endif echo "
Visitors since 09-26-2007 - "; include("../inc/HitCounter.inc"); echo "
"; ?>
Site design by OfficeElf.
Any idea why the php is failing to run? I can go to localhost and pull up phpinfo and it looks okay . . . I think. Ideas?