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

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)

Fatal error: Call to a member function to HTML on a non object
We recently moved our Wiki from a unix server to a windows server. At the same time we upgraded to MediaWiki 1.15.3. Everything has worked fine except when we upload .pdf files we get the following error:
 * MediaWiki version: 1.15.3
 * PHP version: 5.3.0 (apache2handler)
 * MySQL version: 5.1.36-community-log
 * URL: unavailable (intranet)

Fatal error: Call to a member function toHtml on a non-object in K:\wamp\www\qmswiki\includes\ImagePage.php on line 430

This only happens on pdf files, I am able to upload all of the other accepted file types without errors. When i go to the special pages and click on files, the files I get the error on show up on the list, but the path is:

http://server/wiki/index.php/File:Testpdf2.pdf

Any suggestions?

Dave Moe —70.103.190.14 20:41, 18 May 2010 (UTC)

Error when uploading File "The file you uploaded seems to be empty"

 * MediaWiki version: 1.15.3
 * PHP version: 5.2.6
 * MySQL version: 5.1.44-community-log
 * URL:

When attempting to upload a new image I get the following error message:

Error when uploading File "The file you uploaded seems to be empty"

In the apache logs I see this all over the place

PHP Error PHP Notice: unserialize: Error at offset BagOStuff.php

I moved the wiki from a ubuntu box to a RHEL 5 box. Ive checked permissions, no luck.

—Brichter 19:29, 24 May 2010 (UTC)

(Resolved)T_VARIABLE error
Hi, I currently have the problem with the T_WARIABLE. I am using v1.16.0beta3. Can anyone please help? URL of my Wiki: http://alphacorp.tk

Hydriz 06:21, 4 June 2010 (UTC)