These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Internal Server Error 500 after changing to php5.6 or php 7.1 on the new forum.
hi guys, i have a number of php versions available in virtualmin. These are: 1. php5.6 2. php 7.0 3. php 7.1 4. php 7.2
If i go to Virtualmin/Server Cofniguration/PHP Versions and select either php 7.1 or 5.6 i get an internal server error 500 when i browser http://mydomain.com/phpinfo.php (to check which version is active).
I am checking the active version via url because even though i have selected 5.6 in virtualmin interface, for some reason when i enter the following in command shell
php -v
in command shell the following output is given...
php -v
PHP 7.2.9-1+0~20180901081133.4+stretch~1.gbpdaac35 (cli) (built: Sep 1 2018 08:11:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.9-1+0~20180901081133.4+stretch~1.gbpdaac35, Copyright (c) 1999-2018, by Zend Technologies
This says php 7.2???
I am trying to get 5.6 working and fix the internal server 500 error when accessing url via web browser.
apache error log says the following...
[Thu Sep 06 12:10:01.470592 2018] [fcgid:warn] [pid 11364:tid 140490888423168] (104)Connection reset by peer: [client] mod_fcgid: error reading data from FastCGI server
[Thu Sep 06 12:10:01.470640 2018] [core:error] [pid 11364:tid 140490888423168] [client ] End of script output before headers: phpinfo.php
Howdy,
What if you change the PHP Execution Mode to CGI... that sometimes produces better error messages. Does that provide a more clear explanation of what's going on there?
-Eric
changed to CGI...
- - [06/Sep/2018:15:34:09 +1000] "GET /phpinfo.php HTTP/1.1" 500 714 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
- - [06/Sep/2018:15:34:15 +1000] "GET /manual/ko/mod/mod_setenvif.html HTTP/1.1" 200 8876 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
still got server 500 error of course
I have checked to make sure that the phpinfo.php file is owned by the virtualmin virtual server group and user. Still got the error.
https://ajecreative.com.au
still not working, i can only run php7.0 and 7.2 without 500 internal server error.
i need php5.6 for boxbilling.
I have deleted php5.6 and want to start again.
Can someone give me a foolproof working method of installing php5.6 on ubuntu 16.04 please
Will this tutorial work... https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
https://ajecreative.com.au
is there no one with enough knowledge to solve this problem here? Surely i dont have to go to a competing control panel forum (ISPConfig) to get answers?
I have performed the following procedure
apt-get install apt-transport-https lsb-release ca-certificates
Get the gpg key:
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
Add the new repository to your sources:
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
Install PHP5.6
apt-get update
apt-get install php5.6
but it still gives me an error 500.
If i change from Fast CGI to FPM i get an error 503 service unavailable
i have run recheck configuration
Checking Configuration
The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
Your system has 1.66 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
BIND DNS server is installed, and the system is configured to use it.
Mail server Postfix is installed and configured.
Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.
Apache is installed.
The following PHP versions are available : 5.6.37 (/usr/bin/php5.6), 7.0.31 (/usr/bin/php-cgi7.0), 7.1.20 (/usr/bin/php7.1), 7.2.9 (/usr/bin/php-cgi7.2)
PHP-FPM support is available on this system.
Apache is configured to host SSL websites.
MySQL is installed and running.
ProFTPD is installed.
Logrotate is installed.
Plugin DAV Login is installed OK.
Plugin Protected web directories is installed OK.
Using network interface eth0 for virtual IPs.
IPv6 addresses are available, using interface eth0.
Default IPv4 address for virtual servers is 10.152.0.4.
Virtualmin could not work out the default IPv6 address for virtual servers on your system. You will need to update either the Network interface for virtual addresses or Default virtual server IP address fields on the module configuration page.
Both user and group quotas are enabled for home and email directories.
All commands needed to create and restore backups are installed.
The selected package management and update systems are installed OK.
Chroot jails are available on this system
https://ajecreative.com.au
Here is the output of
uupdate-alternatives --config php
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php7.2 72 auto mode
1 /usr/bin/php5.6 56 manual mode
2 /usr/bin/php7.0 70 manual mode
3 /usr/bin/php7.1 71 manual mode
4 /usr/bin/php7.2 72 manual mode
Press <enter> to keep the current choice[*], or type selection number:
Although i select php 5.6 in virtualmin, it appears that auto mode is choosing php 7.2. Does this mean that 7.2 is still active? Does this have anything to do with error when i browse url domain.com/phpinfo.php? does this also have something to do with why i get the same error when i choose php 7.1? (remembering that only php 7.2 and 7.0 are working)
Finally, i am not sure whether i am having problems with this because i am logged in as root? (It seems as if anything that i read associated with the virtual server is returning information from the actual parent hosting server itself...instead of virtualmin/virtual server).
https://ajecreative.com.au
Is the configuration recheck working and detecting the other PHP version? (I guess it must be since you're able to select the other version for this virtual host, but the fcgi/cgi files get regenerated during the configuration recheck when you install new PHP versions, so it's a necessary step)
Alternatives won't have control over what gets executed from Apache, as that's configured on a per-domain basis. That's a red herring...you don't need to fiddle with alternatives in this context.
--
Check out the forum guidelines!
I am logged in as administrator and have pasted below the output in virtualmin/system settings/recheck configuration...
The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
Your system has 1.66 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
BIND DNS server is installed, and the system is configured to use it.
Mail server Postfix is installed and configured.
Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.
Apache is installed.
The following PHP versions are available : 5.6.37 (/usr/bin/php5.6), 7.0.31 (/usr/bin/php-cgi7.0), 7.1.20 (/usr/bin/php7.1), 7.2.9 (/usr/bin/php-cgi7.2)
PHP-FPM support is available on this system.
Apache is configured to host SSL websites.
MySQL is installed and running.
ProFTPD is installed.
Logrotate is installed.
Plugin DAV Login is installed OK.
Plugin Protected web directories is installed OK.
Using network interface eth0 for virtual IPs.
IPv6 addresses are available, using interface eth0.
Default IPv4 address for virtual servers is 10.152.0.4.
Virtualmin could not work out the default IPv6 address for virtual servers on your system. You will need to update either the Network interface for virtual addresses or Default virtual server IP address fields on the module configuration page.
Both user and group quotas are enabled for home and email directories.
All commands needed to create and restore backups are installed.
The selected package management and update systems are installed OK.
Chroot jails are available on this system
.. your system is ready for use by Virtualmin.
here is the result of Dashboard/software versions...
Operating system Debian Linux 9
Perl version 5.024001
Path to Perl /usr/bin/perl
BIND version 9.10
Postfix version 3.1.8
Mail injection command /usr/lib/sendmail -t
Apache version 2.4.25
PHP versions 5.6.37, 7.0.31, 7.1.20, 7.2.9
Logrotate version 3.11.0
MySQL version 10.1.26-MariaDB-0+deb9u1
ProFTPD version 1.35
I installed latest updates and then selected CGI/FastCGi and then different php versions.
php versions installed are 5.6, 7.0, 7.1, and 7.2.
I cannot access versions 5.6, or 7.1. (7.0 and 7.2 allow me to browse domain.com/phpinfo.php)
https://ajecreative.com.au
I am still trying to problem solve this and not making any headway. I am just looking at the virtualmin>services>configure website>edit directives file and here is a link to a copy
Can someone check this and explain it to me. Is this file correct?
it shows referral to all of the php versions (including php 5.6)
Also, i was hoping to change the fcgid timeout (just in case this is the problem causing server error 500), however, under virtualmin>services, php 5.6 is not listed. Why is php 5.6 not listed here and yet is shown in the file i have provided the link too?
https://ajecreative.com.au
get anywhere with this ?
nope...no solution. i want to install Blesta on one of my virtualmin viirtual servers. It runs wth php 7.1 (not sure about 7.2). As soon as i change the php version to either 7.0 or 7.1 i get an internal server error 500.
php 7.2 works fine
would really apprecate it if someone had a solution that works.
https://ajecreative.com.au