{"id":834,"date":"2014-10-22T23:59:50","date_gmt":"2014-10-22T23:59:50","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=834"},"modified":"2014-10-22T23:59:50","modified_gmt":"2014-10-22T23:59:50","slug":"upgrade-php-php-5-4-centos-6-remi-repository","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/10\/22\/upgrade-php-php-5-4-centos-6-remi-repository\/","title":{"rendered":"How to upgrade PHP to PHP 5.4 on CentOS 6 from a remi and atomic  repository"},"content":{"rendered":"<p>APPLIES TO:<\/p>\n<p>Parallels Plesk 11.0 for Linux<\/p>\n<p>Instructions:<\/p>\n<p>1. Install epel and remi repositories:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\n# wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm\n# sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm\n\n<\/pre>\n<p>2. Enable remi repository:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# sudo vi \/etc\/yum.repos.d\/remi.repo\n\n<\/pre>\n<p>In the [remi] section of the file, set the &#8220;enabled&#8221; option to 1.<\/p>\n<p>3. Upgrade PHP with this command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum install php\n\n<\/pre>\n<p>Installation of ionCube for PHP 5.4 (optional)<br \/>\n1. Download ionCube:<br \/>\nFor x32:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# wget http:\/\/downloads2.ioncube.com\/loader_downloads\/ioncube_loaders_lin_x86.zip\n\n<\/pre>\n<p>For x64:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# wget http:\/\/downloads2.ioncube.com\/loader_downloads\/ioncube_loaders_lin_x86-64.zip\n\n<\/pre>\n<p>2. Unzip file.<br \/>\n3. Copy ioncube_loader_lin_5.4.so to PHP extensions folder:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# sudo cp ioncube\/ioncube_loader_lin_5.4.so \/usr\/lib\/php\/modules\/\n\n<\/pre>\n<p>4. Set SELinux attributes:<br \/>\n# sudo chcon -u system_u -t textrel_shlib_t \/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so<\/p>\n<p>5. Switch on ionCube in PHP config:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# echo &quot;zend_extension=\/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so&quot; &amp;gt;&amp;gt; \/etc\/php.d\/zend_extensions_psa.ini\n\n<\/pre>\n<p>6. Check functioning of ionCube:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# php -r &#039;phpinfo();&#039; | grep -i ioncube\n\n<\/pre>\n<p>You can also test ionCube Loader by using the helper PHP script &#8220;loader-wizard.php&#8221; that&#8217;s included in the ionCube Loader archive.<br \/>\nPossible issues<\/p>\n<p>1. MySQL server is upgraded with PHP. If, when creating databases, database users or applications fail with MySQL errors such as &#8220;Table mysql.servers does not exist,&#8221; it means that the MySQL server has been upgraded with PHP. This can be fixed with the following command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mysql_upgrade -uadmin -p`cat \/etc\/psa\/.psa.shadow`\n\n<\/pre>\n<p>2. If you see an error message like &#8220;Failed loading \/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so: \/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so: wrong ELF class: ELFCLASS6,&#8221; it means that the the ionCube Loader file has a different OS architecture.<\/p>\n<p>3. If you see an error message like &#8220;Failed loading \/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so: \/usr\/lib\/php\/modules\/ioncube_loader_lin_5.4.so: cannot restore segment prot after reloc: Permission denied,&#8221; it means that SELinux is effective. The SELinux context is wrong on the ionCube Loader file.<\/p>\n<p>4. PHP doesn&#8217;t work in CGI\/FastCGI mode with HTTP Error 500. This can be caused by the existence of directives that are incompatible with PHP 5.4 in the global or domain php.ini file. Here is a list of incompatible directives:<\/p>\n<p>register_globals<br \/>\nregister_long_arrays<br \/>\nmagic_quotes_gpc<br \/>\nmagic_quotes_runtime<br \/>\nmagic_quotes_sybase<br \/>\nallow_call_time_pass_reference<br \/>\ndefine_syslog_variables<br \/>\nhighlight.bg<br \/>\nsession.bug_compat_42<br \/>\nsession.bug_compat_warn<br \/>\ny2k_compliance<br \/>\nsafe_mode<br \/>\nsafe_mode_gid<br \/>\nsafe_mode_include_dir<br \/>\nsafe_mode_exec_dir<br \/>\nsafe_mode_allowed_env_vars<br \/>\nsafe_mode_protected_env_vars<br \/>\nzend.ze1_compatibility_mode<\/p>\n<p>Refer to <a href=\"http:\/\/www.php.net\/manual\/en\/migration54.ini.php for details\" target=\"_blank\" rel=\"noopener\">http:\/\/www.php.net\/manual\/en\/migration54.ini.php for details<\/a>.<\/p>\n<p>Upgrade from Atomic<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# wget -q -O - http:\/\/www.atomicorp.com\/installers\/atomic | sh\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum update php\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>APPLIES TO: Parallels Plesk 11.0 for Linux Instructions: 1. Install epel and remi repositories: # wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm # wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm # sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm 2. Enable remi repository: # sudo vi \/etc\/yum.repos.d\/remi.repo In the [remi] section of the file, set the &#8220;enabled&#8221; option to 1. 3. Upgrade PHP with this command: # yum &#8230; <a title=\"How to upgrade PHP to PHP 5.4 on CentOS 6 from a remi and atomic  repository\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/10\/22\/upgrade-php-php-5-4-centos-6-remi-repository\/\" aria-label=\"Read more about How to upgrade PHP to PHP 5.4 on CentOS 6 from a remi and atomic  repository\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84,86],"tags":[],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-php","category-plesk"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=834"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/834\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}