0

New Vagrant box. I have a provision script that sets up PHP 5.6 and 7.1 using fastcgi as I'm doing an upgrade test so want to toggle versions. Starting with PHP5.6 enabled.

Virtual host is as follows:

ServerName local
DocumentRoot /var/www/html
<IfModule mod_fastcgi.c>
    AddHandler php56-fcgi-www .php
    Action php56-fcgi-www /php56-fcgi-www
    Alias /php56-fcgi-www /usr/lib/cgi-bin/php56-fcgi-www
    FastCgiExternalServer /usr/lib/cgi-bin/php56-fcgi-www -socket /run/php/php5.6-fpm.sock -idle-timeout 1800 -pass-header Authorization
    <Directory "/usr/lib/cgi-bin">
        Require all granted
    </Directory>
</IfModule>

<IfModule mod_fastcgi.c>
    AddHandler php71-fcgi-www .php
    Action php71-fcgi-www /php71-fcgi-www
    Alias /php71-fcgi-www /usr/lib/cgi-bin/php71-fcgi-www
    FastCgiExternalServer /usr/lib/cgi-bin/php71-fcgi-www -socket /run/php/php7.1-fpm.sock -idle-timeout 1800 -pass-header Authorization
    <Directory "/usr/lib/cgi-bin">
        Require all granted
    </Directory>
</IfModule>

<IfModule mod_fastcgi.c>
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
        SetHandler php56-fcgi-www
    </FilesMatch>
</IfModule>

<Directory "/var/www/">
    AllowOverride All
</Directory>

<VirtualHost *:80>
    DocumentRoot /var/www/html/mysite/public-www
    ServerName mysite.local

    <IfModule mod_fastcgi.c>
        <FilesMatch ".+\.ph(p[345]?|t|tml)$">
            SetHandler php56-fcgi-www
        </FilesMatch>
    </IfModule>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /var/www/phpmyadmin
    ServerName phpmyadmin.mysite.local

    <IfModule mod_fastcgi.c>
        <FilesMatch ".+\.ph(p[345]?|t|tml)$">
            SetHandler php56-fcgi-www
        </FilesMatch>
    </IfModule>
</VirtualHost>

PHPMyAdmin functions fine. But the visiting mysite.local is displaying a generic browser 500 error. I added a phpinfo.php to check my settings. I'm happy to share the entire output, but here are the relevant basics:

display_errors = On
error_reporting = E_ALL
error_log = /var/log/php_errors.log

I found the error file above wasn't being created on error, so I manually created it and chmod it to 0777 for fun. It remains empty after I see the 500 load. I have also checked /var/log/apache2 logs. Access log shows the 500 response but there is nothing in error_log. Also looked in php5.6-fpm.log. Nothing.

Question is simple: How can I possibly find the reason for a 500 error?

Aaryn
  • 1,601
  • 2
  • 18
  • 31

1 Answers1

0

Solved this with the help of this answer to a question involving nginx. I found that there were three include lines in this code with the @ silencer operator. After removing the @ the errors displayed on screen and in the log file defined above.

Aaryn
  • 1,601
  • 2
  • 18
  • 31