Last modified: 2014-03-10 23:22:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64502, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62502 - __DIR__ incompatible with PHP 5.2.17
__DIR__ incompatible with PHP 5.2.17
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
ConfirmEdit (CAPTCHA extension) (Other open bugs)
REL1_19-branch
All All
: Unprioritized critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-10 18:19 UTC by Maxim Neaga
Modified: 2014-03-10 23:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maxim Neaga 2014-03-10 18:19:08 UTC
+++ This bug was initially created as a clone of Bug #62486 +++

The Compatibility ( http://www.mediawiki.org/wiki/Compatibility ) page states that MediaWiki 1.19.x branch is compatible with PHP 5.2.3+

The core extension ConfirmEdit uses the __DIR__ magic constant that is available in PHP 5.3.0+ only.

Had to use the following command as a temporary fix:

    find . -type f -exec sed -i 's/__DIR__/dirname(__FILE__)/g' {} \;
Comment 1 Sam Reed (reedy) 2014-03-10 18:59:15 UTC
Are you definitely using the REL1_19 branch of ConfirmEdit? https://github.com/wikimedia/mediawiki-extensions-ConfirmEdit/tree/REL1_19

Using this commit https://github.com/wikimedia/mediawiki-extensions-ConfirmEdit/commit/6b867ba9292837133ff674351f12e946b2444fd1

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/ConfirmEdit$ git checkout 6b867ba9292837133ff674351f12e946b2444fd1
HEAD is now at 6b867ba... Localisation updates for core and extension messages from translatewiki.net
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/ConfirmEdit$ grep __DIR__ *
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/ConfirmEdit$
Comment 2 Andre Klapper 2014-03-10 22:50:52 UTC
I went to https://www.mediawiki.org/wiki/Download and downloaded the 1.19.12 tarball:

$:andre\> pwd
/home/andre/mediawiki-1.19.12/extensions/ConfirmEdit
$:andre\> grep __DIR__ *
Asirra.php:$dir = __DIR__;
ConfirmEdit.php:$wgConfirmEditIP = __DIR__;
FancyCaptcha.php:$dir = __DIR__;
grep: maintenance: Is a directory
MathCaptcha.php:$dir = __DIR__;
QuestyCaptcha.php:$dir = __DIR__;
ReCaptcha.php:$dir = __DIR__;
grep: resources: Is a directory
Comment 3 Andre Klapper 2014-03-10 23:22:05 UTC
Sigh. So this is a bug in the tarball but not in the code repository of the extension... Workaround is to manually get the extension code from Git, I guess.

Closing as INVALID here for the code repository; tracking the problem with the tarballs in bug 62101.

Maxim: Thanks for catching this. :-/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links