PHP 5.3 Fixing with old version... Problems...
Hi all,
My host has recently upgraded PHP to 5.3 without telling me and a site I look after is now just a blank screen.
I followed the instructions here to fix it and now the site is active again.
However, the admin side is still down with the following errors:
Code:
Deprecated: Assigning the return value of new by reference is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/functions_email.php on line 161
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/sessions.php on line 108
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/sessions.php on line 108
Deprecated: Function ereg_replace() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/sessions.php on line 112
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Deprecated: Function eregi() is deprecated in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/classes/language.php on line 100
Warning: Cannot modify header information - headers already sent by (output started at /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/init_includes/init_templates.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/functions/general.php on line 21
(admin directory name changed for security)
Any ideas on how to fix this problem? It is driving me mad!!!
Kevin
Re: PHP 5.3 Fixing... Problems...
This isn't going to be a problem just for Zen Cart, it will be a problem for a large proportion of PHP applications.
In PHP 5.3 a number of functions and language constructs that have been around for a long time have been completely withdrawn. The withdrawal of this backwards compatibility will break applications.
Zen Cart users will get off relatively lightly compared to some since there is both an active team developing a release (1.3.9) that will address this, and an active forum to help with specific issues.
There is a specific list of removed features and the alternatives to use instead on the php site. I'm afraid that in the immediate term the approach you will need is probably to follow the deprecation errors you receive (which each have the file and line number) and apply the alternatives given, much as you did for the other side of your site.
I'd also recommend considering switching from a web host who drops you in it with no warning and, it appears, takes no preventative steps before upgrading to a version of PHP which is widely known to create problems.
Re: PHP 5.3 Fixing... Problems...
Quote:
Originally Posted by
kuroi
Zen Cart users will get off relatively lightly compared to some since there is both an ctive team developing a release (1.3.9) that will address this, and an active forum to help with specific issues.
I'd also recommend considering switching from a web hots who drops you in it with no warning and, it appears, no preventative steps by upgrading to a version of PHP which is widely known to create problems.
The developers of php have created problems for lots of different software out there with these untimely changes.
As regards web hosts, I have recently changed hosting companies and whilst looking for alternatives, many of those were already running on version 5.3 now. Trouble is there are a lot of rogues out there in the web hosting world, so many folks will want to stick with their existing web hosting company.
Good to hear that work on 1.3.9 is in progress. Many of us will be running on the 1.3 series for quite a while after 2.0 is released, to enable templates and add ons to become available., so this cure for the php 5.3 changes is very welcome. :yes:
Re: PHP 5.3 Fixing... Problems...
Quote:
Originally Posted by
AUTOMOBILIA
As regards web hosts, I have recently changed hosting companies and whilst looking for alternatives, many of those were already running on version 5.3 now. Trouble is there are a lot of rogues out there in the web hosting world, so many folks will want to stick with their existing web hosting company.
That's a fair point. There are hosts who simply switch to the latest version automatically without necessarily understanding the implications (though that's still better than those who keep running with very old versions arguing that they're stable and ignoring the security implications), and a lot of resellers who are simply swept along with whatever the real hosting provider behind them does.
If there is a safe haven from this type of problem then it would be with the Zen Cart certified hosts. The two that I am in regular contact with are both well-briefed on the 5.3 issues and their implications for Zen Cart.
Re: PHP 5.3 Fixing... Problems...
OK, so I have managed to sort out the eregi and ereg_replace errors but I have no idea how to fix the others such as session_start(). Anyone have any ideas?
Kevin
Re: PHP 5.3 Fixing... Problems...
You don't fix the session_start as such, that's a symptom rather than a cause. Instead if you remove the ampersand ("&") referred to in the previous deprecation error, then session_start issue should just go away.
Re: PHP 5.3 Fixing... Problems...
Brilliant, removed the & and now works!! Thanks for your help.
Re: PHP 5.3 Fixing... Problems...
Re: PHP 5.3 Fixing... Problems...
Thanks to the Zen team for making this patch available. :smile:
Great work folks.
Re: PHP 5.3 Fixing... Problems...
If I go to Tools > Server Info, I see that the current PHP version is not 5.3 yet.
I asked my host and they said they will eventually upgrade to 5.3 but did not give a specific date.
Question: if I apply the patch now to avoid any downtime whenever my host will decide to upgrade, will the patch work with prior PHP versions?