Project:Support desk/Sections/PHP

__NEWSECTIONLINK__

= PHP Error Support =

PHP 5.3 Problem Still Exists
MW's problems with PHP 5.3 appear still not resolved, despite the fix that was reported as http://bugs.php.net/bug.php?id=50394. I'm still receiving similar error messages (eg Warning: Parameter 5 to fnHierarchySaveHook expected to be a reference, value given in ...includes/Hooks.php on line 117) as well as for the Language.php module.
 * This happens because because the function being called expects the parameter to be passed by reference, but the hook doesn't pass it by reference. If your function is called by ArticleSave, you can see that the $minor parameter is not passed by reference. You'll need to remove the "&" before that paramter and it should work again. i Alex  08:18, 30 January 2010 (UTC)


 * I had to add a "&" in 'includes/OutputPage.php (565)':


 * wfRunHooks( 'OutputPageParserOutput', array( &$this, &$parserOutput ) );


 * Maybe that helps someone. 79.216.100.116
 * Wrong solution, it's your hook that is declared wrong, not hook call. See Manual:Hooks/OutputPageParserOutput for details. Max Semenik 11:27, 27 April 2010 (UTC)


 * Funny, I ran into the same problem with the UserGetRights hook, but my function was declared incorrectly because the documentation was wrong. (moral of the story: don't believe everything that is written here, check the source if you want to be sure) Nx 13:09, 9 May 2010 (UTC)

I need to re-index so the search will work.
I try to run the proper scripts and this is what I get. I have version 1.6.10 running on OS X.

ns1:maintenance root# php rebuildtextindex.php Theosebia has a problem Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) (localhost)) ns1:maintenance root#

Thanks in advance! BJ

Parse Error on line 485 in RecentChange.php

 * MediaWiki version: 1.15.2
 * PHP version: 5.2.0-8+etch13
 * MySQL version: 5.0.32
 * URL: http://mitarbeiterforum.roteskreuz.at/wiki

Hi, The MediaWiki was installed properly without any error-message. It primarily looks good, but if you try to save any changes (anonymously or as registered user, you get a php-error-message: "Parse error: syntax error, unexpected $end in /home/oerk/htdocs/mitarbeiterforum.roteskreuz.at/wiki/includes/RecentChange.php on line 485"

I haven't found anything about this kind of error during my web-research.

—194.112.182.21 08:49, 26 March 2010 (UTC)


 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

How can I download to my Sansa mP3 player? Krhales@aol.com

—173.65.229.130 20:11, 5 April 2010 (UTC)

Internal Error on "Upload File"

 * MediaWiki version: 1.12.0
 * PHP version: 5.2.6 (cgi-fcgi)
 * MySQL version: 5.0.45-community-nt
 * URL: http://www.indianlandtenure.org/wiki/index.php?title=Special:Upload

When attempting to Upload File, a message shows up on top of the screen: "Warning: mkdir [function.mkdir]: Permission denied in D:\www\indianlandtenure.org\httpdocs\wiki\includes\GlobalFunctions.php on line 1649".

The heading on the page is "Internal Error" and the text reads: Could not create directory "public/c/c9".

We previously uploaded an image to the site: http://www.indianlandtenure.org/wiki/index.php?title=Image:Example.jpg. We tried uploading pictures as admin and other users, from both on and off our server.

—ILTF 15:06, 8 April 2010 (UTC)

Fatal error: Call to undefined method SearchResultTooMany::hasSuggestion
Fatal error: Call to undefined method SearchResultTooMany::hasSuggestion in /home/sextant/public_html/en_wiki/includes/specials/SpecialSearch.php on line 938

I'm getting this error message only when I search for a geographic coordinate (which is how my wiki is organized) that has two negative coordinates. For example "-1.111111,-1.111111" returns this error message, while "1.111111,-1.111111" takes me to the appropriate page.

Can someone explain how to fix this?

—98.151.56.206 01:41, 30 April 2010 (UTC)


 * MediaWiki version: 1.15.1
 * PHP version: 5.2.9 (cgi)
 * PostgreSQL version: 8.3.3
 * URL:

—132.206.88.101 18:31, 10 May 2010 (UTC)