How can I troubleshoot what's stopping me from using PHP 8.1?

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - 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.
Post Reply
Forsh
Joomla! Explorer
Joomla! Explorer
Posts: 351
Joined: Sat Aug 20, 2005 3:05 pm
Location: 1135 N Broadway #213 Denver, CO 80203
Contact:

How can I troubleshoot what's stopping me from using PHP 8.1?

Post by Forsh » Sat Dec 09, 2023 3:30 pm

I have two Joomla installs on the same hosting account. One is a Joomla 3x install and the other is a Joomla 4x install. In Cpanel, when I switch over to PHP 8.1 my Joomla 4x install is fine, but my Joomla 3x install just throws up errors when making the switch.

Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in ...public_html/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ...public_html/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in ...public_html/libraries/src/Input/Input.php on line 31

Warning: session_name(): Session name cannot be changed after headers have already been sent in ...public_html/libraries/joomla/session/handler/native.php on line 128

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in ...public_html/libraries/src/Input/Cookie.php on line 21

Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /home/denvygxk/public_html/libraries/joomla/session/handler/native.php on line 235
Error: Failed to start application: Failed to start the session because headers have already been sent by "...public_html/libraries/vendor/joomla/input/src/Input.php" at line 41.

I want to upgrade the Joomla 3x install to Joomla 4x but I don' think I can easily. Is there a way to troubleshoot what might be stopping my Joomla 3x website from running on PHP 8.1?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24986
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: How can I troubleshoot what's stopping me from using PHP 8.1?

Post by pe7er » Sat Dec 09, 2023 3:45 pm

The "Deprecated:" messages are to warn you that PHP code is used that will give real errors when you upgrade to a higher PHP version in the future.

Because of those warnings are displayed on the screen, the "Warning:" is triggered.
When you switch off PHP error reporting, you're website might work for the moment.
But that is just postponing the problem to the future...

To solve the errors you could switch on Joomla's debug mode.
It will give you a trace stack of the real errors.
When you post that here, other people can help you with finding the issue(s) that causes the problems.
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

Forsh
Joomla! Explorer
Joomla! Explorer
Posts: 351
Joined: Sat Aug 20, 2005 3:05 pm
Location: 1135 N Broadway #213 Denver, CO 80203
Contact:

Re: How can I troubleshoot what's stopping me from using PHP 8.1?

Post by Forsh » Sat Dec 09, 2023 4:26 pm

Thank you for the information. Just a follow-up question. I tuned off the error reporting and those messages did go away but I get a template error:
Screenshot 2023-12-09 092152.png
However, I did install the most current version of Gantry 5:

https://gantry.org/downloads

My website was setup initially in 2015 and was built using Rockettheme Xenon:

https://rockettheme.com/joomla/templates/xenon

Any thoughts why switching over to PHP 8.1 would give me the Gantry Framework error when I installed the most updated version of Gantry 5? With PHP 7.4 set this template error doesn't show.

This is what I am experiencing (different template but still rockettheme running on Gantry 5): https://rockettheme.com/forum/gantry-so ... or?start=0

One of the solutions suggested in that thread is "That is a failed installation of Gantry 5 - just enable all of the gantry 5 plugins in extension manager and it will work again." However, I have every Gantry plugin activated and Gantry 4 is not installed. The other solution they mention is that under PHP 8 to enable mysqli and that is enabled and still doesn't help anything.
You do not have the required permissions to view the files attached to this post.


Post Reply

Return to “Administration Joomla! 3.x”