tags:

views:

72

answers:

6

I have 3 blank lines at the beginning of every page that is causing errors of an add-on with stamps.com. (PS I have worked closely with their support team). I can see the lines using firebug, but don't know which file is causing them. I am trying to REMOVE these lines but can't seem to locate them in the header and main_page php files, for templates, common and default folders.

I am using version 1.3.8a of Zen Cart.

The web site is pranajewelry.com

Any suggestions on which files in order of precedence and what special code I should look for?

A: 

I am surprised that those 3 blank lines cause problems with anything.

Anyway, they could be just about anywhere. Look for any lines in your files that aren't within PHP tags. You could have a common include for example that has 3 blank lines at the end of it. It could be anything. Typically, it will be before or after your <?php ?> blocks.

Brad
+1  A: 
  1. Ensure all output buffering is of.
  2. Call headers_sent($file,$line); at a point in time you know you already sent output (doesn't matter where, it can be at the end of the request).
  3. Voilà, $file & $line hold the position where output started.

If the return of headers_sent is true, but $line==0, you'll have to look into auto_prepends.

Wrikken
I'm not familiar with the suggestions above due to my limited coding experience. Further basic information requested on where, how to use above?
Dan
Wrikken
A: 

I'd say those lines would have to be in one of your first includes in your template. Quite possibly you may have whitespace outside of you <?php ?> blocks for your configuration or function include files.

Joel Etherton
I was able to find one of the lines as there was whitespace in the html_header.php file. Still struggling with the additional lines
Dan
@Dan - they will be in similar places. You may want to check all header files and be aware of any line breacks between ?> blocks. Even include files will generate line breaks if they appear outside the ?>.
Joel Etherton
A: 

Locate this in your files in the directory (use search in files) and you will probably find the blank lines

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
Stewie
how do I search for blank lines using Notepad++.
Dan
sorry.. My answer was incomplete.. updated !!
Stewie
This helped get rid of one line. Can't seem to find the other lines
Dan
A: 

hey if you want to remove blank line then replace that web page/s with "notepad++ software". it has advance text processing capability. or remove it with "macromedia dreamweaver 8.0" it has tag replacing options with you can replace blank lines present in all pages in website folder.

paraguma
A: 

Make sure to look after your closing ?> as well. Anything after it will be sent to output; this is actually a good reason why you shouldn't use the closing ?> at the end of your PHP files.

gms8994