How to tell difference between two nearly identical Hestia servers

I have two nearly identical Hestia servers. One is a year old and the other is a few days old. Both are Debian 11.9 and Hestia 1.8.11. On the Configure server, web server tab, the original one claims to have php8.2 but does not really and 8.1 is set for default. The new one claims to have 8.2 and 8.3 and does have both with 8.2 set for default.

I set both servers for 8.1 and both domains for 8.1. I then installed a version of Friendica which is compatible with php 8.1. On the older server, the application works fine. However, on the newer VPS, the application install page will not appear. All I get is the white screen of death. I checked for PHP errors, but there were none on the page. I am wondering if there is any way I can figure out what the difference is between these two nearly identical servers.

I suppose it is because Friendica is trying to use some php functions that are disabled. I checked it and seems Friendica needs these functions:

pcntl_fork
pcntl_waitpid
pcntl_signal
exec
system
passthru
shell_exec
proc_open

Check if these functions are disabled in php 8.1:

grep disable_functions /etc/php/8.1/fpm/php.ini

If they are disabled, edit file /etc/php/8.1/fpm/php.ini and remove them from disable_functions directive and once done restart php8.1-fpm:

Warning: disabling those functions could be a security risk.

systemctl restart php8.1-fpm

Now try to install Friendica again.

3 Likes

Thank you for this information. You appear to be correct. I am researching this issue right now. But I have two questions. How were you able to figure out that Friendica needed these functions? It does not appear to be in their documentation. Is there any place I can go to double check what functions are needed?

Second, why does a new install of Hestia come with all of these functions disabled?

This were all the functions that were disabled on my new installation of Hestia:

disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen

I created this script to do the check:

#!/usr/bin/env bash
dir=${1:-/var/lib/roundcube/}
if [[ -d "$dir" ]]; then
        echo "Checking php disabled functions but used in $dir"
        echo
else
        echo "Error: $dir doesn't exist" >&2
        exit 1
fi
list="$(grep '^sed.*fpm\/' /usr/local/hestia/install/upgrade/manual/secure_php.sh | awk -F '/' '{print $3}' | cut -d ' ' -f3 | tr ',' ' ')"
for i in $list; do
        if grep -REq "$i\(.*\)" "$dir" &>/dev/null; then
                echo "$i"
        fi
done

So, I downloaded the software, unzipped it and ran the script telling it to scan the directory.

 ./list_used_php_disabled_functions /tmp/friendica/friendica-2024.03
Checking php disabled functions but used in /tmp/friendica/friendica-2024.03

pcntl_fork
pcntl_waitpid
pcntl_signal
exec
system
passthru
shell_exec
proc_open

Because it is a security risk to allow those functions.

2 Likes

I have confirmed that this solved the problem. Thank you again for your help.

2 Likes