{"id":30409,"date":"2023-06-30T07:18:55","date_gmt":"2023-10-09T04:00:18","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/"},"modified":"2025-08-12T19:02:40","modified_gmt":"2025-08-12T11:02:40","slug":"php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/","title":{"rendered":"PHP5.3\u5347\u7ea7\u5230PHP5.4"},"content":{"rendered":"<h1>\u60c5\u51b5\/\u7ecf\u8fc7<\/h1>\n<p>\u5728\u5c06HP\u8fc1\u79fb\u5230WordPress\u65f6\uff0c\u7531\u4e8ePHP\u7248\u672c\u8fc7\u65e7\uff0c\u56e0\u6b64\u5728\u8fdb\u884c\u66f4\u65b0\u65f6\u7684\u5907\u5fd8\u8bb0\u5f55\u3002<\/p>\n<h1>\u73af\u5883<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CentOS 6.6 64bit<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">PHP 5.3<\/ul>\n<h1>\u6b65\u9aa4<\/h1>\n<h2>1. \u9884\u5148\u51c6\u5907<\/h2>\n<h3>1.1. \u68c0\u67e5\u5f53\u524dPHP\u6a21\u5757\u7684\u7248\u672c<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> rpm <span class=\"nt\">-qa<\/span> | <span class=\"nb\">grep <\/span>php\r\n<span class=\"go\">php-mbstring-5.3.3-40.el6_6.x86_64\r\nphp-common-5.3.3-40.el6_6.x86_64\r\nphp-5.3.3-40.el6_6.x86_64\r\nphp-cli-5.3.3-40.el6_6.x86_64\r\nphp-pdo-5.3.3-40.el6_6.x86_64\r\nphp-mysql-5.3.3-40.el6_6.x86_64\r\n<\/span><\/code><\/pre>\n<h3>1.2. \u6dfb\u52a0\u5b58\u50a8\u5e93<\/h3>\n<ul class=\"post-ul\">yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306bius\u3068epel\u3092\u8ffd\u52a0<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> wget http:\/\/dl.iuscommunity.org\/pub\/ius\/stable\/Redhat\/6\/x86_64\/ius-release-1.0-13.ius.el6.noarch.rpm\r\n<span class=\"gp\">#<\/span> wget http:\/\/dl.iuscommunity.org\/pub\/ius\/stable\/Redhat\/6\/x86_64\/epel-release-6-5.noarch.rpm\r\n<span class=\"gp\">#<\/span> rpm <span class=\"nt\">-Uvh<\/span> <span class=\"k\">*<\/span><span class=\"nt\">-release<\/span><span class=\"k\">*<\/span>rpm\r\n<\/code><\/pre>\n<h3>1.3. \u786e\u8ba4\u4ed3\u5e93\u5217\u8868<\/h3>\n<ul class=\"post-ul\">\u30ea\u30dd\u30b8\u30c8\u30ea\u30ea\u30b9\u30c8\u306bius\u304c\u8ffd\u52a0\u3055\u308c\u305f\u4e8b\u3092\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> yum repolist ius\r\n<span class=\"go\">IUS Community Packages for Enterprise Linux 6 - x86_64\r\n<\/span><\/code><\/pre>\n<h2>2. \u5b89\u88c5<\/h2>\n<h3>2.1. \u5220\u9664PHP5.3<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> rpm <span class=\"nt\">-e<\/span> php-mbstring php-common php php-cli php-pdo php-mysql <span class=\"nt\">--nodeps<\/span>\r\n<\/code><\/pre>\n<h3>2.2. \u5b89\u88c5PHP5.4<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>php54-mbstring php54-common php54 php54-cli php54-pdo php54-mysql\r\n<span class=\"go\">Loaded plugins: fastestmirror, refresh-packagekit, security\r\nDetermining fastest mirrors\r\nError: Cannot retrieve metalink for repository: epel. Please verify its path and try again\r\n<\/span><\/code><\/pre>\n<p>\u6211\u60f3\u786e\u8ba4\u4e00\u4e0b\uff0c\u56e0\u4e3a\u6709\u9519\u8bef\u5bfc\u81f4\u65e0\u6cd5\u5b89\u88c5\u3002<\/p>\n<h4>2.2.1. \u5728\u8c03\u8bd5\u6a21\u5f0f\u4e0b\u8f93\u51fa\u9519\u8bef<\/h4>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> <span class=\"nv\">URLGRABBER_DEBUG<\/span><span class=\"o\">=<\/span>1 yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>php54-mbstring php54-common php54 php54-cli php54-pdo php54-mysql 2&gt; \/tmp\/debug.log\r\n<\/code><\/pre>\n<h4>2.2.2. \u8c03\u8bd5\u65e5\u5fd7\u5206\u6790<\/h4>\n<ul class=\"post-ul\">\u30ed\u30b0\u5185\u306b\u4e0b\u8a18\u30a8\u30e9\u30fc\u3092\u78ba\u8a8d<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> <span class=\"nb\">cat<\/span> \/tmp\/debug.log\r\n<span class=\"go\">~\u7701\u7565~\r\n* SSL connect error\r\n<\/span><\/code><\/pre>\n<h4>2.2.3. \u5b89\u88c5\u9644\u52a0\u6a21\u5757<\/h4>\n<ul class=\"post-ul\">\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3053\u3001\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408NSS\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u5fc5\u8981\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5b9f\u65bd<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> yum <span class=\"nt\">--disablerepo<\/span><span class=\"o\">=<\/span>epel update nss\r\n<\/code><\/pre>\n<h4>\u518d\u6b21\u5b89\u88c5PHP5.4\u3002<\/h4>\n<ul class=\"post-ul\">\u4eca\u5ea6\u306f\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f<\/ul>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>php54-mbstring php54-common php54 php54-cli php54-pdo php54-mysql\r\n<\/code><\/pre>\n<h2>\u4e8b\u540e\u786e\u8ba4<\/h2>\n<h3>3.1. \u67e5\u8be2PHP\u7684\u7248\u672c<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> php <span class=\"nt\">-v<\/span>\r\n<span class=\"go\">PHP 5.4.35 (cli) (built: Nov 14 2014 10:04:29)\r\nCopyright (c) 1997-2014 The PHP Group\r\nZend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies\r\n<\/span><\/code><\/pre>\n<h3>3.2. PHP\u6a21\u5757\u9a8c\u8bc1<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> rpm <span class=\"nt\">-qa<\/span> |grep php\r\n<span class=\"go\">php54-cli-5.4.35-1.ius.el6.x86_64\r\nphp54-mbstring-5.4.35-1.ius.el6.x86_64\r\nphp54-common-5.4.35-1.ius.el6.x86_64\r\nphp54-mysql-5.4.35-1.ius.el6.x86_64\r\nphp54-5.4.35-1.ius.el6.x86_64\r\nphp54-pdo-5.4.35-1.ius.el6.x86_64\r\n<\/span><\/code><\/pre>\n<p>\u4ee5\u4e0a\uff01!)<\/p>\n<h1>\u4f5c\u8005\u7684\u9644\u8a00<\/h1>\n<p>\u5728SSL\u9519\u8bef\u5904\u9047\u5230\u4e86\u76f8\u5f53\u7684\u9ebb\u70e6\uff0c\u54c8\u54c8\uff57<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60c5\u51b5\/\u7ecf\u8fc7 \u5728\u5c06HP\u8fc1\u79fb\u5230WordPress\u65f6\uff0c\u7531\u4e8ePHP\u7248\u672c\u8fc7\u65e7\uff0c\u56e0\u6b64\u5728\u8fdb\u884c\u66f4\u65b0\u65f6\u7684\u5907\u5fd8\u8bb0\u5f55\u3002 \u73af\u5883 Cen [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30409","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP5.3\u5347\u7ea7\u5230PHP5.4 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3\u5347\u7ea7\u5230php5-4\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP5.3\u5347\u7ea7\u5230PHP5.4\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3\u5347\u7ea7\u5230php5-4\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-09T04:00:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T11:02:40+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/\",\"name\":\"PHP5.3\u5347\u7ea7\u5230PHP5.4 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-10-09T04:00:18+00:00\",\"dateModified\":\"2025-08-12T11:02:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP5.3\u5347\u7ea7\u5230PHP5.4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PHP5.3\u5347\u7ea7\u5230PHP5.4 - Blog - Silicon Cloud","description":"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3\u5347\u7ea7\u5230php5-4\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"PHP5.3\u5347\u7ea7\u5230PHP5.4","og_description":"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3\u5347\u7ea7\u5230php5-4\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-10-09T04:00:18+00:00","article_modified_time":"2025-08-12T11:02:40+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/","name":"PHP5.3\u5347\u7ea7\u5230PHP5.4 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-10-09T04:00:18+00:00","dateModified":"2025-08-12T11:02:40+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8ePHP5.3\u5347\u7ea7\u5230PHP5.4\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP5.3\u5347\u7ea7\u5230PHP5.4"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php5-3%e5%8d%87%e7%ba%a7%e5%88%b0php5-4%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30409"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30409\/revisions"}],"predecessor-version":[{"id":91602,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30409\/revisions\/91602"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}