Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

CGI Error when Product Image is selected


Recommended Posts

Hey Guys,


I am new to osCommerce and I have been scouring the forum for an answer to my problem with no luck.


Problem: When you navigate to one of the products it displays the image fine, but when you select the product image to enlarge I get the following error "The specified CGI application misbehaved by not returning a complete set of HTTP headers".


If you want to see this error in action please go here and select the product image: http://www.laralux.com/catalog/product_inf.../products_id/28


I have reviewed the popup image file and product info page and everything looks fine. I will post below for your amusement


Popup Image File

 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License



 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 if (navigator.appName == 'Netscape') i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
<body onLoad="resize();">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>
<?php require('includes/application_bottom.php'); ?>


Product Info Page...I did not include whole page just where the popup handler does its thang :)

if (tep_not_null($product_info['products_image'])) {
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...