You had a website and all of the sudden it stopped working? Got the error Deprecated: Function eregi() is deprecated in... (or others similar like 'Deprecated: Function ereg_replace() is deprecated' , 'Deprecated: Function split() is deprecated' or 'Deprecated: Function spliti() is deprecated')
Well, look no further. Your host has upgraded to the latest version of php, php version 5.3 and some of the most common functions have stopped working (wordpress, oscommerce, zencart... most common packages are affected). Why? Because they have been 'DEPRECATED' (which it does mean that they do not exist anymore in the latest version of php).
As a first workaround, you can upgrade your package. But what if your website was heavily customized and upgrading to the latest version is really work-consuming?
Well, you are lucky to be a ComfortHost customer. As always you are ahead on time making your online life more comfortable! We have, of course, upgraded to the latest php. But we have preserved Neptune with an special configuration. In that server, we have coded an special php tweak that makes the most important functions (ereg, ereg_replace, eregi, split, spliti) to work at a lower level than your application. Server wide. This does mean that you do not need to touch anything, if you are in Neptune, your code will work right away with php 5.3.
What if my site is not in Neptune?
Easy: drop us a note in helpdesk and we will move the site to that server for you.
What if I'm not a comforthost customer, can I have this patch?
No. Unfortunately, it is reserved for existing customers. You can, however, signup for a package and try it out under our 30 days money back guarantee at no risk
But why did you take so much trouble, couldn't you leave the server with php 5.2?
It is not wise to keep outdated php versions. They have security flaws that once corrected in the new version, are publicy known because the correction is mentioned on the php 5.3 release. One of the most important security good-practice rule is to always keep server kernel, scripts and languages up-to-date. The hosts that are not updating to avoid trouble to their customers are just delaying the unavoidable by putting the whole server in serious risk of being hacked
Here is the list of deprecated functions in php 5.3:
- call_user_method() (use call_user_func() instead)
- call_user_method_array() (use call_user_func_array() instead)
- ereg() (use preg_match() instead)
- ereg_replace() (use preg_replace() instead)
- eregi() (use preg_match() with the 'i' modifier instead)
- eregi_replace() (use preg_replace() with the 'i' modifier instead)
- set_magic_quotes_runtime() and its alias, magic_quotes_runtime()
- session_register() (use the $_SESSION superglobal instead)
- session_unregister() (use the $_SESSION superglobal instead)
- session_is_registered() (use the $_SESSION superglobal instead)
- set_socket_blocking() (use stream_set_blocking() instead)
- split() (use preg_split() instead)
- spliti() (use preg_split() with the 'i' modifier instead)
- mysql_db_query() (use mysql_select_db() and mysql_query() instead)
- mysql_escape_string() (use mysql_real_escape_string() instead)
- Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.
- The is_dst parameter to mktime(). Use the new timezone handling functions instead.
We only coded the solutions for the most common, however if any of those is affecting you and is not covered already, just let us know and we will be happy to sort you out in no time.