Project:Support desk/Sections/PHP

__NEWSECTIONLINK__

= PHP Error Support =

Move wiki to new server with current MW, Fatal PHP error

 * MediaWiki version: 1.13.3
 * PHP version: 5.1.6-20
 * MySQL version: 5.0.45-7
 * URL: Classified (very literally, not a joke! ;-) )
 * OS: RHEL5

I need to move a wiki (1.10.0) from one machine to another, and at the same time upgrade MW to 1.13.3 After untarring MediaWiki, copying the contants of /images and restoring the database, attempting to access the wiki results in an error:

[Tue Jan 20 19:48:14 2009] [error] [client 192.168.1.2] PHP Fatal error: require_once [function.require]: Failed opening required '/var/www/html2/wiki/ LocalSettings.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html2/wiki/ includes/WebStart.php on line 97

MediaWiki 1.14.0 Installation: checking environment warnings

 * MediaWiki version: 1.14.0
 * PHP version: 5.16
 * MySQL version: unknown, but more than likely up to date
 * URL: learnjazzpiano.com/wiki

This warning comes up in the first part of installation where it's checking environment:

Warning: is_dir [function.is-dir]: open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/learnjazzpiano.com/httpdocs:/var/www/vhosts/learnjazzpiano.com/private) in /var/www/vhosts/learnjazzpiano.com/httpdocs/wiki/config/index.php on line 441
 * 1) Warning: Your session.save_path value (/var/lib/php/session) appears to be invalid or is not writable. PHP needs to be able to save data to this location for correct session operation.

I was wondering if I can hard code some other location for the session files at line 441 in the index.php file, and if so, will someone give me an example of how to do it? I'm not a PHP programmer (yet, at least).

Thanks,

Scot

—76.104.204.246 20:06, 22 May 2009 (UTC)

[RESOLVED] Problem parsing EXIF data with foreign file repository

 * MediaWiki version: 1.14.0
 * PHP version: 5.2.6
 * MySQL version: 5.0.81-community
 * URL: http://wiki.jnsforum.com/wiki/File:Yurakucho0953.jpg

I have enabled $wgForeignFileRepos to use images from Wikimedia Commons, and while this functionality works generally, many images produce the following error: Warning: preg_match expects parameter 2 to be string, array given in /home/jnsforum/public_html/jnswiki/includes/Exif.php on line 1086 several times; additionally, none of the EXIF data will display. —CaptOblivious 20:56, 10 June 2009 (UTC)


 * Upgrading to 1.15.0 fixed the issue entirely. --CaptOblivious 20:39, 24 June 2009 (UTC)

[RESOLVED] Bug with parameters through index.php

 * MediaWiki version: 1.15.0
 * PHP version: 5.2.9
 * MySQL version: 5.0.77-community
 * URL: http://test.gta-sa-mp.com/wiki

Whenever I try to edit a page, it just prompts me a box to download the index.php file. It does this whenever I have the &action=edit at the end. When I have the history parameter, it works.

Contact me under owner@gta-sa-mp.com please.

—Francis Morissette 21:45, 13 June 2009 (UTC)


 * You have "use external editor" enabled in your preferences. We will not contact posters by e-mail, please do not ask. Happy ‑ melon 08:46, 14 June 2009 (UTC)


 * Thanks you very much.
 * —Francis Morissette 22:37, 14 June 2009 (UTC)


 * I've not "external editor enabled in my preferences and it prompts to download the index.php. It occurs only some times. Maybe an apache configuration problem?

I've got the same problem with 1.15.0 See URL at: http://www.landandtree.net/wiki/index.php?title=LandscapingWiki:Community_Portal I prompts me to download the index.php file - same in Firefox and IE. Don't have external editor switched on. Any resolution? Wil Brown - info@gravitationalfx.com

Parse error after changing logo

 * MediaWiki version: 1.15.0
 * PHP version: 5.2.6
 * MySQL version: 4.1.22-standard
 * URL: dbdawiki.xtremeaghosting.com/wiki.php5

I am trying to change the logo on my wiki page and I have done what it has said on the help pages but I am still getting a Parse error: syntax error, unexpected $end in /home2/dbdaw/public_html/wiki/LocalSettings.php on line 125. I am not sure what I am doing wrong but I would like to get this figured out.

—71.158.223.96 00:33, 14 June 2009 (UTC)


 * Please remember to set an informative section title when posting threads here. That's an interesting problem.  How many lines is your LocalSettings file?  Does the problem go away when you remove or comment out the logo declaration? Happy ‑ melon 08:45, 14 June 2009 (UTC)
 * A common error is to forget the ";" at the end of the statement. You need to use  instead of  . i Alex  11:22, 14 June 2009 (UTC)