Tom Muck's blog
PHP 5.3 deprecated functions -- Cartweaver PHP 3.1.16 released
Tuesday, September 08, 2009 10:47:28 PM
PHP 5.3.0 has been released, and contains many changes from previous PHP releases. Because of this, we have updated the Cartweaver code to work with this release, and will also allow the code to work on PHP 6.0 as well.
The full list of release notes can be found at http://us2.php.net/migration53.
The main reason for the updated code is the fact that the following functions are now all deprecated in PHP and will throw E_DEPRECATED error messages when used (E_DEPRECATED is a new error message level). The functions are removed in PHP 6:
Deprecated functions:
call_user_method() (use call_user_func() instead)
call_user_method_array() (use call_user_func_array() instead)
define_syslog_variables()
dl()
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)
sql_regcase()
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.
The functions previously used by Cartweaver are ereg(), ereg_replace(), session_unregister(), and split().
There is also a new PHP site devoted to Windows installations at http://windows.php.net/
If anyone has a Cartweaver version pre-3.1.16, you will want to download the latest version and apply the fixes/changes. To download Cartweaver, go to http://www.cartweaver.com/customers and login as a customer. You should see your downloads. If you have not updated a Cartweaver installation, the easiest way is to simply replace the files in the /cw3 folder. If you have made changes to any of the files in your site, the UpdateNotesCW3PHP.htm file details each change to each file showing line numbers and code before/after. I've found Beyond Compare (http://www.scootersoftware.com/) to be a valuable tool for making line-by-line file changes, or comparing directories.
Update: 2009-09-08 6:47pm One thing I noticed on the PHP site is that the Windows ISAPI version of PHP is not supported any more. Hopefully the bugs have been addressed in the CGI versions, as previous versions of PHP were crash-prone when using the old CGI version. Supposedly the new FastCGI version is better.
Category tags: Cartweaver, PHP
Posted by Tom Muck
(Add Comment disabled)
|
View comments (0) |
Permalink
|
Trackbacks (0)
|
Digg This
Before posting comments or trackbacks, please read the posting policy.
Blog RSS feed