Page 1 of 1

php 5.3 -> 5.4

Posted: 2016-04-13 20:53
by tsaenger
Hallo zusammen,

ich habe ein altes System (steht nicht im Interner) Hier muss ich auf Grund einer Software bei PHP5 bleiben.
Da ein anderes Tool allerdings mnd Version 5.4 benötigt versuche ich gerade diese Version zu installieren.
Ich lasse php als fastCGi laufen.
Mein Configure sieht bei 5.3 wie folgt aus:

Code: Select all

./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/apache/conf \
--disable-debug \
--disable-rpath \
--enable-inline-optimization \
--enable-sockets \
--enable-wddx \
--enable-calendar \
--enable-ftp \
--enable-mbstring=all \
--enable-dom \
--enable-mbregex \
--enable-bcmath \
--with-openssl \
--with-kerberos \
--with-mcrypt \
--with-curl \
--with-gd \
--with-zlib-dir=/usr/lib \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-freetype-dir=/usr/lib \
--with-regex=system \
--with-gettext \
--with-iconv \
--with-layout=GNU \
--enable-ftp \
--enable-calendar \
--with-curl \
--enable-soap \
--with-snmp \
--with-mysql=/usr \
--with-pdo-mysql \
--enable-cgi
Wenn ich das genau so in 5.4 haben will wird aber kein SAPI installiert. Drum habe ich hier disable-CGI weggelassen und afür enable-CGI verwendet.

Leider kann ich anschließen kein PHP mehr ausführen.
das make install gibt mir folgendes aus:

Code: Select all

make install
Installing PHP CLI binary:        /usr/local/php/bin/
Installing PHP CLI man page:      /usr/local/php/php/man/man1/
Installing PHP CGI binary:        /usr/local/php/bin/
Installing PHP CGI man page:      /usr/local/php/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/include/php/php/
Installing helper programs:       /usr/local/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
[PEAR] Archive_Tar    - installed: 1.3.12
warning: pear/pear dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.3
[PEAR] Console_Getopt - installed: 1.3.1
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.3
[PEAR] PEAR           - installed: 1.9.5
Wrote PEAR system config file at: /etc/php/apache2/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
/home/php-5.4.45/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar
Installing PDO headers:          /usr/include/php/php/ext/pdo/
das Apache error.log gibt mir leider nur das aus:

Code: Select all

[Wed Apr 13 20:50:09 2016] [error]  These options need to match
[Wed Apr 13 20:50:09 2016] [error] in Unknown on line 0
[Wed Apr 13 20:50:09 2016] [error] HP Warning:  PHP Startup: mcrypt: Unable to initialize module
[Wed Apr 13 20:50:09 2016] [error] Module compiled with module API=20060613
[Wed Apr 13 20:50:09 2016] [error] PHP    compiled with module API=20100525
[Wed Apr 13 20:50:09 2016] [error] These options need to match
[Wed Apr 13 20:50:09 2016] [error] in Unknown on line 0
[Wed Apr 13 20:50:09 2016] [error] Premature end of script headers: index.php
wenn ich make install bei der 5.3 durchlaufen lasse, dann erhalte ich:

Code: Select all

 make install
Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /usr/local/php/bin/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/include/php/php/
Installing helper programs:       /usr/local/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PDO headers:          /usr/include/php/php/ext/pdo/
und PHP funktioniert ohne Probleme.

Hat jemand von euch eine Idee, woran das liegen kann?
Was muss ich noch tun?

Vielen Dank.

Re: php 5.3 -> 5.4

Posted: 2016-04-13 21:25
by Joe User
Du musst für 5.4 einen anderen Pfad bei --prefix angeben (z.B. /usr/local/php54) und vermutlich auch den Shortcut --with-layout durch die jeweiligen einzelnen Optionen mit zu 5.3 unterschiedlichen Pfaden ersetzen. Eventuell musst Du auch noch --with-config-file-path anpassen.



Auch wenn das System nicht am Internet hängt, sei pro forma darauf hingewiesen, dass PHP 5.3 und 5.4 seit Ewigkeiten nicht mehr supportet werden und zahlreiche bekannte und aktiv ausgenutzte Sicherheitslücken enthalten.

Re: php 5.3 -> 5.4

Posted: 2016-04-16 23:58
by ddm3ve
Von den Sicherheitslücken abgesehen dürften auch inzwischen openssl und andere Implementierung ggf. Probleme beim bauen verursachen.
Viele "exotische" Sachen werden nicht mehr gehen. Die Welt hat sich nunmal weiter entwickelt.