{"id":143,"date":"2021-03-29T11:14:18","date_gmt":"2021-03-29T10:14:18","guid":{"rendered":"https:\/\/www.mustdev.com\/?p=143"},"modified":"2021-03-29T11:14:18","modified_gmt":"2021-03-29T10:14:18","slug":"ubuntu-14-04-con-apache-php-5-3","status":"publish","type":"post","link":"https:\/\/www.mustdev.com\/en\/ubuntu-14-04-con-apache-php-5-3\/","title":{"rendered":"Ubuntu 14.04 con Apache &#038; PHP 5.3"},"content":{"rendered":"\n<p>One of the difficulties I encountered during my work is to enable the https\/tls 1.2 protocol for old applications developed with PHP 4.4. The most obvious thing would be to update\/redo the application with a newer version of PHP, for example 5.6 or better still with a 7.4 or 8.0. However, it is not always possible, either because the customer cannot afford to spend to update it, or because it is an application that interacts with Legacy systems, or because a version of the same is already in progress but for the moment that old must continue to work.<\/p>\n\n\n\n<p>After installing the Ubuntu 14.04 server version (32 or 64 bit version), install the following packages<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install build-essential libxml2-dev apache2 apache2-dev libssl-dev libsslcommon2-dev libbz2-dev libcurl4-gnutls-dev libpng12-dev libgmp-dev libmcrypt-dev libtidy-dev libxslt1-dev libltdl-dev libjpeg-dev libgif-dev libmysqlclient-dev libmysqlclient18 icu-devtools libicu-dev <\/code><\/pre>\n\n\n\n<p>Download the latest version of <a rel=\"noreferrer noopener\" href=\"https:\/\/www.php.net\/distributions\/php-5.3.29.tar.gz\" target=\"_blank\">php5.3<\/a>, decompress and configure.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --with-libdir=lib\/i386-linux-gnu --with-apxs2 --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --with-mcrypt --with-mysql --with-mysql-sock --with-mysqli --enable-pcntl --with-pdo-mysql --enable-sockets --with-tidy --enable-wddx --with-xmlrpc --with-xsl --enable-zip --with-png-dir --with-jpeg-dir<\/code><\/pre>\n\n\n\n<p>In caso di versione dell\u2019os a 64 bit modificare il parametro \u2013with-libdir=lib\/x86_64-linux-gnu .<\/p>\n\n\n\n<p>Aggiungere alla riga che inizia per \u201cEXTRA_LIBS\u201d il valore \u201c-lstdc++\u201d (si pu\u00f2 mettere come primo parametro). Senza questo valore da questo errore durante la compilazione:<\/p>\n\n\n\n<p>error adding symbols: DSO missing from command line<\/p>\n\n\n\n<p>Questa \u00e8 la riga dopo la modifica<\/p>\n\n\n\n<p>EXTRA_LIBS = -lstdc++ -lcrypt -lz -lexslt -ltidy -lresolv -lcrypt -lrt -lmysqlclient &#8230;<\/p>\n\n\n\n<p>Infine procedere con la compilazione e l\u2019installazione.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make\nmake test\nmake install<\/code><\/pre>\n\n\n\n<p>Copiare il file php.ini di produzione nella directory corretta e fare le modifiche necessarie.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/opt\/php-source\/php-5.3.29\/php.ini-production \/usr\/local\/lib\/php.ini<\/code><\/pre>\n\n\n\n<p>Durante l\u2019installazione non viene creato il file di configurazione che aggiunge il tipo .php ad Apache. Creare quindi il file&nbsp;\/etc\/apache2\/mods-available\/php5.conf&nbsp;con il seguente contenuto<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AddType application\/x-httpd-php .php\nAddType application\/x-httpd-php-source .php<\/code><\/pre>\n\n\n\n<p>Disattivare e riattivare il modulo php e riavviare apache.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2dismod php5\na2enmod php5\nservice apache2 restart<\/code><\/pre>\n\n\n\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the difficulties I encountered during my work is to enable the https\/tls 1.2 protocol for old applications developed with PHP 4.4. The most obvious thing would be to update\/redo the application with a newer version of PHP, for example 5.6 or better still with a 7.4 or 8.0. However, it is not always\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.mustdev.com\/en\/ubuntu-14-04-con-apache-php-5-3\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[78],"tags":[86,87,70],"_links":{"self":[{"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/posts\/143"}],"collection":[{"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":2,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/posts\/143\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustdev.com\/en\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}