Or update an existing installation of php, which will also update all of the other php modules installed:
yum --enablerepo=webtatic update php
If you have not set the default timezone for dates, you will get PHP warnings and in some cases fatal errors (e.g. when using the DateTime object). PHP will by default use the system’s timezone if not a fatal error, however either in your application or the php.ini, you should set the setting date.timezone. It’s more ideally set in the application, which should be aware of it’s own timezone setting.
Once you are running the new version, you may get “deprecated” errors in your error logs. This isn’t bad, it just means to tell you that some of the functions you are using are no longer prefered, and may be removed in a future major release. An example of this is the ereg functions. Preg functions are prefered over these, as they are much faster and more powerful, and in all cases do at least the same thing.
If upgrading the functions are not an option, and you would like to hide the deprecated errors from your error log, for example on a production server, just edit your /etc/php.ini file, find the line:
error_reporting = E_ALL
and replace to:
error_reporting = E_ALL & ~E_DEPRECATED
I am also maintaining a PHP 5.2.17 release, so should you prefer to install that (for reasons like incompatibilities or testing), you can force it to install that instead by doing: