Sometimes our zPanel server management clients open support ticket saying that the zPanel homepage or some specific pages (like DNS manager) will shows a blank page (white screen). Since the ZPanel is written in PHP, most cases it will be related to permission issues of PHP functions(). The apache error log will give the specific reason of the problem.
Tracing the problem
Login to the zPanel server using SSH and monitor the apache error log in real-time using the command,
tail -f /var/log/apache2/error.log | grep xx.xx.xx.xx
Note : The IP xx.xx.xx.xx is your public IP
Now open the zPanel page in web browser which shows error. Return to the error log screen and find the line matching as below,
[Sat Aug 17 03:35:54 2013] [error] [client xx.xx.xx.xx] PHP Warning: system() has been disabled for security reasons in /etc/zpanel/panel/modules/dns_manager/code/controller.ext.php on line 1674, referer: http://IP/?module=dns_manage
From the above error log, it is clear the the issue is related with the PHP function system(), which is disabled. Other functions like exec() will also cause the the white-screen errors.
Allowing the PHP function()
Edit the Apache Virtual Host configuration file,
vi /etc/zpanel/configs/apache/httpd-vhosts.conf
Note : Please keep a backup copy of httpd-vhosts.conf before editing in case if something went wrong!
Find the VirtualHost entry for the Control Panel,
# Configuration for ZPanel control panel.
<VirtualHost *:80>
ServerAdmin admin@hosting.com
DocumentRoot “/etc/zpanel/panel/”
php_admin_value suhosin.executor.func.blacklist “passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg”
ServerName host.hosting.com
ServerAlias *.host.hosting.com
AddType application/x-httpd-php .php
<Directory “/etc/zpanel/panel/”>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Custom settings are loaded below this line (if any exist)
</VirtualHost>
Have a look at the following line,
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg"
The function system() is blacklisted, we have remove the entry ‘system’ to allow the execution. Save the configuration file httpd-vhosts.conf
Apply the changes
We need to restart the Apache server to apply the changes
service apache2 restart
Open the phpinfo page to confirm the ‘system’ function is removed from the
suhosin.executor.func.blacklist
For more assistance you can contact our zPanel server management team