Install old PHP version on Ubuntu

前端 未结 2 1704
眼角桃花
眼角桃花 2020-12-22 11:19

I have got an Ubuntu14.04 and a PHP 5.5.9 installed.
Now I need PHP 5.4.*

As I have seen, it is not possible to downgr

相关标签:
2条回答
  • 2020-12-22 11:44

    Add this line to .htaccess to downgrade php version to 5.4

    AddHandler x-mapp-php6 .php

    for more details check this link https://help.1and1.com/hosting-c37630/scripts-and-programming-languages-c85099/php-c37728/manually-set-the-version-of-php-using-an-htaccess-file-a614325.html

    0 讨论(0)
  • 2020-12-22 12:07

    Download Apache http and PHP from source and it can be done.

    Choose an installation source location; personally I use /usr/local/src but I've seen many alternatives.

    Download Apache HTTP of the appropriate version (probably 2.4, I use the tar.gz files) http://httpd.apache.org/download.cgi

    Download your PHP http://php.net/get/php-5.4.42.tar.gz/from/a/mirror

    You will need to unzip (tar -zxvf), configure, make, make install both httpd and php. There are tons of configuration options you'll need to consider with both. You may hit many obstacles along the way and need to install various packages with apt-get but don't despair - search for the errors and you will find help, for example

    Before you begin installing, make sure you've completely removed all remnants of php5.5

    Good luck and post your results.

    0 讨论(0)
提交回复
热议问题