Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Server works until basket/session functions used then error 500s


no1muppet

Recommended Posts

Posted

Hi,

Firstly thanks, oscommerce has been really great over the last few years.

 

I've moved server recently and am having problems getting the sessions up and running properly. Any page clicked that involves accounts or adding to the basket brings up a server 500 error. Even a brand new empty templateless version installed fresh off your site does the same.

 

The new server is a redhat appache PHP Version 5.0.5 with register_Globals on and a default tmp folder.

 

I've found that commenting out one function causes the pages to display but I don't think it's entireley solving all the problems. The function is session_write_close(); on line 106 of the includes/functions/sessions.php

 

Our server doesn't display debug information to the browser but I think the correct log is.

 

Premature end of script headers: php, referer: http://www.driftworks.co.uk/catalog/

 

I've read about the obviouse checking for spaces etc before the headers are written but this happens straight out the packet.

 

Any help would be greatly appreciated. I can post links to the site or any more server info needed.

 

 

Session Directory /tmp

Force Cookie Use False

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions False

Recreate Session False

 

 

 

Cheers,

Mike.

:blink:

Posted

I can add products fine and when I click on My Account, I am taken to an HTTPS login/registration page. I see no errors, and nothing looks broken.

 

Can you post the errors you're seeing?

Contributions

 

Discount Coupon Codes

Donations

Posted
I can add products fine and when I click on My Account, I am taken to an HTTPS login/registration page. I see no errors, and nothing looks broken.

 

Can you post the errors you're seeing?

 

Hi the current live version has session_write_close(); commented out in the functions/sessions.php file. The minute this file isn't bodged like this all you get is a server 500 error. Would you say this is an OK thing to leave off?

 

you can see an empty new shop with the error on the same server here. http://driftworks.com/catalognew/ Please note this is live.

 

Another side effect we're getting on the main live site is paypal orders go through twice one propper order and an empty one. I assume this is to do with the session problems.

 

Cheers,

Mike.

Posted

Check in both of your configure.php files and see if the last line reads 'mysql' where indicated, thus storing sessions in the database and not in files. If that entry is empty then make it read 'mysql' and then uncomment the session_write_close function and see what happens.

 

Vger

Posted

There are circumstances where session_write_close() is required. Normally, it's not necessary, but it's possible that the Paypal module you are using requires session_write_close() be called.

 

A HTTP 500 error is a sort of catch all error for when the webserver has a problem. Your host should provide error logs that might give more information on the error. If I were you, I would want to find the source of the error. Commenting out session_write_close() might make the error disappear, but that doesn't necessarily mean it's the cause or fix. You might run into an issue later due to a problem that was never actually fixed.

Contributions

 

Discount Coupon Codes

Donations

Posted

Cheers Alan,

I had to comment the tep_session_close() out aswell as tep_session_save_path() to get it working. Sorry I didn't find that in the search, debugging is disabled on the server so I just get a fat server error 500 page and no details. Looks like thats a safe solution. Just need to have a poke arround and see why 2 paypal orders are being made one empty now.

 

Cheers all,

Mike.

Archived

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

×
×
  • Create New...