Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Server upgrade php version from 5.4 to 5.5 now i got error


ddragin

Recommended Posts

Please help me. I have problem after server upgrade php version from 5.4 to 5.5 now i got error on frontpage

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/pakrapro/public_html/index.php:1) in /home/pakrapro/public_html/includes/functions/sessions.php on line 97

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/pakrapro/public_html/index.php:1) in /home/pakrapro/public_html/includes/functions/sessions.php on line 97

 

and i cannot open admin because this error

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/pakrapro/public_html/apsolutni/index.php:1) in /home/pakrapro/public_html/apsolutni/includes/functions/sessions.php on line 97

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/pakrapro/public_html/apsolutni/index.php:1) in /home/pakrapro/public_html/apsolutni/includes/functions/sessions.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /home/pakrapro/public_html/apsolutni/index.php:1) in /home/pakrapro/public_html/apsolutni/includes/functions/general.php on line 38

 

Before upgrade server everything was fine now i`m despired. Please help

Link to comment
Share on other sites

The error messages tell you that both your catalog and admin index.php files are outputting text on line 1. The first thing I'd check is that a hacker hasn't added something to the beginning of both files. Also check that there is not a Byte Order Mark (BOM) at the very beginning of the files and there is not a blank or empty line. If something happened to your index.php files, it's possible that the same thing was done to other files, so look around.

 

If that wasn't it, there should be an error message somewhere -- on the screen or in a log somewhere (such as error_log files). That message would be sent "too early", before osC has finished sending its HTTP headers, and cause the errors you see. You need to see what that "early" text is -- an error message, or a hack, or some garbage such as a BOM.

 

Why this stuff happened on an upgrade to PHP 5.5, I have no idea. Normally a host shouldn't have to touch your PHP files. Maybe you're getting an error message that doesn't involve your files at all, but is saying something about your server configuration.

Link to comment
Share on other sites

If your previous version had output_buffering set to on or 1, or a number like 4096, then it enables you to send headers after the php script has started.  The default is off, so your new version may have replaced the old php.ini.  Untimately, there is an issue in your site, but this can be hard to trouble shoot.  I have found that unset variables, which are all over some scripts can cause that error along with some of the things Phil mentioned.  Often an extra space is the culprit.

 

Make a standalone file with php info and see if your output_buffering is off. 

http://php.net/manual/en/function.phpinfo.php

I'm not really a dog.

Link to comment
Share on other sites

Exactly what osC version are you running? If it was really PHP 5.4 you were running at before (successfully), you must be at a very recent osC version (maybe even 2.3.4, which will also run at 5.5 and 5.6). Are you absolutely sure that it was at PHP 5.4 and not 5.3 or even something earlier? I ask because hosts often will wait to jump a couple (or more) PHP sublevels (e.g., 5.3 to 5.5) rather than go through all the work for just one sublevel (5.4 to 5.5).

 

If it was really an upgrade from 5.4 to 5.5, I suspect that something got messed up with your PHP upgrade. There should be some error messages somewhere, and your host should be in the loop on this. It's possible that you have an add-on or other customization with some obsolete PHP code that works in PHP 5.4 but not 5.5. If the PHP upgrade was from 5.3 to 5.5, and you're running anything earlier than osC 2.3.4, that could be your problem. Anyway, there should be error messages which will give a clue as to what's happening (unless it's something obvious like hacked PHP files).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...