PHP 7 - Class 'Memcached' not found after upgrade to Ubuntu 17.10 artful
I'm getting:
Symfony Component Debug Exception FatalThrowableError (E_ERROR)
Class 'Memcached' not found
After upgrading from Ubuntu 17.04 to 17.10.
The code calling memcached:
/**
* Get a new Memcached instance.
*
* @return Memcached
*/
protected function getMemcached()
{
return new Memcached;
}
I tried re-installing php-memcached with --purge.
A look at the output of phpinfo() shows this line:
/etc/php/7.0/fpm/conf.d/25-memcached.ini
The memcached.so module has moved from /usr/lib/php/20151012
to /usr/lib/php/20160303
The answer might be to upgrade to PHP 7.1. Trying that now.
php php7
bumped to the homepage by Community♦ 54 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm getting:
Symfony Component Debug Exception FatalThrowableError (E_ERROR)
Class 'Memcached' not found
After upgrading from Ubuntu 17.04 to 17.10.
The code calling memcached:
/**
* Get a new Memcached instance.
*
* @return Memcached
*/
protected function getMemcached()
{
return new Memcached;
}
I tried re-installing php-memcached with --purge.
A look at the output of phpinfo() shows this line:
/etc/php/7.0/fpm/conf.d/25-memcached.ini
The memcached.so module has moved from /usr/lib/php/20151012
to /usr/lib/php/20160303
The answer might be to upgrade to PHP 7.1. Trying that now.
php php7
bumped to the homepage by Community♦ 54 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm getting:
Symfony Component Debug Exception FatalThrowableError (E_ERROR)
Class 'Memcached' not found
After upgrading from Ubuntu 17.04 to 17.10.
The code calling memcached:
/**
* Get a new Memcached instance.
*
* @return Memcached
*/
protected function getMemcached()
{
return new Memcached;
}
I tried re-installing php-memcached with --purge.
A look at the output of phpinfo() shows this line:
/etc/php/7.0/fpm/conf.d/25-memcached.ini
The memcached.so module has moved from /usr/lib/php/20151012
to /usr/lib/php/20160303
The answer might be to upgrade to PHP 7.1. Trying that now.
php php7
I'm getting:
Symfony Component Debug Exception FatalThrowableError (E_ERROR)
Class 'Memcached' not found
After upgrading from Ubuntu 17.04 to 17.10.
The code calling memcached:
/**
* Get a new Memcached instance.
*
* @return Memcached
*/
protected function getMemcached()
{
return new Memcached;
}
I tried re-installing php-memcached with --purge.
A look at the output of phpinfo() shows this line:
/etc/php/7.0/fpm/conf.d/25-memcached.ini
The memcached.so module has moved from /usr/lib/php/20151012
to /usr/lib/php/20160303
The answer might be to upgrade to PHP 7.1. Trying that now.
php php7
php php7
edited Oct 31 '17 at 14:49
mcmacerson
asked Oct 31 '17 at 13:55
mcmacersonmcmacerson
12614
12614
bumped to the homepage by Community♦ 54 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 54 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The answer is to upgrade to PHP 7.1.
The Ubuntu upgrade only does a partial upgrade of PHP from 7.0 to 7.1 when upgrading from 17.04 zesty to 17.10 artful.
After upgrading all your PHP modules to 7.1:
Stop and disable PHP 7.0 FPM
sudo systemctl stop php7.0-fpm.service
sudo systemctl disable php7.0-fpm.service
Start PHP 7.1 FPM
sudo systemctl start php7.1-fpm.service
Remember to also fix your web server.
For NGINX I had to change this line:
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
Then restart NGINX
sudo systemctl restart nginx.service
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f971332%2fphp-7-class-memcached-not-found-after-upgrade-to-ubuntu-17-10-artful%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The answer is to upgrade to PHP 7.1.
The Ubuntu upgrade only does a partial upgrade of PHP from 7.0 to 7.1 when upgrading from 17.04 zesty to 17.10 artful.
After upgrading all your PHP modules to 7.1:
Stop and disable PHP 7.0 FPM
sudo systemctl stop php7.0-fpm.service
sudo systemctl disable php7.0-fpm.service
Start PHP 7.1 FPM
sudo systemctl start php7.1-fpm.service
Remember to also fix your web server.
For NGINX I had to change this line:
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
Then restart NGINX
sudo systemctl restart nginx.service
add a comment |
The answer is to upgrade to PHP 7.1.
The Ubuntu upgrade only does a partial upgrade of PHP from 7.0 to 7.1 when upgrading from 17.04 zesty to 17.10 artful.
After upgrading all your PHP modules to 7.1:
Stop and disable PHP 7.0 FPM
sudo systemctl stop php7.0-fpm.service
sudo systemctl disable php7.0-fpm.service
Start PHP 7.1 FPM
sudo systemctl start php7.1-fpm.service
Remember to also fix your web server.
For NGINX I had to change this line:
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
Then restart NGINX
sudo systemctl restart nginx.service
add a comment |
The answer is to upgrade to PHP 7.1.
The Ubuntu upgrade only does a partial upgrade of PHP from 7.0 to 7.1 when upgrading from 17.04 zesty to 17.10 artful.
After upgrading all your PHP modules to 7.1:
Stop and disable PHP 7.0 FPM
sudo systemctl stop php7.0-fpm.service
sudo systemctl disable php7.0-fpm.service
Start PHP 7.1 FPM
sudo systemctl start php7.1-fpm.service
Remember to also fix your web server.
For NGINX I had to change this line:
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
Then restart NGINX
sudo systemctl restart nginx.service
The answer is to upgrade to PHP 7.1.
The Ubuntu upgrade only does a partial upgrade of PHP from 7.0 to 7.1 when upgrading from 17.04 zesty to 17.10 artful.
After upgrading all your PHP modules to 7.1:
Stop and disable PHP 7.0 FPM
sudo systemctl stop php7.0-fpm.service
sudo systemctl disable php7.0-fpm.service
Start PHP 7.1 FPM
sudo systemctl start php7.1-fpm.service
Remember to also fix your web server.
For NGINX I had to change this line:
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
Then restart NGINX
sudo systemctl restart nginx.service
answered Oct 31 '17 at 23:07
mcmacersonmcmacerson
12614
12614
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f971332%2fphp-7-class-memcached-not-found-after-upgrade-to-ubuntu-17-10-artful%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown