Unable to upgrade to PHP 8.x
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.
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.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Unable to upgrade to PHP 8.x
I have a Joomla 3 site that I recently updated to 3.10.10 . In fact, I have an XAMPP version on my PC, and both an online "Live" site and an online private "Dev" site version that I use for testing changes that I will then add to the live site.
I know that I need to upgrade to Joomla 4.x, but I find I cannot run my site with PHP 8.x -- not on the XAMPP site or the online "Dev" site. It runs fine with PHP 7.4, but when I try to use PHP 8.0 or 8.1, I get an error message "0 - Call to a member function isAdmin() on null".
I get exactly the same error message on both my local XAMPP site and my online Dev site.
I have searched online (including in this forum) for clues on how to fix this, and found a promising explanation that indicated that the poster's old version of Joomla did not have the newer version of PHP in his plugin phpversioncheck.php, so he needed to update that. I checked the phpversioncheck.php in my sites, and they all support php 8.0 and 8.1.
Any other suggestions?
I know that I need to upgrade to Joomla 4.x, but I find I cannot run my site with PHP 8.x -- not on the XAMPP site or the online "Dev" site. It runs fine with PHP 7.4, but when I try to use PHP 8.0 or 8.1, I get an error message "0 - Call to a member function isAdmin() on null".
I get exactly the same error message on both my local XAMPP site and my online Dev site.
I have searched online (including in this forum) for clues on how to fix this, and found a promising explanation that indicated that the poster's old version of Joomla did not have the newer version of PHP in his plugin phpversioncheck.php, so he needed to update that. I checked the phpversioncheck.php in my sites, and they all support php 8.0 and 8.1.
Any other suggestions?
Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
-
- Joomla! Enthusiast
- Posts: 195
- Joined: Mon Aug 26, 2019 10:58 am
- Location: Zagreb, Croatia
- Contact:
Re: Unable to upgrade to PHP 8.x
Stay on php 7.4, Joomla 4 will work on php 8.0, this one can't.
- brian
- Joomla! Master
- Posts: 12629
- Joined: Fri Aug 12, 2005 7:19 am
- Location: Leeds, UK
- Contact:
Re: Unable to upgrade to PHP 8.x
Its nothing to do with the php version. The problem is that the code shown in the error message is not compatible with joomla 4. You will need to find that code in one of your extensions and chanage it to isSite('administrator')
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/
- pe7er
- Joomla! Master
- Posts: 24087
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Unable to upgrade to PHP 8.x
Yes, you can stay on PHP 7.4 until 28 Nov 2022.
After that the PHP developers won't release any security updates anymore for the 7.4 series:
https://www.php.net/supported-versions.php
As Brian wrote, you have 3rd party extensions that are not compatible with Joomla 4.
You could contact the developers of those extensions, try to fix the issues yourself, or remove the extensions (and use alternatives that are PHP 8 compatible).
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Re: Unable to upgrade to PHP 8.x
Hi, Peter --
OK, thanks for your replies. Let me ask about a plan to figure out which extension or extensions are the problem.
The problem is severe in that I cannot even get in to the Admin when running PHP 8.x. So it seems like I would have to do something like this:
1) Set PHP 7.4 to get in to the Admin, at which point I could disable one extension, or maybe even all of them
2) Change to PHP 8.1 and try to run the site.
I could do something like this on the xampp site on my hard drive, and see what I could learn.
Does this plan sound reasonable to you? Any suggestions? Thanks in advance for your guidance!
OK, thanks for your replies. Let me ask about a plan to figure out which extension or extensions are the problem.
The problem is severe in that I cannot even get in to the Admin when running PHP 8.x. So it seems like I would have to do something like this:
1) Set PHP 7.4 to get in to the Admin, at which point I could disable one extension, or maybe even all of them
2) Change to PHP 8.1 and try to run the site.
I could do something like this on the xampp site on my hard drive, and see what I could learn.
Does this plan sound reasonable to you? Any suggestions? Thanks in advance for your guidance!
Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
- pe7er
- Joomla! Master
- Posts: 24087
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Unable to upgrade to PHP 8.x
Yes, testing it on a local site is a good idea.
I would:
I would:
- set the PHP version to 7.4
- create a backup using Akeeba Backup
- install it in a local environment (XAMP) using Akeeba kickstart
- in Global Configuration set Error Reporting to Maximum
- disable all 3rd party Plugins (especially the ones of Type "System" and "Content")
- switch the local environment to PHP 8.0 and test again
- if everything works ok, switch on the plugins you just disabled, one-by-one
- test the website after every new enabled plugin to determine which one crashed your site.
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Re: Unable to upgrade to PHP 8.x
As I typed notes on this, it occurs to me that it would be easier to do this testing on the online Dev site, since that lets me quickly change PHP version in CPANEL. XAMPP versions each have a specific PHP version baked in, making it hard to do this testing.
Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
-
- Joomla! Virtuoso
- Posts: 4963
- Joined: Tue Aug 23, 2005 1:56 pm
- Location: South coast, UK
- Contact:
Re: Unable to upgrade to PHP 8.x
Use wampserver rather than Xampp, you can change php version on the fly with wampserver.
http://www.gadsolutions.biz Electrical services
http://www.electrical-testing-safety.co.uk Testing services
http://www.electrical-testing-safety.co.uk Testing services
- Webdongle
- Joomla! Master
- Posts: 42364
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Unable to upgrade to PHP 8.x
All except I would recommend Wamp instead of xampp because with Wamp you can change php on the flype7er wrote: ↑Thu Jul 14, 2022 2:05 pmYes, testing it on a local site is a good idea.
I would:
- set the PHP version to 7.4
- create a backup using Akeeba Backup
- install it in a local environment (XAMP) using Akeeba kickstart
- in Global Configuration set Error Reporting to Maximum
- disable all 3rd party Plugins (especially the ones of Type "System" and "Content")
- switch the local environment to PHP 8.0 and test again
- if everything works ok, switch on the plugins you just disabled, one-by-one
- test the website after every new enabled plugin to determine which one crashed your site.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Re: Unable to upgrade to PHP 8.x
Hi, Peter
"Here there be dragons..."
Yesterday I started following your suggested plan, typing lots of notes as I went. In Global Configuration, I set Error Reporting to Maximum, then I disabled System plugins and tried it with PHP 7.4 : where it ran with limitations, as I expected.
Then I used CPANEL to change to PHP 8.1.
⦁ it let me in to what looked like Admin, in that I could see the main menu of Admin,
⦁ but every page would show the same error "0 Call to a member function isAdmin() on null "
⦁ When I tried to view the site, it showed me an error 404 box
Since it was the end of the day, I reverted my changes to the the way it had been, i.e. working fully with PHP 7.4.
It was at this time that I noticed that you had said "disable all 3rd party Plugins (especially the ones of Type "System" and "Content")" : I had forgotten to disable 3rd-party Content items .
This AM disabled the same System plugins as yesterday, and then disabled 3rd-party Content items . When I tried to run this in PHP 7.4, I got an "Error 403 Access Denied".
I then tried disabling those 3rd party System items, and then disabling the 3rd-party Content items one at a time. This worked fine for about the first 2/3rds of these items .
But then I got a real crash: ijSEO FAILED with messages:
Thanks in advance for any comments you can make. I'll do some other work for awhile, hoping to hear from you before I just replace my Dev site from a backup and start over.
"Are we having fun yet...?"
"Here there be dragons..."
Yesterday I started following your suggested plan, typing lots of notes as I went. In Global Configuration, I set Error Reporting to Maximum, then I disabled System plugins and tried it with PHP 7.4 : where it ran with limitations, as I expected.
Then I used CPANEL to change to PHP 8.1.
⦁ it let me in to what looked like Admin, in that I could see the main menu of Admin,
⦁ but every page would show the same error "0 Call to a member function isAdmin() on null "
⦁ When I tried to view the site, it showed me an error 404 box
Since it was the end of the day, I reverted my changes to the the way it had been, i.e. working fully with PHP 7.4.
It was at this time that I noticed that you had said "disable all 3rd party Plugins (especially the ones of Type "System" and "Content")" : I had forgotten to disable 3rd-party Content items .
This AM disabled the same System plugins as yesterday, and then disabled 3rd-party Content items . When I tried to run this in PHP 7.4, I got an "Error 403 Access Denied".
I then tried disabling those 3rd party System items, and then disabling the 3rd-party Content items one at a time. This worked fine for about the first 2/3rds of these items .
But then I got a real crash: ijSEO FAILED with messages:
- Warning: Use of undefined constant DS - assumed 'DS' (this will throw an Error in a future version of PHP) in /home/tracedev/public_html/plugins/content/imageloader/imageloader.php on line 10
Warning: require_once(/home/tracedev/public_html/plugins/content/imageloaderDShelper.php): failed to open stream: No such file or directory in /home/tracedev/public_html/plugins/content/imageloader/imageloader.php on line 10
Fatal error: require_once(): Failed opening required '/home/tracedev/public_html/plugins/content/imageloaderDShelper.php' (include_path='/home/tracedev/public_html/plugins/system/shlib/shl_packages//ZendFramework-1.11.7-minimal/library:.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/tracedev/public_html/plugins/content/imageloader/imageloader.php on line 10
Thanks in advance for any comments you can make. I'll do some other work for awhile, hoping to hear from you before I just replace my Dev site from a backup and start over.
"Are we having fun yet...?"

Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
- Webdongle
- Joomla! Master
- Posts: 42364
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Unable to upgrade to PHP 8.x
https://www.[youtube].com/watch?v=ZO9nmdsLlFw might help you trace the problem
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- pe7er
- Joomla! Master
- Posts: 24087
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Unable to upgrade to PHP 8.x
Hi Bob,
I indeed wrote "disable all 3rd party Plugins (especially the ones of Type "System" and "Content")".
But do not disable Joomla's core plugins. Some are needed to login into the system.
The front-end of your site probably gives errors because it seems to have template overrides that are not compatible with Joomla 4. You could try switching the template to the default J4 template Cassiopeia. Or disable the template overrides by renaming the override folder /templates/your-template/html/ to /templates/your-template/html-old/
isAdmin() has been removed from Joomla 4, see
https://docs.joomla.org/Potential_backw ... n_Joomla_4
You wrote "Here there be dragons..." but stumbled on a dinosaur instead :-)
The error with "DS" is regarding a Directory Separator. The DS constant has been deprecated since Joomla 1.6 and removed in Joomla 3, see https://github.com/joomla-extensions/je ... /issues/58
The Content Plugin "imageloader" is not compatible with Joomla 4.
I hope this helps you a bit...
I indeed wrote "disable all 3rd party Plugins (especially the ones of Type "System" and "Content")".
But do not disable Joomla's core plugins. Some are needed to login into the system.
The front-end of your site probably gives errors because it seems to have template overrides that are not compatible with Joomla 4. You could try switching the template to the default J4 template Cassiopeia. Or disable the template overrides by renaming the override folder /templates/your-template/html/ to /templates/your-template/html-old/
isAdmin() has been removed from Joomla 4, see
https://docs.joomla.org/Potential_backw ... n_Joomla_4
You wrote "Here there be dragons..." but stumbled on a dinosaur instead :-)
The error with "DS" is regarding a Directory Separator. The DS constant has been deprecated since Joomla 1.6 and removed in Joomla 3, see https://github.com/joomla-extensions/je ... /issues/58
The Content Plugin "imageloader" is not compatible with Joomla 4.
I hope this helps you a bit...
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Re: Unable to upgrade to PHP 8.x
Hey gws and Webdongle --
Thanks for letting me know that WAMP let's you change PHP on the fly! I'm gonna give that a serious look, and probably switch!
Thanks for letting me know that WAMP let's you change PHP on the fly! I'm gonna give that a serious look, and probably switch!
Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Aug 15, 2009 3:50 pm
- Location: Shepherdstown, WV USA
- Contact:
Re: Unable to upgrade to PHP 8.x
Hi, Peter --
At this point I am not even trying to use Joomla 4. I use a template from Joomlashack, and they say they are busy working on converting their many extensions, and have not even started upgrading their templates yet.
I would much prefer to use a Joomla 4 version of my Joomlashack template, so I am only working in Joomla 3 at this time.
I have made no attempt to disable any of Joomla's core plugins.
Thanks again for your guidance!
At this point I am not even trying to use Joomla 4. I use a template from Joomlashack, and they say they are busy working on converting their many extensions, and have not even started upgrading their templates yet.
I would much prefer to use a Joomla 4 version of my Joomlashack template, so I am only working in Joomla 3 at this time.
I have made no attempt to disable any of Joomla's core plugins.
Thanks again for your guidance!
Best regards,
Dr. Bob Miller
Trace Systems, Inc
Dr. Bob Miller
Trace Systems, Inc
- Webdongle
- Joomla! Master
- Posts: 42364
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Unable to upgrade to PHP 8.x
https://www.wampserver.com
Wampserver 3.2.6 64 bit x64 – Apache 2.4.51 – PHP 5.6.40/7.4.26/8.0.13/8.1.0 – MySQL 5.7.36|8.0.27 – MariaDB 10.5.13|10.6.5PhpMyAdmin 4.9.7 & 5.1.1 – [removed] 4.8.1 – PhpSysInfo 3.3.4 – En Option : PHP 7.0.33/7.1.33/7.2.34/7.3.30
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- sozzled
- Joomla! Master
- Posts: 13241
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Unable to upgrade to PHP 8.x
Yes, it's true that isSite() and isAdmin() will cause fatal error problems after updating to J! 4.x—as @pe7er wrote—but these functions have—like the "dinosaurs"—likewise been deprecated since J! 3.8. This discussion is located in the Administration J! 3.x forum. It's reasonable to talk about what could happen if people use deprecated J! 3.x functions in J! 4.x but this discussion is really about updating to PHP 8 and, in that context, the fatal error was caused by a third party image loader content plugin that relied on the outdated "DS" constant.
Anyway, FWIW I agree with @gws and @Webdongle that it's easier to use Wampserver instead of XAMPP to quickly test what happens if you want to see behavioural differences between one version of PHP and another.
Anyway, FWIW I agree with @gws and @Webdongle that it's easier to use Wampserver instead of XAMPP to quickly test what happens if you want to see behavioural differences between one version of PHP and another.

“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
Walking the talk: https://j4xdemo.enduring.com.au

- pe7er
- Joomla! Master
- Posts: 24087
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Unable to upgrade to PHP 8.x
Sorry, I had Joomla 4 in my mind. For Joomla 3 I recommend to use the default Joomla 3 template Protostar. Just for testing purposes.
When everything (except the template) works ok with PHP 8, then start working on your Joomlashack template.
When the template gives errors, check if the base works ok by disabling the template overrides.
You could disable the template override by renaming the override folder /templates/your-template/html/ to /templates/your-template/html-old/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl (Renewed!) - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 6
- Joined: Mon Dec 26, 2022 5:38 pm
Re: Unable to upgrade to PHP 8.x
Thanks for the replies.
The actual Joomla version is 3.10.11 - I had checked beforehand and formed the view that that version of Joomla did work with PHP 8.x but maybe that was wrong - helpfully there is a 'select your PHP version' tab available to me.
I have tried downgrading the PHP version to 7.4.33 (the latest pre-8.x version available) but that doesn't make any difference.
I had been hoping that this would be as easy as with the other site - happily working with full admin rights etc under PHP 8.1. If I had encountered any issues with the other (non-critical) site then I would not have embarked on the second install - which was run in exactly the same way as the first.
I accept that I will have to migrate to Joomla 4 - what I did not want to to was to spend the vacation waiting for technical support from the hosting company (which I don't pay for) only to find that there was a simple fix.
The actual Joomla version is 3.10.11 - I had checked beforehand and formed the view that that version of Joomla did work with PHP 8.x but maybe that was wrong - helpfully there is a 'select your PHP version' tab available to me.
I have tried downgrading the PHP version to 7.4.33 (the latest pre-8.x version available) but that doesn't make any difference.
I had been hoping that this would be as easy as with the other site - happily working with full admin rights etc under PHP 8.1. If I had encountered any issues with the other (non-critical) site then I would not have embarked on the second install - which was run in exactly the same way as the first.
I accept that I will have to migrate to Joomla 4 - what I did not want to to was to spend the vacation waiting for technical support from the hosting company (which I don't pay for) only to find that there was a simple fix.
- AMurray
- Joomla! Exemplar
- Posts: 8330
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Unable to upgrade to PHP 8.x
Joomla 3.10 doesn't work with PHP 8.1, only 8.0.x and earlier.
I believe the minimum is still 5.3.10 but the recommended is PHP 8.0 (7.4 is of course now EOL).
https://downloads.joomla.org/technical-requirements
https://www.php.net/supported-versions.php
I believe the minimum is still 5.3.10 but the recommended is PHP 8.0 (7.4 is of course now EOL).
https://downloads.joomla.org/technical-requirements
https://www.php.net/supported-versions.php
Regards - A Murray
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Apr 05, 2014 2:51 am
Re: Unable to upgrade to PHP 8.x
Did anyone ever find resolution for this problem? I had the same issue and found a fix that worked for me.
Inside Cpanel I noticed something I hadn't previously. There's two PHP 8 options: PHP 8.0 (alt-php80) & PHP 8.0 (ea-php80). I had only noticed and tried one PHP 8 option earlier which was (ea-php80). That one gives me all sorts of errors on the site. The alt-php80 is the one that worked.
Inside Cpanel I noticed something I hadn't previously. There's two PHP 8 options: PHP 8.0 (alt-php80) & PHP 8.0 (ea-php80). I had only noticed and tried one PHP 8 option earlier which was (ea-php80). That one gives me all sorts of errors on the site. The alt-php80 is the one that worked.