Project:Support desk/Sections/PHP

__NEWSECTIONLINK__

= PHP Error Support =

Internal Error

 * MediaWiki version: upgraded to 1.15.1
 * PHP version: 5.2.3
 * MySQL version: 5.0.27

I get the following error when I click on certain links on my page in wiki.

''Internal error ''From Electronic Resources Wiki ''Jump to: navigation, search

''Expected attribute array, got something else in Xml::expandAttributes

''Backtrace:

''#0 D:\websites\Intranet_Lib\erwiki\includes\Linker.php(1042): Xml::expandAttributes(14) #1 D:\websites\Intranet_Lib\erwiki\includes\Parser.php(1403): Linker->makeExternalLink('http://libintra...', 'search the rela...', false, 'text', 14) #2 D:\websites\Intranet_Lib\erwiki\includes\Parser.php(1053): Parser->replaceExternalLinks('internalParse('parse('outputWikiText('view #7 D:\websites\Intranet_Lib\erwiki\includes\Wiki.php(450): CategoryPage->view #8 D:\websites\Intranet_Lib\erwiki\includes\Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(CategoryPage), Object(Title), Object(User), Object(WebRequest)) #9 D:\websites\Intranet_Lib\erwiki\index.php(116): MediaWiki->initialize(Object(Title), Object(CategoryPage), Object(OutputPage), ''Object(User), Object(WebRequest)) #10 {main} ''

I did not have this problem when using MediaWiki 1.11

UPDATE: - I noticed a link between this error and my FCKEditor. If the editor is enabled then I get this error on some of the pages. If it's disabled then the pages work fine, but I can't use the editor. Any idea what I can do?

—Srutsam 18:43, 6 November 2009 (UTC)

Blank page after saving a new Page or edited

 * MediaWiki version: 1.15.1
 * PHP version: 5
 * Postgresql version: 8.4
 * URL: private
 * installed extensions: Discussion, QPoll, WikEd, Gadgets

Just installed wiki for the first time it seems to be running OK. Except when creating or editing a page click save button and wiki returns a blank page, so no redirect ????

Yet the new page is created or it has the modifications.

thanks —JustinG 14:14, 13 November 2009 (UTC)
 * See blank page. Max Semenik 15:24, 13 November 2009 (UTC)

I can't upload files because PHP? errors?

 * MediaWiki version: 1.15.1
 * PHP version: 5.2.6 (cgi-fcgi)
 * MySQL version: 4.0.24-standard-log
 * URL: http://www.jasco-net.org/

Sorry, I can't write and read English...


 * First: After I collected file, Server displays two error messages bottom of upload page.
 * Warning: call_user_func(LocalFile::newFromTitle) [function.call-user-func]: First argument is expected to be a valid callback in /home/users/2/lolipop.jp-jasco/web/includes/filerepo/FileRepo.php on line 74
 * Warning: call_user_func(LocalFile::newFromTitle) [function.call-user-func]: First argument is expected to be a valid callback in /home/users/2/lolipop.jp-jasco/web/includes/filerepo/FileRepo.php on line 74
 * Next: After I click "Upload", Error messages of white display.
 * Warning: call_user_func(LocalFile::newFromTitle) [function.call-user-func]: First argument is expected to be a valid callback in /home/users/2/lolipop.jp-jasco/web/includes/filerepo/FileRepo.php on line 74
 * Fatal error: Call to a member function getName on a non-object in /home/users/2/lolipop.jp-jasco/web/includes/specials/SpecialUpload.php on line 444

Please tell me how to upload files... thank you.—Araisyohei 05:40, 27 November 2009 (UTC)

"Undefined variable: wgRequest" causes a fatal error

 * MediaWiki version: 1.15.1
 * PHP version: 5.3.1
 * MySQL version: 5.0.85
 * URL: http://wiki.liway.info/

I get the following error on wiki pages:

Notice: Undefined variable: wgRequest in /home/linfo/public_html/wiki/index.php on line 51

Fatal error: Call to a member function getVal on a non-object in /home/linfo/public_html/wiki/index.php on line 51

You can see it on the front page. I am not entirely sure when the error started happening, but it would be recently. *Maybe* it is related to the upgrade from php 5.3.0 to 5.3.1. Line 51 in index.php on my installation is the following:

$maxLag = $wgRequest->getVal( 'maxlag' );

Thank you

—Starcraftmazter 05:42, 3 December 2009 (UTC)

It occurs to me that this is a problem with PHP 5.3 or 5.3.1. When I went back to 5.2.11 the problem went away. Starcraftmazter 13:40, 9 December 2009 (UTC)

(RESOLVED) Pages imported by ImportTextFile.php NOT searchable

 * Revive from Project:Support desk/Archives/PHP/001


 * MediaWiki: 1.8.3
 * PHP: 5.2.0
 * MySQL: 5.0.27
 * URL:

I am using ImportTextFile.php to import a number of pages and they show up in Recent Changes.

But if I do a search on some text that I know is in the pages, the results are NOT showing them.

Is there a way that I can ensure that these pages are also searchable?

Thanks.

—68.147.72.69 06:34, 15 March 2008 (UTC)


 * Run the updateSearchIndex.php maintenance script. Emufarmers 02:23, 21 March 2008 (UTC)

That didn't work for imported pages as these pages were not selected during the run of the updateSearchIndex.php. The problem seems to be in the SELECT statement in updateSearchIndex.inc where "iaisrecentchanges" and "iaispage" tables are matched up to find the pages to be updated. The original SELECT statement is SELECT ... FROM $recentchanges JOIN $page on    rc_cur_id=page_id AND rc_this_oldid=page_latest and since an imported page has a clean slate of attributes, they are NOT selected.

Looking at the actual attributes in the imported pages, rc_last_oldid is always set to 0, thus by changing the SELECT statement to SELECT ... FROM $recentchanges JOIN $page on     rc_cur_id=page_id AND (rc_this_oldid=page_latest OR rc_last_oldid=0) then those imported pages are also selected.

I also believe that newer versions of mediawiki might have fixed this.

68.147.72.69 16:21, 25 March 2008 (UTC)
 * rebuildtextindex.php may do the work for this --Ans 03:53, 9 December 2009 (UTC)