Modified PHP settings caused errors on my Joomla 3.x site
Moderators: mandville, General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Explorer
- Posts: 440
- Joined: Sun Jun 11, 2006 7:31 am
- Location: Planet Earth Most of the Time
Modified PHP settings caused errors on my Joomla 3.x site
I am going through trying to harden security on all my Joomla sites.
I have been experimenting with PHP settings and turned these off using a php.ini file in the main folder of this site on my shared hosting server (SiteGround).
expose_php = Off
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
I just tried it and got this error:
Warning: array_key_exists() expects parameter 2 to be array, null given in /home/xxxxx/public_html/domain.com/libraries/cms.php on line 62
Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/home/xxxxx/public_html/domain.com/libraries/cms.php" at line 62.
Server is shared server, but I uploaded php.ini to the specific website folder. Settings are:
PHP Built On Linux 3.12.18-clouder0 #85 SMP Mon Apr 3 10:28:14 EEST 2017 x86_64
Database Version 5.6.36-82.1-log
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.0.25
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.8.2 Stable [ Amani ] 7-November-2017 15:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Any ideas why the site failed?
Thanks!
I have been experimenting with PHP settings and turned these off using a php.ini file in the main folder of this site on my shared hosting server (SiteGround).
expose_php = Off
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
I just tried it and got this error:
Warning: array_key_exists() expects parameter 2 to be array, null given in /home/xxxxx/public_html/domain.com/libraries/cms.php on line 62
Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/home/xxxxx/public_html/domain.com/libraries/cms.php" at line 62.
Server is shared server, but I uploaded php.ini to the specific website folder. Settings are:
PHP Built On Linux 3.12.18-clouder0 #85 SMP Mon Apr 3 10:28:14 EEST 2017 x86_64
Database Version 5.6.36-82.1-log
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.0.25
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.8.2 Stable [ Amani ] 7-November-2017 15:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Any ideas why the site failed?
Thanks!
Always learning...
-
- Joomla! Virtuoso
- Posts: 4025
- Joined: Mon Nov 25, 2013 4:35 pm
- Location: Montreal, Canada
- Contact:
Re: Modified PHP settings caused errors on my Joomla 3.x site
Your $_SERVER PHP array is passed empty. Not sure which of the above settings caused it. I would experiment by enabling them one by one until the culprit is found.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter
https://twitter.com/itoctopus - Follow us on Twitter
-
- Joomla! Explorer
- Posts: 440
- Joined: Sun Jun 11, 2006 7:31 am
- Location: Planet Earth Most of the Time
Re: Modified PHP settings caused errors on my Joomla 3.x site
Ok thanks I will try that. Cheers!
Always learning...
- JAVesey
- Joomla! Hero
- Posts: 2635
- Joined: Tue May 14, 2013 1:21 pm
- Location: Cardiff, Wales, UK
- Contact:
Re: Modified PHP settings caused errors on my Joomla 3.x site
Yes! Same thing happened to me after I moved servers and updated the PHP version.webgyrl wrote:Warning: array_key_exists() expects parameter 2 to be array, null given in /home/xxxxx/public_html/domain.com/libraries/cms.php on line 62
Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/home/xxxxx/public_html/domain.com/libraries/cms.php" at line 62.
...
Any ideas why the site failed?
Solution:
In /administrator:
System > Clear Caches
Clear the site cache and the expired cache.
John V
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28
-
- Joomla! Explorer
- Posts: 440
- Joined: Sun Jun 11, 2006 7:31 am
- Location: Planet Earth Most of the Time
Re: Modified PHP settings caused errors on my Joomla 3.x site
Thanks! I got it fixed.
Always learning...
- JAVesey
- Joomla! Hero
- Posts: 2635
- Joined: Tue May 14, 2013 1:21 pm
- Location: Cardiff, Wales, UK
- Contact:
Re: Modified PHP settings caused errors on my Joomla 3.x site
It would help others if you shared the solution.webgyrl wrote:Thanks! I got it fixed.
John V
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28
-
- Joomla! Explorer
- Posts: 440
- Joined: Sun Jun 11, 2006 7:31 am
- Location: Planet Earth Most of the Time
Re: Modified PHP settings caused errors on my Joomla 3.x site
It was with the clear cache suggestion above my latest post.JAVesey wrote:It would help others if you shared the solution.webgyrl wrote:Thanks! I got it fixed.
Always learning...
- JAVesey
- Joomla! Hero
- Posts: 2635
- Joined: Tue May 14, 2013 1:21 pm
- Location: Cardiff, Wales, UK
- Contact:
Re: Modified PHP settings caused errors on my Joomla 3.x site
webgyrl wrote:It was with the clear cache suggestion above my latest post.
John V
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28