Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recurring error - please help me fix it!


Guest

Recommended Posts

Posted

Clicking on 'my account' or 'checkout' in the top bar results in this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/maisy/public_html/includes/languages/english.php:340) in /home/maisy/public_html/includes/functions/general.php on line 29

 

 

The relevant (I think...) code in general.php is....

 

////

// Redirect to another page or site

function tep_redirect($url) {

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

}

}

 

header('Location: ' . $url);

 

tep_exit();

}

 

 

(lines 20 - 32)

 

Please help!

 

 

Also, if you know why my top bar and bottom bar stick out so far past 'new products', that'd be a handy piece of information!

 

Shannon

Posted

Hi Shannon,

 

it's your includes/languages/english.php file that is the problem. Most likely you have characters (i.e. a space or a blank line) after the last ?> in the file.

 

If you PM me with a link to your site I could have a look at the other problem for you. Are you running MS2? If so, I have a hunch that this is the php bug that causes partial tags to be served and usually causes the right column/footer to become incorrectly formatted. This can be fixed by commenting out a line in the .htaccess file in the catalog folder.

 

Regards,

 

 

 

Mark

Posted

Hi Patrick,

 

The line in question is this one:

 

# php_value session.use_trans_sid 0

 

The fix is to remove the "#" to uncomment the line. I had to do this on my server as I have yet to upgrade to php 4.3.x, which does not have the problem.

 

There is a bug report or 2 for osc which in turn refer out to php bug reports on this one - I was struggling with my formatting problems for a few hours before I found them!!

 

The purpose of the various bits in the .htaccess file are reasonably well explained by the comments in the file.

 

Cheers,

 

 

 

Mark

Posted

Thanks Mark. I uncommented that line when I was trying to fix my disappearing footer but it actually made it worse so I've commented it out again. Also in the .htaccess file is:

 

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

That suggests that this should be uncommented for an Apache server, but a non-programmer like me wouldn't know what to do to include the parameter, nor what overriding means, etc etc. Should this be uncommented for an Apache webserver?

 

Regards,

 

Patrick

Posted

Hi again,

 

well for the technical explanation of this directive see here:

 

http://httpd.apache.org/docs/mod/core.html...l#allowoverride

 

But I have to say say that I haven't uncommented this on either my server or my laptop (both running apache). In either case, this wouldn't work if I did uncomment it as the filesystem structure on both are different to that assumed (/usr/local/apache/htdocs).

 

I suspect your problem is in a different area then. Happy to take a look if you PM me with a URL....

 

Cheers,

 

 

 

Mark

Archived

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

×
×
  • Create New...