Additional PHP Version (5.6 PHP-FPM) doesn't work

Discussion in 'Installation/Configuration' started by woy-s, Jan 20, 2015.

  1. woy-s

    woy-s New Member

    Hi All,
    I've just add PHP 5.6 FPM to our server using this tutorial which is great.
    I checked everything twice and it looks ok but if I run phpinfo() I get PHP 5.3. All files exists.
    It is strange that i don't have any errors.
    I have checked PHP-FPM and 5.6 version for subdomain in ISPConfig panel. I'm not sure if apache vhost is ok.

    Code:
    <Directory /var/www/lstaszak.domain.dd>
                    AllowOverride None
                    Order Deny,Allow
                    Deny from all
    </Directory>
    
    <VirtualHost *:80>
                                            DocumentRoot /var/www/clients/client7/web143/web
    
                    ServerName lstaszak.domain.dd
                    ServerAlias www.lstaszak.domain.dd
                    ServerAdmin [email protected]
    
                    ErrorLog /var/log/ispconfig/httpd/lstaszak.domain.dd/error.log
    
                    Alias /error/ "/var/www/lstaszak.domain.dd/web/error/"
                    ErrorDocument 400 /error/400.html
                    ErrorDocument 401 /error/401.html
                    ErrorDocument 403 /error/403.html
                    ErrorDocument 404 /error/404.html
                    ErrorDocument 405 /error/405.html
                    ErrorDocument 500 /error/500.html
                    ErrorDocument 502 /error/502.html
                    ErrorDocument 503 /error/503.html
    
                    <IfModule mod_ssl.c>
                    </IfModule>
    
                    <Directory /var/www/lstaszak.domain.dd/web>
                                    Options FollowSymLinks
                                    AllowOverride All
                                    Order allow,deny
                                    Allow from all
                    </Directory>
                    <Directory /var/www/clients/client7/web143/web>
                                    Options FollowSymLinks
                                    AllowOverride All
                                    Order allow,deny
                                    Allow from all
                    </Directory>
    
    
                    <IfModule mod_perl.c>
                            PerlModule ModPerl::Registry
                            PerlModule Apache2::Reload
                            <Directory /var/www/lstaszak.domain.dd/web>
                                    PerlResponseHandler ModPerl::Registry
                                    PerlOptions +ParseHeaders
                                    Options +ExecCGI
                            </Directory>
                <Files *.pl>
                                    SetHandler perl-script
                </Files>
                    </IfModule>
    
                    <IfModule mod_python.c>
                            <Directory /var/www/lstaszak.domain.dd/web>
                                    AddHandler mod_python .py
                                    PythonHandler mod_python.publisher
                                    PythonDebug On
                            </Directory>
                    </IfModule>
    
                    # cgi enabled
            <Directory /var/www/clients/client7/web143/cgi-bin>
                            Order allow,deny
                            Allow from all
                    </Directory>
                    ScriptAlias  /cgi-bin/ /var/www/clients/client7/web143/cgi-bin/
                    AddHandler cgi-script .cgi
                    AddHandler cgi-script .pl
                    # Clear PHP settings of this website
                    <FilesMatch "\.ph(p3?|tml)$">
                                    SetHandler None
                    </FilesMatch>
                    <IfModule mod_fastcgi.c>
                                    <Directory /var/www/clients/client7/web143/cgi-bin>
                                                    Order allow,deny
                                                    Allow from all
                                </Directory>
                    AddHandler php5-fcgi .php
                    Action php5-fcgi /php5-fcgi
                                    Alias /php5-fcgi /var/www/clients/client7/web143/cgi-bin/php5-fcgi-*-80-lstaszak.domain.dd
                    FastCgiExternalServer /var/www/clients/client7/web143/cgi-bin/php5-fcgi-*-80-lstaszak.domain.dd -idle-timeout 300 -socket /var/lib/php5-fpm/web143.sock -pass-header Au$
                    </IfModule>
    
                    # add support for apache mpm_itk
                    <IfModule mpm_itk_module>
                            AssignUserId web143 client7
                    </IfModule>
    
                    <IfModule mod_dav_fs.c>
                    # Do not execute PHP files in webdav directory
                            <Directory /var/www/clients/client7/web143/webdav>
                                    <ifModule mod_security2.c>
                                            SecRuleRemoveById 960015
                                            SecRuleRemoveById 960032
                                    </ifModule>
                                    <FilesMatch "\.ph(p3?|tml)$">
                                            SetHandler None
                                    </FilesMatch>
                            </Directory>
                            DavLockDB /var/www/clients/client7/web143/tmp/DavLock
                            # DO NOT REMOVE THE COMMENTS!
                            # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
                            # WEBDAV END
                    </IfModule>
    
    
    </VirtualHost>
    
    
    
    
    
    ISPConfig also generated in /opt/php-5.6.0/etc/pool.d config file for this site:

    Code:
    [web143]
    
    listen = /var/lib/php5-fpm/web143.sock
    listen.owner = web143
    listen.group = client7
    listen.mode = 0660
    
    user = web143
    group = client7
    
    pm = static
    pm.max_children = 10
    pm.max_requests = 0
    
    chdir = /
    
    php_admin_value[open_basedir] = /var/www/clients/client7/web143/web:/var/www/clients/client7/web143/tmp:/var/www/lstaszak.domain.dd/web:/srv/www/lstaszak.domain.dd/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/home/www/lstaszak.domain.dd/web
    php_admin_value[session.save_path] = /var/www/clients/client7/web143/tmp
    php_admin_value[upload_tmp_dir] = /var/www/clients/client7/web143/tmp
    
    I can see php-fpm pool web 143 processes.
    What could I miss? Could someone help?
    Thank you in advance.
     
  2. budgierless

    budgierless Member HowtoForge Supporter

    its can take 5mins to update after you change the php version, also i installed 5.6.4 php-fpm no problem, so try that one if you have not already done so.
     
  3. woy-s

    woy-s New Member

    I've installed PHP 5.6.0 fastCGI and that works for me. Still have problem with PHP-FPM.
     
  4. budgierless

    budgierless Member HowtoForge Supporter

    you misunderstand my point, for example, I installed php 5.5.19 both fast-cgi & php-fpm, just like you the fast-cgi worked fine, but php-fpm did not, i too did many things to try to get it to work, but failed.
    in the end i worked out the issue was not me at all but the php version, as i was reading the changelog for a newer version and saw fixes that seemed to deal with the issue, so i did a new install with all the same configuration settings with php 5.5.20 and it worked not problem for both fast-cgi & php-fpm.
    I suggest you use the instructions given to installing php 5.6.0 but instead when ever you see it say 5.6.0, change it to 5.6.4 that was you have the latest bug fixed version, and hopefully, no issue.
     

Share This Page