{"id":49,"date":"2015-04-02T14:24:03","date_gmt":"2015-04-02T06:24:03","guid":{"rendered":"http:\/\/www.cxybj.com\/?p=49"},"modified":"2016-04-11T15:41:31","modified_gmt":"2016-04-11T07:41:31","slug":"php-yum%e5%8d%87%e7%ba%a75-3%e6%9c%80%e7%ae%80%e5%8d%95%e9%82%a3%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.cxybj.com\/?p=49","title":{"rendered":"php yum\u5347\u7ea75.3\u6700\u7b80\u5355\u90a3\u7684\u65b9\u6cd5"},"content":{"rendered":"<h1 class=\"entry-title\">php yum\u5347\u7ea75.3\u6700\u7b80\u5355\u90a3\u7684\u65b9\u6cd5<\/h1>\n<h1 class=\"entry-title\">PHP 5.3 on CentOS\/RHEL 5.10 via Yum<\/h1>\n<div class=\"entry-content\">\n<p>I have compiled the latest PHP version, 5.3.29, and put it in the Webtatic repository for easy installation. It is compiled for CentOS 5 i386 and x86_64, and the <a href=\"http:\/\/repo.webtatic.com\/yum\/centos\/5\/SRPMS\/\">source RPMS<\/a> are provided in the repo, if anyone wants to compile it for another OS or architecture.<\/p>\n<p><strong>Update 2013-06-20<\/strong> \u2013 Webtatic now has released <a href=\"http:\/\/webtatic.com\/packages\/php55\/\">PHP 5.5.0 for CentOS\/RHEL 5 and 6<\/a><br \/>\n<strong>Update 2012-03-04<\/strong> \u2013 Webtatic now has released <a href=\"http:\/\/webtatic.com\/packages\/php54\/\">PHP 5.4.0 for CentOS\/RHEL 5 and 6<\/a><\/p>\n<\/div>\n<p>To install, first you must install the yum repository information:<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">rpm -Uvh http:\/\/mirror.webtatic.com\/yum\/centos\/5\/latest.rpm<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Now you can install php by doing:<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">yum --enablerepo=webtatic install php<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Or update an existing installation of php, which will also update all of the other php modules installed:<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">yum --enablerepo=webtatic update php<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Packages<\/h3>\n<table>\n<tbody>\n<tr>\n<th>Package<\/th>\n<th>Provides<\/th>\n<\/tr>\n<tr>\n<td>php<\/td>\n<td>mod_php<\/td>\n<\/tr>\n<tr>\n<td>php-bcmath<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-cli<\/td>\n<td>php-cgi, php-pcntl, php-readline<\/td>\n<\/tr>\n<tr>\n<td>php-common<\/td>\n<td>php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib<\/td>\n<\/tr>\n<tr>\n<td>php-dba<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-devel<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-eaccelerator<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-embedded<\/td>\n<td>php-embedded-devel<\/td>\n<\/tr>\n<tr>\n<td>php-fpm<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-gd<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-imap<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-intl<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-ldap<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-mbstring<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-mcrypt<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-pecl-apc<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-pecl-memcache<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-pecl-xdebug<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-mssql<\/td>\n<td>php-pdo_dblib<\/td>\n<\/tr>\n<tr>\n<td>php-mysql<\/td>\n<td>php-mysqli, php-pdo_mysql, php_database<\/td>\n<\/tr>\n<tr>\n<td>php-odbc<\/td>\n<td>php-pdo_odbc, php_database<\/td>\n<\/tr>\n<tr>\n<td>php-pdo<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-pgsql<\/td>\n<td>php-pdo_pgsql, php_database<\/td>\n<\/tr>\n<tr>\n<td>php-process<\/td>\n<td>php-posix, php-sysvmsg, php-sysvsem, php-sysvshm<\/td>\n<\/tr>\n<tr>\n<td>php-pspell<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-recode<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-snmp<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-soap<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-suhosin<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-tidy<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-xml<\/td>\n<td>php-dom, php-domxml, php-wddx, php-xsl<\/td>\n<\/tr>\n<tr>\n<td>php-xmlrpc<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>php-zts<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u201cDepsolving\u201d problems<\/h3>\n<p>If you get depsolving problems when updating, you may have currently installed some extensions that have been removed, e.g. php-mhash, php-ncurses.<\/p>\n<p>You will need to remove them before upgrading.<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">yum remove php-mhash php-ncurses<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>Timezone Errors<\/h3>\n<p>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\u2019s timezone if not a fatal error, however either in your application or the php.ini, you should set the setting date.timezone. It\u2019s more ideally set in the application, which should be aware of it\u2019s own timezone setting.<\/p>\n<h3>Deprecated Errors<\/h3>\n<p>Once you are running the new version, you may get \u201cdeprecated\u201d errors in your error logs. This isn\u2019t 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.<\/p>\n<p>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:<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">error_reporting  =  E_ALL<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>and replace to:<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"bash\">error_reporting  =  E_ALL &amp; ~E_DEPRECATED<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>PHP 5.2.17<\/h3>\n<p>I have previously been maintaining PHP 5.2.* releases, but since it is now end-of-line, there are no security fixes for known critical security issues. I wouldn\u2019t recommend using these anymore because of this, however they are still in the repository for existing users relying on them.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>php yum\u5347\u7ea75.3\u6700\u7b80\u5355\u90a3\u7684\u65b9\u6cd5 PHP 5.3 on &hellip; <a href=\"https:\/\/www.cxybj.com\/?p=49\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,4],"tags":[105],"_links":{"self":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/49"}],"collection":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":1,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cxybj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}