Bonjour,
Anciennement sur SGB2 en serveur dédié, je cherche un nouveau serveur dédié ou vps pour ré-installer mon site le plus vite possible mais :
Site en php 5.4.45 (sur debian7-plesk12_64 jusque récemment).
Quelle distribution supportera ma version php ?
Bonjour,
PHP 5.4 se compile bien sur debian 9 (de mémoire, juste des lib de Curl et de open SSL à adapter)
Merci pour votre réponse.
Je vais devoir m'y remettre car mon prestataire habituel semble curieusement surchargé et je ne m'occupais plus de l'hébergement depuis looongtemps.
Voilà ma procédure écrite quand je l'ai fait. Désolé c'est un peu en vrac.
Bon courage
=Paquets nécessaires=
apt install -y libxml2-dev libssl-dev build-essential zlib1g-dev libbz2-dev pkg-config libgmp-dev
apt install build-essential checkinstall zip autoconf
apt install libfcgi-dev libfcgi0ldbl libmcrypt-dev libssl-dev libc-client2007e-dev libkrb5-dev libcurl4-openssl-dev
apt install libxml2-dev libcurl4-openssl-dev libpcre3-dev libbz2-dev libjpeg-dev libpng-dev libfreetype6-dev libmcrypt-dev libmhash-dev freetds-dev libmariadbclient-dev-compat unixodbc-dev libxslt1-dev
Un petit lien sinon ça marche pas
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
=Construction openssl veille version=
cd /opt/
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
tar xzf openssl-1.0.1u.tar.gz
cd openssl-1.0.1u
./config shared --openssldir=/usr/local/openssl/ enable-ec_nistp_64_gcc_128
make depend
make
make install
ln -s /usr/local/openssl/lib /usr/local/openssl/lib/x86_64-linux-gnu
=Compilation curl=
cd /opt/
wget https://curl.haxx.se/download/curl-7.26.0.tar.gz
tar xzf curl-7.26.0.tar.gz
cd curl-7.26.0
env PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig LDFLAGS=-Wl,-rpath=/usr/local/openssl/lib ./configure --with-ssl=/usr/local/openssl --with-zlib --prefix=/usr/local/curl
make
make install
=Compilation libc=
Elle échoue mais c pas grave, on a besoin d'un lien sur une lib qui est bien compilé
cd /tmp/
Nouvelles URL vers les anciennes libs (source non vérifié)
wget https://mirrors.mediatemple.net/debian-archive/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg-2.dsc
wget https://mirrors.mediatemple.net/debian-archive/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg.orig.tar.gz
wget https://mirrors.mediatemple.net/debian-archive/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg-2.debian.tar.gz
Anciennes URL vers les anciennes lib
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg-2.dsc
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg.orig.tar.gz
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f~dfsg-2.debian.tar.gz
dpkg-source -x uw-imap_2007f~dfsg-2.dsc imap-2007f
mv imap-2007f /usr/local/
cd /usr/local/imap-2007f/
touch {ipv6,lnxok}
make slx SSLINCLUDE=/usr/local/openssl/include/ SSLLIB=/usr/local/openssl/lib EXTRAAUTHENTICATORS=gss
mkdir lib include
cp c-client/.c lib/
cp c-client/.h include/
cp c-client/c-client.a lib/libc-client.a
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
=compilation PHP=
cd /opt/ &&
wget http://php.net/distributions/php-5.4.45.tar.gz &&
tar xzf php-5.4.45.tar.gz &&
cd php-5.4.45
On configure
'./configure' <br /> '–prefix=/usr/local/php-5.4.45-fpm' <br /> '–disable-cli' <br /> '–enable-fpm' <br /> '–with-mysql' <br /> '–with-mysqli' <br /> '–enable-bcmath' <br /> '–with-zlib-dir=/usr/include/' <br /> '–enable-simplexml' <br /> '–with-xsl' <br /> '–with-gd' <br /> '–enable-exif' <br /> '–enable-ftp' <br /> '–enable-sockets' <br /> '–enable-shmop' <br /> '–enable-mbstring' <br /> '–enable-sysvsem' <br /> '–enable-sysvshm' <br /> '–enable-calendar' <br /> '–with-png-dir=/usr' <br /> '–with-iconv' <br /> '–with-jpeg-dir=/usr' <br /> '–with-freetype-dir=/usr' <br /> '–with-pdo-mysql' <br /> '–with-mcrypt' <br /> '–enable-shmop' <br /> '–with-gmp' <br /> '–with-curl=/usr/local/curl' <br /> '–with-mhash' <br /> '–enable-soap' <br /> '–with-kerberos' <br /> '–enable-dba' <br /> '–enable-zip' <br /> '–with-openssl=/usr/local/openssl'
make
make test
make install
make clean
->
Installing PHP FPM binary: /usr/local/php-5.4.45-fpm/sbin/
Installing PHP FPM config: /usr/local/php-5.4.45-fpm/etc/
Installing PHP FPM man page: /usr/local/php-5.4.45-fpm/php/man/man8/
Installing PHP FPM status page: /usr/local/php-5.4.45-fpm/php/fpm/
Installing PHP CGI binary: /usr/local/php-5.4.45-fpm/bin/
Installing PHP CGI man page: /usr/local/php-5.4.45-fpm/php/man/man1/
Installing build environment: /usr/local/php-5.4.45-fpm/lib/php/build/
Installing header files: /usr/local/php-5.4.45-fpm/include/php/
Installing helper programs: /usr/local/php-5.4.45-fpm/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php-5.4.45-fpm/php/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers: /usr/local/php-5.4.45-fpm/include/php/ext/pdo/
=Configuration=
Copier le script de démarrage fournit dans les sources et le rendre exécutable:
cp sapi/fpm/init.d.php-fpm /etc/init.d/php5.4-fpm
chmod 755 /etc/init.d/php5.4-fpm
Créer le fichier de configuration depuis le default :
mkdir /etc/php/5.4
cp /usr/local/php-5.4.45-fpm/etc/php-fpm.conf.default /etc/php/5.4/php-fpm.conf
Réglages :
nano /etc/php/5.4/php-fpm.conf
->
mkdir /etc/php/5.4/pool
cd /etc/php/5.4
ln -s php-fpm.conf /usr/local/php-5.4.45-fpm/etc/php-fpm.conf
ln -s /usr/local/php-5.4.45-fpm/etc/php-fpm.conf.default php-fpm.conf
mkdir /etc/php-5.3.29-fpm
ln -s /usr/local/php-5.3.29-fpm/etc/php-fpm.conf /etc/php-5.3.29-fpm/php.conf
J'ai bien fait de repasser par ici, Je ne m'attendais pas à autant, je vais vraiment gagner du temps.
Donc encore une fois, merci !
C'est gentil de partager ça, ça va beaucoup l'aider.
EDIT: @DavidS36 aura peut-être besoin de IMagick, au lieu de PHP GD. (pour des choses plus complexes en gestion d'images).
Bonjour,
En solution rapide et sans administration, vous pouvez vous diriger vers les offres mutualisées qui bénéficient de PHP 5.4
http://fpm5.1check.cluster030.hosting.ovh.net/phpinfo.phpcheck.cluster030.hosting.ovh.net/phpinfo.php
Bien à vous,