no1muppet Posted March 14, 2006 Posted March 14, 2006 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:
kgt Posted March 14, 2006 Posted March 14, 2006 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
no1muppet Posted March 14, 2006 Author Posted March 14, 2006 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.
AlanR Posted March 14, 2006 Posted March 14, 2006 Read through this: http://www.oscommerce.com/forums/index.php?showtopic=184484 It may be the problem. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
♥Vger Posted March 14, 2006 Posted March 14, 2006 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
kgt Posted March 14, 2006 Posted March 14, 2006 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
no1muppet Posted March 14, 2006 Author Posted March 14, 2006 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.