PDA

View Full Version : Important Pending PHP Upgrade - Advanced Notice



Snowman
07-01-2010, 03:15 PM
PHP 5.3.1 has now been released as stable, however will will be holding off on the introduction of this new version for several weeks to allow clients to upgrade their scripts and php based software to run under the new version.

While we haven't set a date for the upgrades yet we felt that advanced warning and notice was required due to a number of significant changes that php 5.3 introduces.

Most of these changes wont affect most clients however you should be aware of them.

These changes include:

1. The following settings are no longer supported with PHP 5.3.

zend_extension_ts
zend_extension_debug
extension_ts
zend.ze1_compatibility_mode


2. If the php.ini file has no date.timezone setting, it will be given one that matches PHP's best guess about what the correct timezone is. In 5.3.1 all date functions generate warnings when the local timezone has not been explicitly specified.

3. There is currently no version of Zend Optimizer available for PHP 5.3. According to Zend, a version of the Optimizer and Encoder that is compatabile with PHP 5.3 will be released "in the first quarter of 2010". It's possible that PHP scripts encoded with previous versions of Zend Guard will not work with this new version of Zend Optimizer once it is released.

4. The PHP OpenSSL extension no longer supports OpenSSL versions before 0.9.7.

5. PHP 5.3 introduces the E_DEPRECATED and E_USER_DEPRECATED error reporting levels. E_DEPRECATED is included in E_ALL, so many existing manipulations of the PHP error reporting level that attempt to mask warnings will fail to mask out the E_DEPRECATED messages. cPanel will attempt to mask out E_DEPRECATED from error_reporting setting of the main system php.ini file as part of the upgrade to PHP 5.3. You are still likely to see E_DEPRECATED warnings whenever a custom php.ini is used and when legacy scripts manipulates the error_reporting level directly. You may also want to set the display_errors setting in the php.ini file to off. Note that functions marked as deprecated in PHP 5.3 will be removed entirely in PHP 6.0. Silencing the E_DEPRECATED messages should be considered a short term fix. Code that generates these messages must eventually be updated for compliance with PHP 6.0.

6. To help deal with the migration difficulty cause by the E_DEPRECATED changes in PHP 5.3, cPanel includes an optional patch to remove E_DEPRECATED from E_ALL. This patch is intended to be used as a short term fix while legacy code is updated to be made aware of the E_DEPRECATED error level. Applying this patch means that legacy code will not accidentally turn on E_DEPRECATED messages while attempting to silence warnings (the traditional E_ALL & ~E_WARNING setting.) This patch will be selected for inclusion in the build when we upgrade servers to the new release.

7. The following php.ini settings have been marked as deprecated in PHP 5.3. It is recommended that you disable these settings or silence deprecated warnings until you are able to upgrade so warnings will not be generated every time a PHP page is processed.

* define_syslog_variables
* register_globals
* register_long_arrays
* safe_mode
* magic_quotes_gpc
* magic_quotes_runtime
* magic_quotes_sybase

8. The following functions have been marked as deprecated in PHP 5.3. It is recommended that you update any code which uses them or silence deprecated warnings until an upgrade is possible.

* session_register
* session_unregister
* session_is_registered
* define_syslog_variables
* split

9. The ereg extension has been marked as deprecated in PHP 5.3. It is recommended that you update any code which uses this extension or silence deprecated warnings until an upgrade is possible.

10. The mail headers patch is no longer provided with PHP 5.3. Use the mail.add_x_header php.ini directive instead.

11. The following extensions have been removed from PHP 5.3:

* mhash
* pspell
* msql

12. The following extensions are no longer shipped with PHP 5.3 and are now available via PECL:

* ming
* fbsql
* ncurses
* fdf

13. The following new extensions are available with PHP 5.3:

* phar
* sqlite3
* fileinfo
* intl (requires libicu)
* enchant (requires libenchant)


Of these changes the main changes that will affect most people are the removal of register_globals and session_* functions, which will mean a lot of older scripts where a temporary php.ini file is currently being used to keep functions such as register_globals On will no longer work and these scripts will need to be upgraded.

Once we get closer to the time where the upgrades will be performed we will post notices of the upgrades into these forums.

If anyone has any queries regarding the upgrade please respond in this discussion