Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`Call to a member function add() on null` if memcache is selected before migrating to php7 #9426
Steps to reproduce the issue
Global configuration for Cache and Sessions needs to be set to memcache
default template changes without error
An error has occurred.
System information (as much as possible)
After returning to the control panel and looking at the template list, the default template did change, But I don't think an error should have been thrown.
I'm also seeing this error popup in some other areas,
This whole issue is due to using memcache prior to migrating to php7.
I'm wondering if something broke when I updated (missing files maybe)
If you do want to try with a Gantry4 theme there is a Free one available
I'm restarting my update test, I'll see if the issue sticks around. I found a number of actions that resulted in
@mbabker I hate to admit it, but getting a full stack trace would currently be one of my developer weaknesses.
Nope. You'd have to know what file is trying to call the
If it's triggering the error page, enable debug mode as the error page renders a backtrace from the error object if this is enabled.
Ok here is the Debug trace
So the one thing to note about the setup, both Cache and sessions were set to "memcache" prior to switching to PHP7. but I don't think this sever is set up for Memcache with PHP7 as memcache is no longer an option in gobal configuration once I'm running php7.
Attempting to resave the global configuration results in the same error.
Switched back to php5.6.16 and resaved global configuration with cache set to file and sessions set to database. (no issue)...
so replication required memcache turned on for cache/session before switching to PHP7 (without memcache)
Memcache I don't know if anyone's doing an upgrade for that extension, and Memcached (note the d) is still in a feature branch pending a stable release on PHP 7. So you'd need to change the cache configs pre-upgrade to keep things working. APCu and I believe Redis (as well as the default files handler) should be PHP 7 compatible so long as you have all the prerequisites installed.
@Sh4d0wF1gh7 If your issue is this issue, this is related to having the global settings for the site for caching, sessions, or both set to Memcache prior to switching to PHP7.
If you can temporarily switch back to PHP5.6, you can switch the Global settings to cache = file, sessions = database; then make the php7 update. (once on php7 you could then see if there are other PHP7 options for
You could try and see if changing the global settings directly while on php 7, note: when you make the change and save, you will get the warning. But you should no longer get on subsequent changes if it worked.
If neither of those are an option, you will need to attempt manually editing the values in your configuration.php file.
Warning, if you do something wrong in editing the configuration.php file you will break your site.
There is currently no other solutions.
If you try one or all of those options and nothing worked, you either have a 3rd party extension that is trying to use Memcache or you have a completely different issue.
added a commit
May 8, 2016
added a commit
May 31, 2016
Guys, I see this is closed but I'm having the same issue.
I'm running Joomla! 3.7.2
The site started at Joomla! 3.5.x and memecache was never enabled.
I moved the site from a host to an internal server. This is when the issues started. I mostly see it when working in DOCman. After saving an article or category in DOCman, it does save what i'm working on but throws the error message. Could it possibly have something to do with rewrite options in the htaccess?
We definitely had to change a few things to get it to work on our internal LAMP setup and permissions were an issue for a while but everything else seems to be working fine but this.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/9426.
@alandarr I suggest opening a new issue as this issue was specific to memcache being selected before migrating to php7
Please be sure to include in your issue all of your server details like PHP version for both the starting point internal server and your moved site.