{"id":1687,"date":"2025-01-26T23:24:24","date_gmt":"2025-01-26T22:24:24","guid":{"rendered":"https:\/\/olvy.net\/blog\/?p=1687"},"modified":"2025-12-30T23:01:41","modified_gmt":"2025-12-30T22:01:41","slug":"how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems","status":"publish","type":"post","link":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/","title":{"rendered":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems"},"content":{"rendered":"<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"366\" class=\"wp-image-1376 aligncenter\" src=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg\" alt=\"PHP5 support on Debian 12 and Ubuntu 22.04\" srcset=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg 700w, https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204-300x157.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Although <strong>PHP 5.3<\/strong>, <strong>5.4<\/strong>, and <strong>5.5<\/strong> have long since reached their end-of-life, some legacy applications may still depend on them. Installing these outdated versions on modern systems like <a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noopener\"><strong>Debian<\/strong><\/a> 10\/11\/12 or <a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\"><strong>Ubuntu<\/strong><\/a> 20.04\/22.04 requires manually building the software and resolving dependencies. This guide provides a step-by-step approach, including dependency management (such as <code><span style=\"font-size: 12pt;\">curl<\/span><\/code>, <code><span style=\"font-size: 12pt;\">OpenSSL<\/span><\/code>, and the <code><span style=\"font-size: 12pt;\">intl<\/span><\/code> extension).<\/p>\r\n\r\n\r\n\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#why_use_legacy_php_versions\" >Why Use Legacy PHP Versions?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#before_you_begin\" >Before You Begin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_1_install_required_dependencies\" >Step 1: Install Required Dependencies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_2_compile_and_install_openssl_102u\" >Step 2: Compile and Install OpenSSL 1.0.2u<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_3_compile_c-client_library_for_php-imap\" >Step 3: Compile c-client library for php-imap<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_4_compile_curl_bundled_with_openssl_102u\" >Step 4: Compile Curl bundled with OpenSSL 1.0.2u<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_5_compile_php_5x\" >Step 5: Compile PHP 5.x<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_6_install_php_5x\" >Step 6: Install PHP 5.x<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#step_7_install_%e2%80%9dintl%e2%80%9d_extension_for_php_5x_optional\" >Step 7: Install &#8221;intl&#8221; extension for PHP 5.x (optional)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#security_considerations\" >Security Considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"why_use_legacy_php_versions\"><\/span><strong>Why Use Legacy PHP Versions?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">While using legacy PHP versions isn&#8217;t recommended, some scenarios may necessitate their use:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Legacy Applications<\/strong>: Applications developed years ago may not yet be updated to support modern PHP versions.<\/li>\r\n\r\n\r\n\r\n<li><strong>Specialized Requirements<\/strong>: Some environments or software integrations may temporarily rely on outdated PHP versions.<\/li>\r\n<\/ul>\r\n<p>For example, if you are still running an older CMS like <strong>osCommerce 2.2,<\/strong> <strong>osCommerce 2.3<\/strong> or Trueloaded, that requires PHP 5.3-5.6, we offer modern <a href=\"https:\/\/olvy.net\/oscommerce-hosting\/\"><strong>osCommerce hosting<\/strong><\/a> on <strong>Olvy Cloud<\/strong> tailored to those requirements out of the box.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"before_you_begin\"><\/span><strong>Before You Begin<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Keep in mind:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Security Risks<\/strong>: Legacy PHP versions are no longer supported and lack security updates, making them highly vulnerable.<\/li>\r\n\r\n\r\n\r\n<li><strong>Isolation<\/strong>: Always run these versions in isolated environments, such as a container or a virtual machine, to minimize potential risks.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"prerequisites\"><\/span><strong>Prerequisites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Ensure your system meets the following requirements:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>A machine running <strong>Debian 10\/11\/12<\/strong> or <strong>Ubuntu 20.04\/22.04<\/strong>.<\/li>\r\n\r\n\r\n\r\n<li>Administrative privileges.<\/li>\r\n\r\n\r\n\r\n<li>Essential build tools installed.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step_1_install_required_dependencies\"><\/span><strong>Step 1: Install Required Dependencies<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Before starting the build process, ensure that all necessary build tools and libraries are installed. Use the following commands to update your system and install dependencies:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">sudo apt update<\/span>\r\n\r\n<span style=\"font-size: 12pt;\">sudo apt install build-essential libxml2-dev libjpeg-dev libpng-dev \\\r\nlibfreetype6-dev libmcrypt-dev libxslt1-dev libkrb5-dev libltdl-dev \\ \r\ndefault-libmysqlclient-dev<\/span><\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">These libraries are essential for compiling PHP and ensuring compatibility with various extensions.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step_2_compile_and_install_openssl_102u\"><\/span><strong>Step 2: Compile and Install OpenSSL 1.0.2u<br \/><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">For compatibility reason we will compile and install <span style=\"font-size: 12pt;\"><code><span style=\"font-size: 12pt;\"><span style=\"font-size: 10pt;\"><span style=\"font-size: 12pt;\">OpenSSL 1.0.2u<\/span><\/span><\/span><\/code><\/span> manually:<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">1. Download OpenSSL Source Code:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget https:\/\/www.openssl.org\/source\/old\/1.0.2\/openssl-1.0.2u.tar.gz\r\ntar -xzf openssl-1.0.2u.tar.gz\r\n<span class=\"hljs-built_in\">cd<\/span> openssl-1.0.2u\r\n<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">2. Build and Install OpenSSL<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">.\/config shared --openssldir=\/opt\/openssl-1.0.2\/ enable-ec_nistp_64_gcc_128<\/span>\r\n<span style=\"font-size: 12pt;\">make depend<\/span>\r\n<span style=\"font-size: 12pt;\">make<\/span>\r\n<span style=\"font-size: 12pt;\">make install<\/span>\r\n<span style=\"font-size: 12pt;\">ln -s \/opt\/openssl-1.0.2\/lib \/opt\/openssl-1.0.2\/lib\/x86_64-linux-gnu\r\n<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">3. Add OpenSSL libraries path to system runtime<\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Create file <code><span style=\"font-size: 12pt;\">\/etc\/ld.so.conf.d\/openssl.conf<\/span><\/code> and add line:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">\/opt\/openssl-1.0.2\/lib<\/span><\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Update shared library cache:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">ldconfig<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">4. Verify Installation<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">\/opt\/openssl-1.0.2\/bin\/openssl version<\/span>\r\n<span style=\"font-size: 12pt;\">OpenSSL 1.0.2u 20 Dec 2019<\/span><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step_3_compile_c-client_library_for_php-imap\"><\/span><strong>Step 3: Compile c-client library for php-imap<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To enable IMAP functionality in PHP, you need to build the <code><span style=\"font-size: 12pt;\">c-client<\/span><\/code> library, which PHP relies on for email handling. Follow these steps to build and install it:<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">1. Download and unpack the source code:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">cd \/opt<\/span>\r\n<span style=\"font-size: 12pt;\">wget --no-check-certificate https:\/\/wiki.olvy.net\/download\/c-client.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">tar xzf c-client.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">cd \/opt\/imap-2007f<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">2. Set OpenSSL directory:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">nano \/opt\/imap-2007f\/src\/osdep\/unix\/Makefile<\/span>\r\n\r\n<span style=\"font-size: 12pt;\">[...]<\/span>\r\n<span style=\"font-size: 12pt;\">SSLDIR=\/opt\/openssl-1.0.2<\/span>\r\n\r\n<span style=\"font-size: 12pt;\">[...]<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">3. Set EXTRACFLAGS to disable kerberos :<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">nano \/opt\/imap-2007f\/Makefile<\/span><\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Find <code><span style=\"font-size: 12pt;\">EXTRACFLAGS=<\/span><\/code> and change it to <code><span style=\"font-size: 12pt;\">EXTRACFLAGS=-fPIC<\/span><\/code><\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">4. Compile c-client:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">make slx IP6=4<\/span><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step_4_compile_curl_bundled_with_openssl_102u\"><\/span><strong>Step 4: Compile Curl bundled with OpenSSL 1.0.2u<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Older PHP versions may require a specific version of curl. Compile and install it as follows:<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">1. Download and unpack the source code:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget https:\/\/curl.se\/download\/curl-7.88.1.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">tar xzf curl-7.88.1.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">cd curl-7.88.1<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">2. Configure Curl:<\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">.\/configure --prefix=\/opt\/curl --with-ssl=\/opt\/openssl-1.0.2 --with-ca-path=\/etc\/ssl\/certs<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\"><strong>3. Compile and install Curl:<\/strong><\/h4>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">make<\/span>\r\n<span style=\"font-size: 12pt;\">...<\/span>\r\n<span style=\"font-size: 12pt;\">make install<\/span><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step_5_compile_php_5x\"><\/span><strong>Step 5: Compile PHP 5.x<br \/><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">1. Download the PHP Source Code<\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Download the source code for the specific PHP version you need from the PHP archives:<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Download and extract PHP 5.3:<\/strong><\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget https:\/\/www.php.net\/distributions\/php-5.3.29.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">tar xzf php-5.3.29.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">cd php-5.3.29<\/span><\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Download and extract PHP 5.4<\/strong><\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget https:\/\/www.php.net\/distributions\/php-5.4.45.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">tar xzf php-5.4.45.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">cd php-5.4.45<\/span><\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Download and extract PHP 5.5<\/strong><\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget https:\/\/www.php.net\/distributions\/php-5.5.38.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">tar xzf php-5.5.38.tar.gz<\/span>\r\n<span style=\"font-size: 12pt;\">cd php-5.5.38<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\"><strong>Notes regarding Freetype:<br \/><\/strong><\/h4>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">We will install PHP 5.x into directory <code><span style=\"font-size: 12pt;\">\/opt\/php5\/<\/span><\/code><\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">If you need <strong>Freetype<\/strong> support enabled for PHP, using <code><span style=\"font-size: 12pt;\">--with-freetype-dir<\/span><\/code> option, please note:<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><code><span style=\"font-size: 12pt;\">freetype-config<\/span><\/code> is deprecated and no longer included in <code><span style=\"font-size: 12pt;\">libfreetype6-dev<\/span><\/code> package, we will take <code><span style=\"font-size: 12pt;\">freetype-config<\/span><\/code> from <strong>Debian 9<\/strong> <code><span style=\"font-size: 12pt;\">libfreetype6-dev package<\/span><\/code>:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">wget http:\/\/archive.debian.org\/debian-security\/pool\/updates\/main\/f\/freetype\/libfreetype6-dev_2.6.3-3.2+deb9u2_amd64.deb -O - | dpkg --fsys-tarfile - | tar xOf - .\/usr\/bin\/freetype-config &gt; \/usr\/bin\/freetype-config &amp;&amp; chmod +x \/usr\/bin\/freetype-config<\/span><\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">2. Configure PHP 5.x:<\/h4>\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">.\/configure --prefix=\/opt\/php5 --with-config-file-path=\/opt\/php5\/etc --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-bcmath --enable-opcache --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-mbstring --enable-soap --enable-sockets --enable-zip --with-curl=\/opt\/curl --with-freetype-dir=\/usr --with-gd --with-gettext --with-mcrypt --enable-mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql-sock=\/var\/run\/mysqld\/mysqld.sock --with-openssl=\/opt\/openssl-1.0.2 --with-openssl-dir=\/opt\/openssl-1.0.2 --with-zlib --with-xsl --with-zlib-dir=\/usr --enable-calendar --enable-gd-native-ttf --with-jpeg-dir=\/usr --with-png-dir=\/usr --with-imap=\/opt\/imap-2007f --with-imap-ssl<\/span><\/pre>\r\n<p>On <strong>Arm64<\/strong> platforms also add:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">--host=aarch64-linux-gnu --build=unknown-unknown-linux<\/span><\/pre>\r\n<h4>3. If PHP configured successfully, make and install it:<\/h4>\r\n<pre><span style=\"font-size: 12pt;\">make<\/span><br \/><span style=\"font-size: 12pt;\">...<\/span><br \/><span style=\"font-size: 12pt;\">make install<\/span><\/pre>\r\n<h2><span class=\"ez-toc-section\" id=\"step_6_install_php_5x\"><\/span><strong>Step 6: Install PHP 5.x<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<h4>1. Copy php.ini<\/h4>\r\n<p>Copy file <code><span style=\"font-size: 12pt;\">\/usr\/src\/php-5.x.x\/php.ini-production<\/span><\/code> to default php.ini location:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">cp <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">usr<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">src<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">-<\/span><span class=\"lit\">5.x<\/span><span class=\"pun\">.<\/span><span class=\"pln\">x<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ini<\/span><span class=\"pun\">-<\/span><span class=\"pln\">production <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ini<\/span><\/span><\/pre>\r\n<h4>2. Create systemd unit<\/h4>\r\n<p>Next, we&#8217;ll create the system unit file which is used to start and stop the PHP-FPM daemon.<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">nano <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">lib<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">systemd<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">system<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<p>With the following content:<\/p>\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">[Unit]<\/span><br \/><span style=\"font-size: 12pt;\">Description=The PHP 5.x FastCGI Process Manager<\/span><br \/><span style=\"font-size: 12pt;\">After=network.target<\/span><br \/><br \/><span style=\"font-size: 12pt;\">[Service]<\/span><br \/><span style=\"font-size: 12pt;\">Type=simple<\/span><br \/><span style=\"font-size: 12pt;\">PIDFile=\/opt\/php5\/var\/run\/php-fpm.pid<\/span><br \/><span style=\"font-size: 12pt;\">ExecStart=\/opt\/php5\/sbin\/php-fpm --nodaemonize --fpm-config \/opt\/php5\/etc\/php-fpm.conf<\/span><br \/><span style=\"font-size: 12pt;\">ExecReload=\/bin\/kill -USR2 $MAINPID<\/span><br \/><br \/><span style=\"font-size: 12pt;\">[Install]<\/span><br \/><span style=\"font-size: 12pt;\">WantedBy=multi-user.target<\/span><\/pre>\r\n<p>Enable the service and reload systemd:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">systemctl enable php5-fpm.service<\/span><br \/><span style=\"font-size: 12pt;\">systemctl daemon-reload<\/span><\/pre>\r\n<h4>3. Add PHP-FPM configuration<\/h4>\r\n<p>Create PHP-FPM default configuration file:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">nano <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf<\/span><\/span><\/pre>\r\n<p>With content:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pun\">[<\/span><span class=\"pln\">global<\/span><span class=\"pun\">]<\/span><span class=\"pln\">\r\nerror_log <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> log<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">log\r\ninclude<\/span><span class=\"pun\">=\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">pool<\/span><span class=\"pun\">.<\/span><span class=\"pln\">d<\/span><span class=\"pun\">\/*.<\/span><span class=\"pln\">conf<\/span><\/span><\/pre>\r\n<p>Create PHP-FPM pool folder:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">mkdir <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">pool<\/span><span class=\"pun\">.<\/span><span class=\"pln\">d<\/span><\/span><\/pre>\r\n<p>Create PHP-FPM pool configuration file:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">nano <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">pool<\/span><span class=\"pun\">.<\/span><span class=\"pln\">d<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">yourwebsite<\/span><span class=\"pun\">.<\/span><span class=\"pln\">tld<\/span><span class=\"pun\">.<\/span><span class=\"pln\">conf<\/span><\/span><\/pre>\r\n<p>With the content:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pun\">[<\/span><span class=\"pln\">yourwebsite<\/span><span class=\"pun\">.<\/span><span class=\"pln\">tld<\/span><span class=\"pun\">]<\/span><span class=\"pln\">\r\n\r\nuser <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> yourusername\r\ngroup <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> yourusername\r\n\r\nlisten <\/span><span class=\"pun\">=<\/span> <span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">var<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">run<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">yourusername<\/span><span class=\"pun\">.<\/span><span class=\"pln\">sock\r\n\r\nlisten<\/span><span class=\"pun\">.<\/span><span class=\"pln\">owner <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> yourusername\r\nlisten<\/span><span class=\"pun\">.<\/span><span class=\"pln\">group <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> yourusername\r\n\r\npm <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> dynamic\r\npm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">max_children <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">20<\/span><span class=\"pln\">\r\npm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">start_servers <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">2<\/span><span class=\"pln\">\r\npm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">min_spare_servers <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">1<\/span><span class=\"pln\">\r\npm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">max_spare_servers <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">3<\/span><\/span><\/pre>\r\n<p>*<code><span style=\"font-size: 12pt;\">yourusername<\/span><\/code> is a system user you are going to use to run PHP.<\/p>\r\n<p>Add HTTP default user <code><span style=\"font-size: 12pt;\">www-data<\/span><\/code> to PHP user&#8217;s group:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">usermod <\/span><span class=\"pun\">-<\/span><span class=\"pln\">a <\/span><span class=\"pun\">-<\/span><span class=\"pln\">G yourusername www<\/span><span class=\"pun\">-<\/span><span class=\"pln\">data<\/span><\/span><\/pre>\r\n<h4>4. Start\/Stop\/Restart PHP-FPM<\/h4>\r\n<p>Start PHP-FPM:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">systemctl start php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<p>Stop PHP-FPM:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">systemctl stop php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<p>Restart PHP-FPM:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">systemctl restart php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<p>PHP-FPM status:<\/p>\r\n<pre><span style=\"font-size: 12pt;\"><span class=\"pln\">systemctl status php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<h2><span class=\"ez-toc-section\" id=\"step_7_install_%e2%80%9dintl%e2%80%9d_extension_for_php_5x_optional\"><\/span><strong>Step 7: Install &#8221;intl&#8221; extension for PHP 5.x (optional)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>\u00a0Internationalization library (&#8220;intl&#8221;) is a PHP extension that acts as a wrapper for ICU (International Components for Unicode) library. It allows PHP developers to execute a wide range of operations that are sensitive to locale settings, such as formatting dates, numbers, and currencies, as well as working with text in multiple languages.<\/p>\r\n<h4>1. Download <code><span style=\"font-size: 12pt;\">icu 57.1<\/span><\/code> sources, as dependency for <code><span style=\"font-size: 12pt;\">intl<\/span><\/code> extension:<\/h4>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">wget https<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">debian<\/span><span class=\"pun\">.<\/span><span class=\"pln\">org<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">debian<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">pool<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">main<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">i<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">icu<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">icu_57<\/span><span class=\"pun\">.<\/span><span class=\"lit\">1.orig<\/span><span class=\"pun\">.<\/span><span class=\"pln\">tar<\/span><span class=\"pun\">.<\/span><span class=\"pln\">gz<\/span><\/span><\/pre>\r\n<h4>2. Build and install <code><span style=\"font-size: 12pt;\">icu<\/span><\/code>:<\/h4>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">tar xzf icu_57<\/span><span class=\"pun\">.<\/span><span class=\"lit\">1.orig<\/span><span class=\"pun\">.<\/span><span class=\"pln\">tar<\/span><span class=\"pun\">.<\/span><span class=\"pln\">gz\r\ncd icu<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">source\r\n<\/span><span class=\"pun\">.\/<\/span><span class=\"pln\">configure <\/span><span class=\"pun\">--<\/span><span class=\"pln\">prefix<\/span><span class=\"pun\">=\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">icu_57<\/span><span class=\"pun\">.<\/span><span class=\"lit\">1<\/span><span class=\"pln\">\r\nmake\r\nmake install<\/span><\/span><\/pre>\r\n<h4>3. Compile and install <code><span style=\"font-size: 12pt;\">intl<\/span><\/code> extension:<\/h4>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">wget https<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">pecl<\/span><span class=\"pun\">.<\/span><span class=\"pln\">php<\/span><span class=\"pun\">.<\/span><span class=\"pln\">net<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">get<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">intl<\/span><span class=\"pun\">-<\/span><span class=\"lit\">3.0<\/span><span class=\"pun\">.<\/span><span class=\"lit\">0.tgz<\/span><span class=\"pln\">\r\ntar xzf intl<\/span><span class=\"pun\">-<\/span><span class=\"lit\">3.0<\/span><span class=\"pun\">.<\/span><span class=\"lit\">0.tgz<\/span><span class=\"pln\">\r\ncd intl<\/span><span class=\"pun\">-<\/span><span class=\"lit\">3.0<\/span><span class=\"pun\">.<\/span><span class=\"lit\">0<\/span>\r\n<span class=\"pun\">\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">bin<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">phpize\r\n<\/span><span class=\"pun\"><br \/>.\/<\/span><span class=\"pln\">configure <\/span><span class=\"pun\">--<\/span><span class=\"pln\">with<\/span><span class=\"pun\">-<\/span><span class=\"pln\">icu<\/span><span class=\"pun\">-<\/span><span class=\"pln\">dir<\/span><span class=\"pun\">=\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">icu_57<\/span><span class=\"pun\">.<\/span><span class=\"lit\">1<\/span> <span class=\"pun\">--<\/span><span class=\"pln\">enable<\/span><span class=\"pun\">-<\/span><span class=\"pln\">intl <\/span><span class=\"pun\">--<\/span><span class=\"pln\">with<\/span><span class=\"pun\">-<\/span><span class=\"pln\">php<\/span><span class=\"pun\">-<\/span><span class=\"pln\">config<\/span><span class=\"pun\">=\/<\/span><span class=\"pln\">opt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php5<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">bin<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">php<\/span><span class=\"pun\">-<\/span><span class=\"pln\">config\r\n<br \/>make\r\nmake install<\/span><\/span><\/pre>\r\n<h4>4. Add <code><span style=\"font-size: 12pt;\">intl<\/span><\/code> extension to <code><span style=\"font-size: 12pt;\">php.ini<\/span><\/code> :<\/h4>\r\n<pre><span style=\"font-size: 12pt;\">nano \/opt\/php5\/etc\/php.ini<\/span><\/pre>\r\n<pre><span style=\"font-size: 12pt;\">extension=intl.so<\/span><\/pre>\r\n<h4>5. Create symlink for <code><span style=\"font-size: 12pt;\">icu<\/span><\/code> library:<\/h4>\r\n<pre><span style=\"font-size: 12pt;\">ln -s \/opt\/icu_57.1\/lib\/libicudata.so.57.1 \/usr\/lib\/x86_64-linux-gnu\/libicudata.so.57<\/span><\/pre>\r\n<p>6. Restart PHP-FPM:<\/p>\r\n<pre class=\"prettyprint  lang-bash prettyprinted\"><span style=\"font-size: 12pt;\"><span class=\"pln\">systemctl restart php5<\/span><span class=\"pun\">-<\/span><span class=\"pln\">fpm<\/span><span class=\"pun\">.<\/span><span class=\"pln\">service<\/span><\/span><\/pre>\r\n<h2><span class=\"ez-toc-section\" id=\"security_considerations\"><\/span><strong>Security Considerations<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Using legacy PHP versions comes with significant security risks. Protect your environment by:<\/p>\r\n<ul>\r\n<li><strong>Isolating<\/strong>: Use containers or VMs to limit exposure.<\/li>\r\n<li><strong>Restricting Access<\/strong>: Implement strict firewall rules.<\/li>\r\n<li><strong>Planning an Upgrade<\/strong>: Work towards migrating applications to a supported PHP version.<\/li>\r\n<\/ul>\r\n<h2><span class=\"ez-toc-section\" id=\"conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>This guide demonstrates the full process for installing PHP 5.3, 5.4, and 5.5 on modern Debian and Ubuntu systems, such as Debian 10\/11\/12 or Ubuntu 20.04\/22.04. While these steps enable legacy applications to run, upgrading to a supported PHP version is strongly advised to ensure security and performance.<\/p>\r\n\r\n\r\n\r\n\r\n<hr \/>\r\n<p><em>About Olvy ( <a href=\"https:\/\/olvy.net\/\">www.olvy.net<\/a> ) :<\/em> <em>Olvy is a private and independent Limited Liability Company based in Bratislava, Slovakia, in the heart of Europe. We combined our invaluable 20+ years experience to develop innovative and reliable, lightning-fast and affordable Managed Cloud Hosting services for Everyone. From a small blog to a growing eCommerce \u2013Olvy takes care of your website 24\/7.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Although PHP 5.3, 5.4, and 5.5 have long since reached their end-of-life, some legacy applications may still depend on them. Installing these outdated versions on&hellip;<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[17,157,38],"tags":[29,40,61],"class_list":["post-1687","post","type-post","status-publish","format-standard","hentry","category-guides","category-performance-infrastructure","category-technology","tag-debian","tag-php5","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog<\/title>\n<meta name=\"description\" content=\"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\/11\/12 or Ubuntu 20.04\/22.04 with step-by-step guidance and tips\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\/11\/12 or Ubuntu 20.04\/22.04 with step-by-step guidance and tips\" \/>\n<meta property=\"og:url\" content=\"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/\" \/>\n<meta property=\"og:site_name\" content=\"Olvy Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/olvycloud\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-26T22:24:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-30T22:01:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"366\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"olvywriter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@olvycloud\" \/>\n<meta name=\"twitter:site\" content=\"@olvycloud\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"olvywriter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/\"},\"author\":{\"name\":\"olvywriter\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/person\\\/256b8cc1d90850acce9336449b2bced1\"},\"headline\":\"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems\",\"datePublished\":\"2025-01-26T22:24:24+00:00\",\"dateModified\":\"2025-12-30T22:01:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/\"},\"wordCount\":792,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/php5_debian12_ubuntu2204.jpg\",\"keywords\":[\"debian\",\"php5\",\"ubuntu\"],\"articleSection\":[\"Hosting Guides\",\"Performance &amp; Infrastructure\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/\",\"name\":\"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/php5_debian12_ubuntu2204.jpg\",\"datePublished\":\"2025-01-26T22:24:24+00:00\",\"dateModified\":\"2025-12-30T22:01:41+00:00\",\"description\":\"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\\\/11\\\/12 or Ubuntu 20.04\\\/22.04 with step-by-step guidance and tips\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#primaryimage\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/php5_debian12_ubuntu2204.jpg\",\"contentUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/php5_debian12_ubuntu2204.jpg\",\"width\":700,\"height\":366,\"caption\":\"PHP5 support on Debian 12 and Ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\",\"name\":\"Olvy Blog\",\"description\":\"News, Guides, Information\",\"publisher\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/olvy.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\",\"name\":\"Olvy s.r.o.\",\"alternateName\":\"Olvy\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/olvy_400x400.png\",\"contentUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/olvy_400x400.png\",\"width\":400,\"height\":400,\"caption\":\"Olvy s.r.o.\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/olvycloud\\\/\",\"https:\\\/\\\/x.com\\\/olvycloud\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/olvycloud\",\"https:\\\/\\\/mastodon.social\\\/@olvy\",\"https:\\\/\\\/www.threads.net\\\/@olvycloud\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/person\\\/256b8cc1d90850acce9336449b2bced1\",\"name\":\"olvywriter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"caption\":\"olvywriter\"},\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/author\\\/olvywriter\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog","description":"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\/11\/12 or Ubuntu 20.04\/22.04 with step-by-step guidance and tips","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:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog","og_description":"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\/11\/12 or Ubuntu 20.04\/22.04 with step-by-step guidance and tips","og_url":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/","og_site_name":"Olvy Blog","article_publisher":"https:\/\/www.facebook.com\/olvycloud\/","article_published_time":"2025-01-26T22:24:24+00:00","article_modified_time":"2025-12-30T22:01:41+00:00","og_image":[{"width":700,"height":366,"url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg","type":"image\/jpeg"}],"author":"olvywriter","twitter_card":"summary_large_image","twitter_creator":"@olvycloud","twitter_site":"@olvycloud","twitter_misc":{"Written by":"olvywriter","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#article","isPartOf":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/"},"author":{"name":"olvywriter","@id":"https:\/\/olvy.net\/blog\/#\/schema\/person\/256b8cc1d90850acce9336449b2bced1"},"headline":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems","datePublished":"2025-01-26T22:24:24+00:00","dateModified":"2025-12-30T22:01:41+00:00","mainEntityOfPage":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/"},"wordCount":792,"commentCount":0,"publisher":{"@id":"https:\/\/olvy.net\/blog\/#organization"},"image":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg","keywords":["debian","php5","ubuntu"],"articleSection":["Hosting Guides","Performance &amp; Infrastructure","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/","url":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/","name":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems - Olvy Blog","isPartOf":{"@id":"https:\/\/olvy.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#primaryimage"},"image":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg","datePublished":"2025-01-26T22:24:24+00:00","dateModified":"2025-12-30T22:01:41+00:00","description":"Learn how to install legacy PHP 5.3, 5.4, and 5.5 on Debian 10\/11\/12 or Ubuntu 20.04\/22.04 with step-by-step guidance and tips","breadcrumb":{"@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#primaryimage","url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg","contentUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/06\/php5_debian12_ubuntu2204.jpg","width":700,"height":366,"caption":"PHP5 support on Debian 12 and Ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/olvy.net\/blog\/how-to-install-php-5-3-5-4-and-5-5-on-modern-debian-and-ubuntu-systems\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/olvy.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install PHP 5.3, 5.4, and 5.5 on Modern Debian and Ubuntu Systems"}]},{"@type":"WebSite","@id":"https:\/\/olvy.net\/blog\/#website","url":"https:\/\/olvy.net\/blog\/","name":"Olvy Blog","description":"News, Guides, Information","publisher":{"@id":"https:\/\/olvy.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/olvy.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/olvy.net\/blog\/#organization","name":"Olvy s.r.o.","alternateName":"Olvy","url":"https:\/\/olvy.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/olvy.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/01\/olvy_400x400.png","contentUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/01\/olvy_400x400.png","width":400,"height":400,"caption":"Olvy s.r.o."},"image":{"@id":"https:\/\/olvy.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/olvycloud\/","https:\/\/x.com\/olvycloud","https:\/\/www.linkedin.com\/company\/olvycloud","https:\/\/mastodon.social\/@olvy","https:\/\/www.threads.net\/@olvycloud"]},{"@type":"Person","@id":"https:\/\/olvy.net\/blog\/#\/schema\/person\/256b8cc1d90850acce9336449b2bced1","name":"olvywriter","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","caption":"olvywriter"},"url":"https:\/\/olvy.net\/blog\/author\/olvywriter\/"}]}},"_links":{"self":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/comments?post=1687"}],"version-history":[{"count":45,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1687\/revisions"}],"predecessor-version":[{"id":1990,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1687\/revisions\/1990"}],"wp:attachment":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/media?parent=1687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/categories?post=1687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/tags?post=1687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}