Issues with php7

5 posts / 0 new
Last post
#1 Thu, 03/31/2016 - 18:45

Issues with php7


I hope you guys can help me a bit here with setting up PHP 7 on Debian 8.

I've installed PHP7 on my Debian 8 using the method described here: After that, I went into virtualmin and changed php version on a virtual server to 7.0.5 under server configuration -> php versions (both php 5.6.17 and 7.0.5 were listed).

From server configuration -> website options I have php enabled through fcgi and under php information I can see a lot of modules for PHP 7.0. I also did a recheck of the virtualmin configuration and it told me that: The following PHP versions are available : 5.6.17 (/usr/bin/php5-cgi), 7.0.5 (/usr/bin/php7.0).

So it seems fine... right?

Problem is, I'm testing with a simple php page with only this code:


But I just get a Internal Server Error displayed. In my log I see this error:

[Fri Apr 01 01:26:13.339029 2016] [fcgid:warn] [pid 86577] (104)Connection reset by peer: [client] mod_fcgid: error reading data from FastCGI server [Fri Apr 01 01:26:13.339073 2016] [core:error] [pid 86577] [client] End of script output before headers: index.php

What am I missing to get php 7 running?


Sun, 04/17/2016 - 19:11

When u want Run your Website with PHP 7.0 then maybe is this your Solution:

1. Go to your Domain-Directory
cd /home/yourdomain.tld/fcgi-bin

2. Then remove a Bit:
chattr -i php7.0.fcgi
and Edit the fcgi-File with nano or vi
nano php7.0.fcgi

3. Edit the follow line:
exec /usr/bin/php7.0
to the follow:
exec /usr/bin/php-cgi7.0

4. Write and Exit, then take again chattr bit:
chattr +i php7.0.fcgi

5. Restart Apache and your Web will Run with PHP 7.0.
service apache2 restart

Sun, 04/17/2016 - 23:25


FCGID doesn't always produce great errors.

What you may want to try, if you are seeing generic errors like that one, is to temporarily switch the PHP Execution Mode to "CGI".

After doing that -- access your website again, and then take a look at your log files. After doing that, what error(s) do you see?


Mon, 04/18/2016 - 11:22

Hi andreycheck

The Problem what dyvel have and i had is, that virtualmin itself not support PHP 7 yet. But when i want use PHP 7.0, then i can edit the php7.0-fcgi (see my Post) and normaly use PHP 5.6 in a ohter directory, if needed. :)

Mon, 07/17/2017 - 11:20

If php7.1-cgi is not installed when you check your configuration, virtualmin generates invalid fcgi scripts. There appears no way to force Virtualmin to fix them - deleting them and checking configuration does not help. I have found two ways:

1) Uninstall PHP 7.1 and check config in web UI, reinstall PHP 7.1 and check config in web UI

2) Make a good version of the file and copy everywhere with something like:

for d in $(locate php7.1.fcgi); do chattr -i $d; cp --no-preserve=mode,ownership,timestamps php7.1.fcgi $d; chattr +1 $d; done

Topic locked