Hi
I am trying to get LdapAuthentication extension work with my upgraded MediaWiki. Our previous setup was
Product | Version |
---|---|
MediaWiki | 1.24.4 |
PHP | 5.6.30 (apache2handler) |
MySQL | 5.6.16 |
Apache | 2.4.16 |
OS | Windows Server 2012R2 |
The LdapAuthentication worked fine with the above version of MediaWiki.
Once we upgraded to the newer version, and I am getting errors below.
MediaWiki | 1.28.0 |
PHP | 7.0.15 (apache2handler) |
MySQL | 5.6.0 |
Apache | 2.4.25 |
OS | Windows Server 2012R2 |
I am trying to run convertExtensionToRegistration.php on LdapAuthentication and I get the following error:
C:\PHP\php.exe : Error: Global functions cannot be converted to JSON. Please move the handler for LoadExtensionSchemaUpdates inside a class.
At line:1 char:1
This does create an extension file but when I run update.php I get the following error:
C:\PHP\php.exe : [2ede5ca9f218d5e8ed5d0e2a] [no req] MWException from line 176 of E:\Websites\MediaWiki\includes\Hooks.php: Invalid callback
efLdapAuthenticationSchemaUpdates in hooks for LoadExtensionSchemaUpdates
At line:1 char:1
+ C:\PHP\php.exe .\maintenance\update.php
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ([2ede5ca9f218d5...onSchemaUpdates:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Backtrace:
#0 E:\Websites\MediaWiki\includes\installer\DatabaseUpdater.php(122): Hooks::run(string, array)
#1 E:\Websites\MediaWiki\includes\installer\DatabaseUpdater.php(187): DatabaseUpdater->__construct(DatabaseMysqli, boolean, UpdateMediaWiki)
#2 E:\Websites\MediaWiki\maintenance\update.php(171): DatabaseUpdater::newForDB(DatabaseMysqli, boolean, UpdateMediaWiki)
#3 E:\Websites\MediaWiki\maintenance\doMaintenance.php(111): UpdateMediaWiki->execute()
#4 E:\Websites\MediaWiki\maintenance\update.php(217): require_once(string)
#5 {main}
Can anyone please help with this?