Programming -

PHP 5.3.5 업그레이드 - Cent OS 5

글쓴이 : 유광희 날짜 : 2011-02-22 (화) 14:16 조회 : 7097

To install, first you must tell rpm to accept rpm’s signed by me, then add the yum repository information to yum:

rpm -Uvh

Now you can install php by doing:

yum --enablerepo=webtatic install php

Or update an existing installation of php, which will also update all of the other php modules installed:

yum --enablerepo=webtatic update php

If this does not work correctly, try disabling all other repositories while installing/updating, by adding the ?disablerepo=* option. This will stop other dependencies from being installed, so you may want to install them first.

yum --disablerepo=* --enablerepo=webtatic update php

“Depsolving” problems

If you get depsolving problems when updating, you may have currently installed some extensions that have been removed, e.g. php-mhash, php-ncurses.

You will need to remove them before upgrading.

yum remove php-mhash php-ncurses

Deprecated Errors

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

PHP 5.2.14

I am also maintaining a PHP 5.2.14 release, so should you prefer to install that (for reasons like incompatibilities or testing), you can force it to install that instead by doing:

yum --enablerepo=webtatic --exclude=php*5.3* update php

Or you can add to the /etc/yum.repos.d/webtatic.repo the line: