Page MenuHomePhabricator

On Amazon with GD library installed: Installer fatal error in Parser::parse() line 558 due to Title.php's secureAndSplit() returning null
Closed, DeclinedPublic

Description

Author: bugzilla

Description:
Just started deploying the current mediawiki-1.19.1 as per http://www.mediawiki.org/wiki/Manual:Installation_guide , on Amazon EC2 (Apache web server)

The prerequisites screen (next after language selection) specified all OK but due to no GD thumbnailing would be disabled.

Deployed GD via sudo yum install php-gd and restarted Apache server.

After this, can't even get to the language selection screen - get HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

In the server error log, I see:
[Fri Jul 13 15:40:42 2012] [error] [client x.x.x.x] PHP Catchable fatal error: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in /var/www/html/mediawiki-1.19.1/includes/installer/Installer.php on line 558 and defined in /var/www/html/mediawiki-1.19.1/includes/parser/Parser.php on line 318, referer: http://site.xyz

PHP Version 5.3.14
Apache Version Apache/2.2.22 (Amazon)

phpinfo() reports:
GD Support enabled
GD Version bundled (2.0.34 compatible)


Version: 1.19.1
Severity: major
OS: Linux
Platform: Other

Details

Reference
bz38379

Event Timeline

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

Did it work before GD was installed?

Meh, didn't see that this was in installer itself.

bugzilla wrote:

Max, before GD was installed (or any of its prerequisite packages, I reckon), I was indeed getting to the language selection screen (the very first screen after clicking the "Please complete the installation" link on the new deployment), as well as the next screen that reported on the environment - all without any web server errors.

After GD was installed, clicking the "Please complete the installation" link was generating server error 500 as reported above. I've even tried blowing away the mediawiki directory and re-extracting the .tar.gz, to reset the install process - still the same error. So it must be due to the environmental change as a result of GD.

bugzilla wrote:

Here are the exact effects from running sudo yum install php-gd :

[root@corp1]# cat /var/log/yum.log | grep 'Jul 13 '
Jul 13 15:27:58 Updated: php-common-5.3.14-2.21.amzn1.x86_64
Jul 13 15:27:59 Updated: php-cli-5.3.14-2.21.amzn1.x86_64
Jul 13 15:27:59 Updated: php-pdo-5.3.14-2.21.amzn1.x86_64
Jul 13 15:27:59 Installed: libXpm-3.5.8-2.8.amzn1.x86_64
Jul 13 15:27:59 Installed: t1lib-5.1.2-6.5.amzn1.x86_64
Jul 13 15:27:59 Installed: php-gd-5.3.14-2.21.amzn1.x86_64
Jul 13 15:28:00 Updated: php-mysql-5.3.14-2.21.amzn1.x86_64
Jul 13 15:28:00 Updated: php-5.3.14-2.21.amzn1.x86_64

uothrawn wrote:

Issue appears to be in function secureAndSplit inside Title.php, this line is returning NULL:

$dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey );

Stacktrace needed to see the caller stack and find the Title::newFromText or Title::makeTitleSafe call. Than it can be checked, if the return value of that method is check against null before using.

Krinkle subscribed.

Declining report that is several years old and not actionable, because:

  • We were unable to reproduce the issue,
  • It is specific to an unsupported version of PHP, PHP 5.3 (we require PHP 7.0 or HHVM now).

If this is still reproducible with a currently supported version of PHP and MediaWiki, please file a new report.