Page MenuHomePhabricator

Class 'Memcached' not found when running mwscript eval.php on debug servers
Closed, DeclinedPublic


When I wanted to check if a new function to determine if a wiki is in set of specified dblists would work as expected on mw1017 for Gerrit change 321815, I noticed the following behavior:

dereckson@mw1017:~$ mwscript eval.php aawiki
PHP Fatal error: Class 'Memcached' not found in /srv/mediawiki/php-1.29.0-wmf.2/includes/libs/objectcache/MemcachedPeclBagOStuff.php on line 63

Note: same for mw1099, but that still works on Terbium.

Note: mwrepl isn't affected

Event Timeline

Dereckson closed this task as Invalid.EditedNov 22 2016, 2:40 PM

As the servers have been decom, this task isn't interesting anymore.

Reopeing, as we've the same issue on mwdebug1002.

Dereckson renamed this task from Class 'Memcached' not found when running mwscript eval.php on mw1017, mw1099 to Class 'Memcached' not found when running mwscript eval.php on debug servers.Feb 1 2017, 8:58 PM

mwscript is hardcoded to use php5. We no more add Zend PHP extensions (such as php-memcached) on the app servers.

When we reimaged the deployment servers to Jessie, mwscript failed that was T146286. Got solved by making role::deployment::mediawikito include the Zend extensions (`mediawiki::packages::php5) :

Both T150912 and T153316 are attempts to use mwdebug1001 / mwdebug1002 as either a deployment (eg tin) or maintenance server (eg terbium). Both roles have mediawiki::packages::php5 which is the one one would need.

A workaround is to ::mediawiki::packages::php5, the ultimate fix is to remove 'php5' from mwscript T146285

Ottomata subscribed.

Hopefully T146285 will make this not necessary. Setting to Low priority.

Krinkle subscribed.

Closing in favour of T146285. Any hosts on which mwscript is meant to be used (maintenance hosts, deployment hosts, dump hosts) have php5 packages enabled so that things like Memcached works. If there are any other uses of php5 in production that interact with MediaWiki and are missing these packages, they would break very early on with a fatal for undefined class. There is no further action item for this task, other than: Remember to install php5 packages before using php5 on a server - which we have now done all all known cases.

Beyond that, we're switching away from PHP5 (T184638, T172165).