Project:Support desk/Sections/PHP

__NEWSECTIONLINK__

= PHP Error Support =

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 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)

MediaWiki upgrade failing with "LocalisationCache.php" and "Language.php" errors

 * MediaWiki version: 1.16 beta
 * PHP version: 5.3.0
 * MySQL version: 5.1.37
 * URL: None, on an internal XAMPP/Windows 2003 Server installation.

I'm trying to upgrade from 1.15 MediaWiki. Install goes fine, and http://ms-tux/wiki/config/index.php comes up as expected at the end. Main_page, however, has the following three errors:

Warning: Invalid argument supplied for foreach in C:\xampp\htdocs\wiki\includes\LocalisationCache.php on line 326

Warning: Invalid argument supplied for foreach in C:\xampp\htdocs\wiki\includes\LocalisationCache.php on line 377

Fatal error: Unsupported operand types in C:\xampp\htdocs\wiki\languages\Language.php on line 248

Thanks! —137.191.224.102 17:17, 4 June 2010 (UTC)
 * Try adding the following to the bottom of your LocalSettings.php:


 * Max Semenik 17:28, 4 June 2010 (UTC)

Fantastic - that seems to have done the trick. Much good karma your way! :)

Web service Login error

 * MediaWiki version: MediaWiki 1.15.3
 * PHP version:  5.2.9
 * MySQL version: 5
 * URL:

I am currently using webservice but cannot login in your AddPageService.php file. How to solve the this kind of issues.

—Gopi 06:53, 9 June 2010 (UTC) Gopi P

500 Internal Server Error on clicking at red links
500 Internal Server Error on clicking at red links I am getting internal server error in case i am not logged into my wiki site on clicking at links like create/edit/discussion etc, however, after loggingin system works fine.
 * MediaWiki version: 1.15.3
 * PHP version: 5.2.9
 * MySQL version: 5
 * URL:
 * See how to debug. Max Semenik 14:39, 15 June 2010 (UTC)