J3.10.12 incompatible with PHP 8+ Topic is solved

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
oldrock
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jul 15, 2023 7:33 pm

J3.10.12 incompatible with PHP 8+

Post by oldrock » Sat Jul 15, 2023 7:56 pm

Joomla keeps telling me I have to update PHP from 7.4.33 because it's obsolete. But core J3.10.12 source includes deprecated PHP code, apparently all in .../libraries/vendor/joomla/input/src/Input.php.

Here's what I get instead of the home screen when I set it to PHP 8.3:

Code: Select all

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 /home/customer/www/londonderryumc.org/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 /home/customer/www/londonderryumc.org/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 /home/customer/www/londonderryumc.org/public_html/libraries/src/Input/Input.php on line 31

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 /home/customer/www/londonderryumc.org/public_html/libraries/src/Input/Cookie.php on line 0
Error: Failed to start application: Failed to start the session because headers have already been sent by "/home/customer/www/londonderryumc.org/public_html/libraries/vendor/joomla/input/src/Input.php" at line 41.
Any suggestions?

Thanks in advance.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: J3.10.12 incompatible with PHP 8+

Post by brian » Sat Jul 15, 2023 8:01 pm

php 8.3 does not exist so I assume that is a typo

What you are seeing is a deprecation notice. Not the same as "incompatible"

In global configuration set error reporting to simple or none
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9747
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: J3.10.12 incompatible with PHP 8+

Post by AMurray » Sat Jul 15, 2023 9:40 pm

Refer to https://downloads.joomla.org/technical-requirements. I would suggest using the recommended PHP version (in this case 8.0.x for 3.10). Possibly 8.1 will also work but not 8.2 - and the same goes for extensions as these may not work on the latest PHP.
Regards - A Murray
General Support Moderator

oldrock
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jul 15, 2023 7:33 pm

Re: J3.10.12 incompatible with PHP 8+

Post by oldrock » Sun Jul 16, 2023 8:25 pm

Thanks A Murry and Brian, but it's still not working. I set Error Reporting to None and tried each of the four PHP version 8 options offered by Siteground: 8.0.29, 8.1.21, 8.2.8, and 8.3.0. In each case I get the following in place of the home page:

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:

Home Page
If difficulties persist, please contact the System Administrator of this site and report the error below.


When I set it back to 7.4.33 it works fine.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9747
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: J3.10.12 incompatible with PHP 8+

Post by AMurray » Sun Jul 16, 2023 9:17 pm

Joomla 3.10. works on PHP 8.0/8.1 so maybe it's an extension, or a module or template that is the issue.

I wonder if there's more messages (PHP errors) that are not being shown. Set the error reporting to maximum, and enable debug. Then report back any additional errors, to what you have already provided in your original question.

Debug may point to a more exact issue causing the problem.
Regards - A Murray
General Support Moderator

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: J3.10.12 incompatible with PHP 8+

Post by nacc » Sun Jul 16, 2023 9:21 pm

According to the official PHP website, the currently supported versions of PHP do not list PHP 8.3 (as @brian mentioned yesterday); PHP 8.3 is not expected to be released until late November this year. It's strange that you claim SiteGround is offering PHP 8.3. According to SiteGround's website (see [edited] screenshot below), they only offer PHP Versions 8.1, 8.0, 7.4 & 7.3. There's no mention of PHP 8.2 or 8.3.

As this forum has discussed in several places before, J 3.10 does not work with PHP 8.2+ and it does not always work well with PHP 8.1. Many extensions developed for J 3.10 do not work with PHP 8.x.
sitegroundHostingPlans.png
The reason you are getting the error messages is because of a PHP error. The reason you are getting these errors is probably because of a third-party extension that you installed that does not work with PHP 8.x.

Have you read about Joomla debug mode and setting the error reporting level to maximum? If you enable J debug mode and change the error reporting level to maximum, you should get a detailed stack trace that will identify the source of the problem.

oldrock wrote:
Sat Jul 15, 2023 7:56 pm
Joomla keeps telling me I have to update PHP from 7.4.33 because it's obsolete.
As far as the advisory you see when you login to the backend of your J 3.10.12 website is concerned, it's your decision whether to heed that advice or continue to use PHP 7.4 and, maybe, disable the plugin that causes "Joomla ... telling" you that PHP 7.4.33 is obsolete.

Yes, it's true that PHP 7.4.33 is end-of-life—just like it's true that many previous releases of Joomla are EOL—but that doesn't prevent people using those things (at least, until such time as your webhosting provider removes whatever is required to operate your current website(s))
You do not have the required permissions to view the files attached to this post.

oldrock
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jul 15, 2023 7:33 pm

Re: J3.10.12 incompatible with PHP 8+

Post by oldrock » Sun Jul 16, 2023 9:59 pm

Thanks for your continued help with this. It's all working now.

With debug on and maximum error reporting I didn't get anything useful with PHP set to 8.1.21. Just the same deprecation warnings and no home page rendering.

However, when I set PHP back to 7.4.33 with debug and max errors I got a lot of warnings about a particular extension module. I've unpublished that and everything now works with 8.1.21.

FYI, I'll attach a screen shot of Siteground's PHP version selection dialog, which includes 8.3.0. I didn't know it was still under development. Siteground does allow 8.3.0 to be selected.

Thanks again.
Graeme
You do not have the required permissions to view the files attached to this post.

nettemor
Joomla! Explorer
Joomla! Explorer
Posts: 304
Joined: Fri Dec 08, 2006 10:44 pm
Location: Norway

Re: J3.10.12 incompatible with PHP 8+

Post by nettemor » Mon Dec 04, 2023 11:24 am

Hi, can you tell me the name of the extension that you had to remove/unpublish?
I have exact the same errors as you, with line 41, 170, 31 and so on.
Appreciate your help :)


Post Reply

Return to “Administration Joomla! 3.x”