Page MenuHomePhabricator

RevisionDelete - Cannot inherit previously-inherited or override constant READ_LATEST from interface IDBAccessObject in Revision.php on line 26
Closed, InvalidPublic

Description

Author: kenneth

Description:
LocalSettings file

When I enable RevisionDelete, select a revision in the history, Select "Change Visibility", select a "restriction option", and finally click "Apply to selected revision", I get a blank page and a PHP Fatal error in the logs.

I am enabling RevisionDelete with:
$wgGroupPermissions['sysop']['deleterevision'] = true;
$wgGroupPermissions['sysop']['deletelogentry'] = true;

Syslog error:
PHP Fatal error: Cannot inherit previously-inherited or override constant READ_LATEST from interface IDBAccessObject in /www/wiki/includes/Revision.php on line 26, referer: http://******/index.php?title=Test&action=revisiondelete&ids%5B17%5D=1

URL:
http://*****/index.php?title=Special:RevisionDelete&action=submit


Version: 1.22.6
Severity: normal
OS: Linux
Whiteboard: aklapper-moreinfo

Attached:

Details

Reference
bz65175

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:18 AM
bzimport set Reference to bz65175.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for reporting this!
Which PHP version and which database backend and version are this?

kenneth wrote:

I believe the relevant packages are:

php-5.3.28-1.5.amzn1.x86_64
php-mysql-5.3.28-1.5.amzn1.x86_64
php-intl-5.3.28-1.5.amzn1.x86_64
php-xml-5.3.28-1.5.amzn1.x86_64
php-pecl-apc-3.1.15-0.3.svn329913.10.amzn1.x86_64

mysql55-server-5.5.37-1.46.amzn1.x86_64

This looks like an issue with APC. Try disabling it to see if it works.

Kenneth: Can you answer comment 3, please?

kenneth wrote:

I tried changing my config to this:

[---

Shared memory settings

#$wgMainCacheType = CACHE_ACCEL;
#$wgMemCachedServers = array();

RevisionDelete - http://www.mediawiki.org/wiki/Manual:RevisionDelete

$wgGroupPermissions['sysop']['deleterevision'] = true;
$wgGroupPermissions['sysop']['deletelogentry'] = true;
---]

But I still get this error:

[---
[Wed Jun 18 19:20:18 2014] [error] [client XXX.XXX.XXX] PHP Fatal error: Cannot inherit previously-inherited or override constant READ_LATEST from interface IDBAccessObject in /www/wiki/includes/Revision.php on line 26, referer: http://XXX/index.php?title=Test&action=revisiondelete&ids%5B207%5D=1
---]

APC is still enabled, even if MediaWiki isn't trying to use it. Set apc.enabled to 0 in your php.ini to actually disable it.

kenneth wrote:

disabling apc in /etc/php.ini appeared to work.

"Revision visibility successfully updated."

So that would confirm an issue with APC and the RevisionDelete extension. What could be done to fix the issue?

It looks like you're hitting https://bugs.php.net/bug.php?id=59101
The solution is to upgrade APC. There's no bug in MediaWiki.