When trying to access Webmail on Horde, the following errors occur:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, <email@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
In the Apache log /var/log/httpd/error_log file there is:
PHP Fatal error: Directive 'magic_quotes_gpc' is no longer available in PHP in Unknown on line 0 [<date>] [warn] [client <client_ip>] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [<date>] [error] [client <client_ip>] Premature end of script headers: login.php
Alternatively, the following error appears in "
Directive 'allow_call_time_pass_reference' is no longer available in PHP.
A PHP upgrade may mean that existing PHP 5.3 directives are incompatible with PHP 5.4 in the Horde php.ini file. Here is a list of the incompatible directives:
register_globals register_long_arrays magic_quotes_gpc magic_quotes_runtime magic_quotes_sybase allow_call_time_pass_reference define_syslog_variables highlight.bg session.bug_compat_42 session.bug_compat_warn y2k_compliance safe_mode safe_mode_gid safe_mode_include_dir safe_mode_exec_dir safe_mode_allowed_env_vars safe_mode_protected_env_vars zend.ze1_compatibility_mode
Go to /etc/psa-webmail/horde/horde/php.ini and comment out the following line:
magic_quotes_gpc = On
Restart the httpd service:
/etc/init.d/httpd stop /etc/init.d/httpd start
Make sure that the permissions for cgi_wrapper are correct:
# ls -la /var/www/cgi-bin/cgi_wrapper/cgi_wrapper -rwxr-xr-x 1 root root 18688 Jul 24 2013 /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
Make sure that the directives above are disabled, or disable them in Horde's php.ini
less /etc/psa-webmail/horde/horde/php.ini |grep time_pass ;allow_call_time_pass_reference = On