Skip to content

zener05/debian-stretch-php-5-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

How to install PHP 5.3 on Debian Stretch

There is a problem with installing older PHP versions on new Debian systems. This is a quick tutorial how to do it.

Download DEB packages

Luckily we can use repositories from Ubuntu and its Launchpad. I use repository from SergeyD.

Select all packages that you want to use - depends on your architecture. For example I use these:

Install packages

Install all packages at once by dpkg.

sudo dpkg -i *.deb

Done

Profit!

Test PHP installation: /usr/bin/php53 -v

Misc

I use PHP as FPM so there should be more things to do.

  • Edit file /etc/init.d/php53-fpm and update variable exec_prefix (missing / at the beginning).
  • Create PHP-FPM pool file. Sample file is located here - /etc/php53/fpm/pool.d/pool-www-data.conf.example. You can use sample config file as yours and just rename it.
  • Enable PHP-FPM service (uncomment it in /etc/default/php53-fpm)

I use apache2 as webserver and this is my VirtualHost settings for web running on PHP 5.3.

<VirtualHost *:80>
        ServerName web.example.com
        DocumentRoot "/var/www/web.example.com"

        ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/web.example.com

        <Directory /var/www/web.example.com>
                AllowOverride All
        </Directory>
</VirtualHost>

About

How to install PHP 5.3 on Debian Stretch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published