You are here:  » error

Support Forum



error

Submitted by rolli1 on Tue, 2012-11-06 14:26 in

Hi David,
here I post the last few codings of my products.php

  require("html/header1.php");
  require("html/searchform.php");
  require("html/banner.php");
  if (isset($product)) require("html/product.php");
  if (isset($prices)) require("html/prices.php");
  if (isset($related)) require("html/related.php");
  require("html/footer.php");
  header("HTTP/1.0 404 Not Found");
  require("404.php");
  exit();

this produces the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/www/web117/html/reduced/html/header1.php:112) in /home/www/web117/html/reduced/products.php on line 124

what is wrong in this coding?

Regards

Roland

Submitted by support on Tue, 2012-11-06 16:19

Hi Roland,

Be careful here - products.php is still used to return the clean URL versions of the product pages e.g. /product/Product-Name.html so it shouldn't be serving 404 by default, which the code would do in that location if it were not for the positioning of the code. Any PHP header() statement must occur prior to any output being generated, so in general this is any time before

  require("html/header.php");

..in the Price Tapestry scripts.

Note that products.php should be returning 404 for deleted products (see line 404 in the distribution version) so if that is missing; or you're not sure how to include that into your modified version at all just let me know...

Cheers,
David.
--
PriceTapestry.com

Submitted by rolli1 on Tue, 2012-11-06 16:57

Thanks for that...I deleted this 404 thing...

Regards
Roland