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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works on PHP IIS not in Apache

Status
Not open for further replies.

CassidyHunt

IS-IT--Management
Jan 7, 2004
688
US
This code works fine on my windows server but I upload to the linux box running apache and nothing.

Any ideas?
Code:
<?php
include("includes/inc_connection.php");

$query = 'select b.miva_code,a.pc_make,a.year,a.category,c.description as "make_desc",a.subcategory,b.condition_code,a.record_id,b.product_cost,b.product_price,a.product_name,b.composite_description,a.prestige,a.hue_code,d.description as "cat_desc",e.sub_desc as "sub_desc",a.filename_tn,a.filename_fs from mastercatalog a, productdetails b, makes c, categories d, subcategories e where a.record_id = b.record_id and c.pc_make = a.pc_make and d.cat_code = a.category and e.sub_code = a.subcategory';
$result = mysql_query($query) or die('Query Failed: ' . mysql_error());
$num = mysql_numrows($result);

$i = 0;

?>


<?php
include("catalogfilterform.php");
$i = 0;
while($i < $num) {
?>
<div id="<? echo mysql_result($result,$i,"miva_code"); ?>" style="display:'block';margin-bottom: 10px;">
	<table class="item_container">
		<tr>
			<td><?  echo mysql_result($result,$i,"miva_code"); ?></td>
			<td colspan="2"><?  echo mysql_result($result,$i,"product_name");  ?></td>
		</tr>
			<td><a href="images/fs/<? echo mysql_result($result,$i,"filename_fs"); ?>"><img src="images/tn/<? echo mysql_result($result,$i,"filename_tn"); ?>"></a></td>
			<td>
				<table class="item_details">
					<tr>
						<td colspan="3"><? echo mysql_result($result,$i,"composite_description"); ?></td>
					</tr>
						<td>Year:&nbsp;&nbsp;<? echo mysql_result($result,$i,"year"); ?></td>
						<td>Make:&nbsp;&nbsp;<? echo mysql_result($result,$i,"make_desc"); ?></td>
						<td>Hue:&nbsp;&nbsp;<? echo mysql_result($result,$i,"hue_code"); ?></td>
					</tr>
						<td colspan="2">Cateogry:&nbsp;&nbsp;<? echo mysql_result($result,$i,"cat_desc"); ?></td>
						<td>Type:&nbsp;&nbsp;<? echo mysql_result($result,$i,"sub_desc"); ?></td>
					</tr>
				</table>
			</td>
			<td>
				<table class="item_price">
					<tr>
						<td>Check Mark</td>
					</tr>
					<tr>
						<td>Price:&nbsp;&nbsp;<? echo mysql_result($result,$i,"product_price"); ?></td>
					</tr>
					<tr>
						<td><input type="button" value="Add To Cart" onclick="toggleDisplay('<? echo mysql_result($result,$i,"miva_code"); ?>')"></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>		
</div>

<?php 
$i++;
}
?>
 
It just never displays anything. I think it is a mysql problem. Its around 1000 records (which should be nothing) but decided to lock up and die.

Thanks for the reply.
 
Found out it was a problem with the way the ISP had the server configured. They reconfigured it and it runs perfect. They said they just reinstalled PHP and Apache but something esle had to happen.

Thanks for the input.

Cassidy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top