• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

PHP7.1.2 kompilieren mit php-fpm

Lillyfu

New Member
Hallo.

Ich möchte mir gerne PHP in der Version 7.1.2 auf dem Server installieren. Soweit kein Problem und läuft auch. Allerdings ohne FPM und PHP in der Version 7.0.16-1~dotdeb+8.1

Was habe ich vergessen?

aptitude install libapache2-mod-php gcc libcurl4-openssl-dev libbz2-dev libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libkrb5-dev libpq-dev libc-client2007e-dev libc-client2007e libcurl4-openssl-dev pkg-config libxslt-dev libfcgi-dev apache2-dev libfcgi-dev libfcgi0ldbl

./configure --prefix=/opt/php-7.1 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
 
Last edited by a moderator:
Ansonsten - die Fehlerbeschreibung ist ein wenig uneindeutig - ich hab' mir hier gerade mal ein 7.1.2 aus den Sourcen gebaut, das php-fpm Binary wird sauber erstellt.

Hast Du denn den php-fpm-Prozess gestartet und in die restliche Konfig sauber eingebunden?
 
Der FPM Prozess wurde gestartet.
In die Conf einbinden? Davon wurde in dem gefunden HowTo nichts erwähnt.
 
So. Die aktuelle PHP Version läuft nun. PHP-FPM scheint auch zu laufen.
Müsste dann aber nicht etwas davon in der phpinfo stehen? Bis auf einen Hinweis das es mit fpm kompiliert wurde findet sich da nicht?

/etc/apache2/conf-enabled/php7.conf

Code:
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
    SetHandler application/x-httpd-php-source
    # Deny access to raw php sources by default
    # To re-enable it's recommended to enable access to the files
    # only in specific virtual host or directory
#    Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[345]?|t|tml|ps)$">
    Require all denied
</FilesMatch>
 

Attachments

  • php.png
    php.png
    78.8 KB · Views: 195
  • fpm.png
    fpm.png
    17.6 KB · Views: 177
Das ist mir mittlerweile auch schon aufgefallen und habe mich ans Werk gemacht.

aptitude install libapache2-mod-fastcgi

und meine vhost Datei bearbeitet

Code:
<IfModule mod_fastcgi.c>
                AddHandler php7-fcgi .php
                Action php7-fcgi /php7-fcgi virtual
                Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
                FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php7-fpm.pid -pass-header Authorization
        </IfModule>

Server neu gestarter aber Keine Änderung in der phpinfo ausser das bei Loaded Modules mod_fastcgi geladen ist.
Soweit sind die Logs auch sauber

[Sat Mar 11 08:13:38.224605 2017] [mpm_prefork:notice] [pid 26494] AH00169: caught SIGTERM, shutting down
[Sat Mar 11 08:13:39.412599 2017] [auth_digest:notice] [pid 26580] AH01757: generating secret for digest authentication ...
[Sat Mar 11 08:13:39.416705 2017] [:notice] [pid 26583] FastCGI: process manager initialized (pid 26583)
[Sat Mar 11 08:13:39.434391 2017] [mpm_prefork:notice] [pid 26580] AH00163: Apache/2.4.10 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 PHP/7.1.2 OpenSSL/1.0.1t configured -- resuming normal operations
[Sat Mar 11 08:13:39.434422 2017] [core:notice] [pid 26580] AH00094: Command line: '/usr/sbin/apache2'
 
Last edited by a moderator:
Back
Top