Search

Language:  
Search for:

Available article translations:

How to upgrade PHP to PHP 5.4 on CentOS 6 from a remi repository

APPLIES TO:
  • Parallels Plesk 11.5 for Linux
  • Parallels Plesk Automation 11.1
  • Parallels Plesk Automation 11.5

Instructions:

  • 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
    
  • Enable remi repository:

    # sudo vi /etc/yum.repos.d/remi.repo
    

In the [remi] section of the file, set the "enabled" option to 1.

  • Upgrade PHP with this command:

    # yum install php
    

Installation of ionCube for PHP 5.4 (optional)

- Download ionCube:

For x32:

# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.zip

For x64:

# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
  • Unzip file:

    # unzip ioncube_loaders_lin_x86-64.zip
    
  • Copy ioncube_loader_lin_5.4.so to PHP extensions folder:

    # sudo cp ioncube/ioncube_loader_lin_5.4.so /usr/lib64/php/modules/
    
  • Set SELinux attributes:

    # sudo chcon -u system_u -t textrel_shlib_t /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
    
  • Switch on ionCube in PHP config:

    # echo "zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_5.4.so" >> /etc/php.d/zend_extensions_psa.ini
    
  • Check functioning of ionCube:

    # php -r 'phpinfo();' | grep -i ioncube
    

    You can also test ionCube Loader by using the helper PHP script "loader-wizard.php" that's included in the ionCube Loader archive.

Possible issues

  • MySQL server is upgraded with PHP. If, when creating databases, database users or applications fail with MySQL errors such as Table mysql.servers does not exist it means that the MySQL server has been upgraded with PHP. This can be fixed with the following command:

    # mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow
    
  • If you see an error message like

    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
    

    it means that the the ionCube Loader file has a different OS architecture.

  • If you see an error message like

    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
    

    it means that SELinux is effective. The SELinux context is wrong on the ionCube Loader file.

  • PHP doesn'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:

    register_globals
    register_long_arrays
    magic_quotes-gpc
    magic_quotes_runtime
    magic_quotes_sybase
    allow_call_time_pass_reference
    define_syslog_variables
    highlight.bg
    session.bug_compat_42
    session.bug_compat_warn
    y2k_compliance
    safe_mode
    safe_mode_gid
    safe_mode_include_dir
    safe_mode_exec_dir
    safe_mode_allowed_env_vars
    safe_mode_protected_env_vars
    zend.ze1_compatibility_mode
    

    Refer to http://www.php.net/manual/en/migration54.ini.php for details.

Search words:

ioncube Loader

upgrade php




56797cefb1efc9130f7c48a7d1db0f0c c81e59b61af9dca603ba03b14aabe968 9f8baf78266b4e54525d1c6bf06305a5 824237ce663843af86f93897fbd8e2f8 b2231b0275a8ff26de8dfbae19ed2984 caea8340e2d186a540518d08602aa065 b315de483b3ce496b93860f954cd3118 1bb40a2897c5fbbe5c9bd20451105ddc 01de18af15883841f3555ba37f8f95de

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification