Internal Server errors in Cre Loaded 6, SP13.1 after upgrading to PHP 5 & installing SSL

I have been running a CRE Loaded shopping cart since January, and everything was functioning until about a month ago when at around the same time my host upgraded to PHP5 and also installed an SSL certificate for me.

Now, I get sporadic internal server errors when accessing the site.  Sometimes it will load perfectly, other times I won't be able to access any pages within the shopping site.  It can happen on any page, whether in the shop or in the admin panel.  It has been getting much worse within the past 5 days.

The details:
HOST: Network Solutions
CART: CRE Loaded 6.2 Standard, SP 13.1
MODS: Chemo's SEO URLs, dynamic Sitemap, gzip compression, GiftWrap
Server OS: Linux           
Database: MySQL 5.0.45
HTTP Server: Apache/2.2.8 (Unix) FrontPage/
PHP Version: 5.2.5-dev (Zend: 2.2.0)

When I look at my error logs, I see a lot of these "Premature end of script headers: index.php" with varying file names.

I really don't know how to proceed to diagnose this problem.  If someone could help me walk through the process I'd be eternally grateful!

Also, I'm not sure if this is related but my site is recognizing only three distinct IPS in AWStats and my CRE Loaded admin panel (the Who's Online function), despite having had around 600 unique visitors.  This also started when the SSL certificate was installed by Network Solutions.
Who is Participating?
ColebertAuthor Commented:
I solved it, by downgrading my database to MySQL 4 (but ended up staying with PHP 5).  At the same time I also enabled persistent connections in the configuration file, which apparently I hadn't done before.

MySQLi is not enabled but so far I have gotten no errors in my log files!  Plus, the site appears to be working faster.

Thanks for your help guys, next time I will post a more specific question!
Matthew KellyCommented:
First, off, that sucks. From what I have read briefly:

You might want to check with your hosting provider to make sure they are not having other issues. Another possibility is the server is slow and non-responsive at times causing the script to be cut off...

Is there anything programatically common among the script files (such as they are all CRE pages etc)?

If it is happening in the admin panel is it something your hosting provider can see and look at (as most likely the admin panel is controlled by them?)

Can you revert back to PHP4 and no SSL to see if the problem is resolved?
ColebertAuthor Commented:
Thanks for your reply!

After a few more days working on this:

-fiddling with permissions on the various related PHP files has done nothing
-Network Solutions claims no problems, and says that it is a problem with my site's programming not something that's their fault
-turning php error flags on didn't give me any errors
-I only seem to be able to get errors on our very slow work connection, not at home.

I did realize that Network Solutions upgraded mySQL recently, and now mySQLi is not available.  I need to look into this more.

As far as programatically common files, there are a lot.  Many, many files create the web that is a single page.
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

ColebertAuthor Commented:
Actually, they didn't upgrade mySQL, they just didn't install the MySQLi extension.  I suspect this might be the root of the problem...
ColebertAuthor Commented:
Bernard S.CTOCommented:
1 - If they have just added MySQLI without making any change to php, there are "no reason" why your programs might fail suddenly. You might however check with Network Solutions if they have some log information about your transactions.

2 - However, you mention that the logs complain about some script.
<<I see a lot of these "Premature end of script headers: index.php" with varying file names.>>
Could you paste some of these lines here? I would think that there are something like 20% chances that your site is a target for hack attempts, one side result of which will be the saturation of either your site or network solutions'
ColebertAuthor Commented:
If it was a hacking attempt wouldn't the errors come in bursts, or maybe the admin panel would be targeted? I haven't seen any errors show up in the log files from the admin panel (which is strange because I have generated errors while working in there lots of times!)

Here's a chunk of yesterday's log file:

[Tue Jun 24 06:20:53 2008][error] [client] Premature end of script headers: index.php
[Tue Jun 24 08:23:08 2008][error] [client] Premature end of script headers: rss.php
[Tue Jun 24 08:50:07 2008][error] [client] Premature end of script headers: rss.php
[Tue Jun 24 11:56:51 2008][error] [client] File does not exist: /htdocs/pages
[Tue Jun 24 12:50:17 2008][error] [client] Premature end of script headers: product_info.php
[Tue Jun 24 13:53:53 2008][error] [client] Premature end of script headers: product_info.php
[Tue Jun 24 14:14:38 2008][error] [client] Premature end of script headers: index.php, referer:
[Tue Jun 24 15:34:39 2008][error] [client] File does not exist: /htdocs/labella_about.htm
[Tue Jun 24 15:42:36 2008][error] [client] File does not exist: /htdocs/musing.htm
[Tue Jun 24 16:19:31 2008][error] [client] Premature end of script headers: index.php, referer:
[Tue Jun 24 16:24:45 2008][error] [client] Premature end of script headers: index.php, referer:
[Tue Jun 24 16:23:19 2008][error] [client] File does not exist: /htdocs/contactlbv.htm
[Tue Jun 24 16:32:23 2008][error] [client] Premature end of script headers: rss.php
[Tue Jun 24 16:36:09 2008][error] [client] Premature end of script headers: index.php
Bernard S.CTOCommented:
1 - IS MySQLi needed fro CRE-loaded? Since they removed it that might be a hint. I presume most of the other database uses are with MySQL and these should not be affected.

2 - Lines like "File does not exist: /htdocs/musing.htm" are puzzling.
Certainly page /musing.htm does exist, and finding its associated file in htdocs directory seems normal.
But the messages about headers do not mention htdocs.
Is that normal? Visting your site triggered no error message in my browser (but maybe in your logs).

3 - Wandering thru the forums.
-- the basic message and its cause is explained in although this is not totally helpful; from what you said, you know that in some occasions some scripts (presumably Perl ones) are taking too long.
-- something more relevant might be found in where a cre-loaded user has a problem similar to yours and traces it back to his new theme. Did you change theme recently?
-- a fascinating thread is at with lots of possible tracks... but in the end the theme seems to be the critical problem, even if in their case the problem was triggered by google's robots [triggered an invisible problem, not 'created']
ColebertAuthor Commented:
I do believe MySQLi is necessary.  I've talked to my host several times about why they used to have it installed and now don't... their answer was that this extension is not available with PHP 5.
They're temporarily reverting me to PHP 4 & MySQL 4.  Unfortunately they're only supporting PHP 4 until the end of the month, which buys me a little more time to try to figure out what's going on.  However, I'm starting to think they have no clue what they're doing (not that I'm exactly an expert) since a simple google search shows that MySQLi is not PHP4 specific...

I've been combing the forums for both CRE Loaded and OS Commerce, and people seem to have their sites working fine with PHP 5 & MySQL 5!  Of course, there are some people with random isolated problems but a lot of people aren't having issues.

I think my next course of action (after they've reverted me) is to comb through the modifications I've made to see if I've screwed up code anywhere?  Otherwise, I'm going to chalk up these random errors to my host screwing with server configurations.  I really don't want to reinstall the whole cart, since I've put so much time into modifications!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.