by ElfN » 22. December 2010 23:54
I'm more than happy to give you the whole script, though that isn't the problem. The script works perfectly on the online server (link in first post). I've done a search for php.ini and I appear to have only one, though I make changes to it and the changes do not appear in the php info in the xampp panel.
The original install had no problems. I used it for over a year without issue. This one is really baffling me.
Here's the page's code.
<?PHP
include('../inc/dbconnect.inc');
include('inc/settings.inc');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Slippery Critters Gifts </TITLE>
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>
<link rel="stylesheet" href="lightbox/lightbox.css" type="text/css" media="screen">
<LINK REL="stylesheet" HREF="css.php" TYPE="text/css">
</HEAD>
<BODY style="background:#fff url('images/BG.gif');">
<div align=center>
<table width='100%' style='margin:10px;' cellpadding='12' align='center'>
<tr><td colspan='2' style='text-align:center;font-family:comic sans MS;font-weight:bold;border-bottom: black 4px solid;'><span style='font-size:46px;color:green;font-style:italic;'>Slippery Critters</span><p><span style='font-size:28px;color:red;'>Clean fun in the tub!</span></td></tr>
<tr><TD width='200px' valign='top' style='font-size:22px;'>
<p><a href="index.php">Home</a>
<p><a href="index.php?q=policy">Policy</a>
<?php
$result=mysql_query("select distinct(Category) from `SC_Gifts` where `Display`='Y' group by `Category` order by `SortOrder`",$db);
if ($myrow=mysql_fetch_array($result)) {
do {
echo " <p><a href='index.php?q=$myrow[Category]'> $myrow[Category] </a><br>";
} while ($myrow=mysql_fetch_array($result));
}
?>
</nobr>
<p><A HREF='http://ww4.aitsafe.com/cf/review.cfm?userid=64159964' target=_blank>Shopping Cart</a></span>
</td><td class='content'><div style='padding:6px 20px 20px 20px;'>
<?PHP
if (!$i) { //if i
if ((!$q || $q == 'home')) { //outside if
include ('home.htm');
} elseif ($q == 'policy') {
include ('policy.htm');
} else { //2nd if
$qry="select * from `SC_Gifts` where Category = '$q' and Display='Y' order by `SortOrder`";
$ss=mysql_query($qry,$db);
if ($stock=mysql_fetch_array($ss)) {
echo "<h2>".$stock[Category]."</h2>";
$cnt=1;
echo"\n\t\t<table align=center cellpadding=6>";
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<tr>\n\t\t\t<td>";
} else {
echo "<td>";
}
echo "<div class='stock'><a href='index.php?i=$ID'>";
if (file_exists("StoreImages/$tn")) {
echo"<img class=tn id=tn src='StoreImages/$tn'>";
}
echo "<h3>$stock[Name]</h3></a></div>";
if ($cnt == 3) {
$cnt=1;
echo "</td>\n\t\t</tr>\n";
} else {
$cnt++;
echo "</td>\n\t\t\t";
}
} while ($stock=mysql_fetch_array($ss));
if ($cnt==2) {
echo "<td> </td><td> </td>";
} elseif($cnt==3) {
echo "<td> </td>";
}
echo "</tr></table>\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. <span style='color:red;'>$qry</span>");
$is=mysql_query($q2,$db) or die ("Couldn't retrieve header image. <span style='color:red;'>$q2</span>");
$stock=mysql_fetch_array($ss); //Display item
$image=mysql_fetch_array($is); //Header image
; //Image list
echo "<div class='stock' style='width:520px;'>";
if (file_exists("StoreImages/$image[Image]")) {
echo "<img src='StoreImages/".$image[Image]."' align=left hspace=10><br clear=left>";
}
echo "<h3>$stock[Name]</h3>";
echo '<p>';
$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. <span style='color:red;'>$q3</span>");
$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<div style='float:left;width:200px;'>\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<a href='StoreImages/$i_list[Image]' rel='lightbox' title='$i_list[Caption]'><img class=tn src='StoreImages/$TN' border=0 hspace=4 vspace=4 alt='$trun' caption='$i_list[Caption]'></a>\n";
}
}
if ($icnt > 0) {
echo "\n\t\t</div>\n";
}
echo $stock[Description];
echo "<p>";
if ($stock[Price] > '0.00') {
echo "<FORM METHOD=\"POST\" ACTION=\"http://ww4.aitsafe.com/cf/add.cfm\" target=_blank>";
echo "<b>$".$stock[Price]."</b>";
echo "<INPUT TYPE=\"HIDDEN\" NAME=\"userid\" VALUE=\"64159964\">";
echo "<input type=hidden name=return value=slipperycritters.com/index.php>";
echo "<INPUT TYPE=\"HIDDEN\" NAME=\"product\" VALUE=\"" . $stock[StockID] . " " . $stock[Name]. "\">";
echo "<INPUT TYPE=\"HIDDEN\" NAME=\"price\" VALUE=\"" . $stock[Price] . "\">";
echo "<p>Quantity: <input name='qty' type='text' value=1 size=2>";
echo "<p><input type=\"submit\" value=\"buy now\" name=\"add\"></form>";
}
echo "<br clear=all></div>";
} //endif
echo "<div align=center style='margin-top:20px;'><span style=\"background-color:#D8DFDE;color:#006A48;padding:4px;border:1px solid #006A48;\"> <FONT SIZE=-1>Visitors since 09-26-2007 -</FONT> <b>";
include("../inc/HitCounter.inc");
echo "</b> </span></div>";
?>
<p style='font-size:9pt;text-align:center;'>Site design by <a href="http://www.officeelf.com">OfficeElf</a>.
</td></tr></table>
<p align=left style='color:#CDE4CB;font-weight:bold;'><span style='border:1px solid #FFFFFF;padding:4px;background-color:#FFF;margin-bottom:6px;'><IMG SRC="images/NAWBO.jpg" WIDTH="150" HEIGHT="51" BORDER="0" ALT="National Association of Women Business Owners"></span><br>
National Association of<br>Women Business Owners
</div>
</BODY>
</HTML>