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

Strange behaviour after install, PHP problem?

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.6
 * MySQL version: 5.0.45
 * URL: http://www.mikakunii.net/mikawiki

A very strange behaviour of wiki after install: articles are not shown at all although content is present: try edit to see that its present, or follow http://www.mikakunii.net/MikaWiki that is working on the same database (that 2nd wiki was istalled after that problem did appear on the 1st).

During install process I had some warnings ( intall_log.txt for complete reference): I tried asking my hosting service assistance and they told me that the cause maybe was more due an error configuring mediawiki than a server problem. I installed same version on a localhost doing the same install procedure and everything has gone well so I suppose its a PHP error and not a configuration error, maybe am I wrong? I don't think its a mysql issue as the 2nd installation of mediawiki works good on the same database. And as the install procedure build everything was necessary I thought also its more concerning PHP than a installation error itself.

Notice warning during install procedure:

Warning: is_dir: open_basedir restriction in effect. File(/opt/pieroni/php5/session) is not within the allowed path(s):(/var/www/vhosts/mikakunii.net/httpdocs:/tmp) in /var/www/vhosts/mikakunii.net/httpdocs/mikawiki/config/index.php on line 438 Warning: Your session.save_path value (/opt/pieroni/php5/session) appears to be invalid or is not writable. PHP needs to be able to save data to this location for correct session operation.

Maybe this is the main problem or a sign of a lack of PHP config on server? Please help me, thank you. I tried to do my best... but can't solve this alone. --Federicodip 18:47, 15 December 2008 (UTC)

Parse error

 * MediaWiki version:
 * PHP version 	5.2.5
 * MySQL version4.1.22-standard
 * URL:

I am trying to move a wiki from one location to another. I keep getting this error: Parse error: syntax error, unexpected T_NEW in /home/XXXX/public_html/wiki/includes/GlobalFunctions.php on line 1494 What can i do? i imported the database, updated the localsettings and everything seem to be allright.

a fresh install of media wiki works fine. all of the files are identical.

when i change the localsettings to the fresh mediawiki install it works fine.

—89.139.135.106 18:10, 31 December 2008 (UTC)

Permission problem with Apache: cannot reproduce in Apache debug mode

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.6-5
 * MySQL version: 5.0.67-2
 * URL:

I'm using Apache 2.2.10-2. If I run Apache as a service on my Linux box, I get PHP permission errors in the HTTPD logs:

PHP Warning: Unknown: failed to open stream: Permission denied in Unknoxn on line 0 PHP Fatal error: Unknown: failed opening required '/var/www/html/mediawiki/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

However if I start Apache in debug mode with

> /usr/sbin/httpd -X

Mediawiki works fine. The httpd process is running under the same UID (apache) both times. Any ideas? Thanks.

—69.12.144.158 05:57, 5 January 2009 (UTC)


 * Assuming you're running PHP as an Apache module, the Apache user needs to be able to read the entire /mediawiki directory. /var/www is usually owned by the Apache user anyway, but if not, make it readable to all:
 * If you're in a multi-user environment, then you should be a bit more cautious:
 * —Emufarmers(T 15:47, 5 January 2009 (UTC)
 * —Emufarmers(T 15:47, 5 January 2009 (UTC)
 * —Emufarmers(T 15:47, 5 January 2009 (UTC)

(RESOLVED) Parser Error

 * MediaWiki version: Latest
 * PHP version: 5.2.5
 * MySQL version: 5.0.51a-community
 * URL: wiki.gamesnation.co.cc

When i'm moving the LocalSettings.php or something it says me an error:

Fatal error: Class 'ParserOutput' not found in /home2/fenzon/public_html/wiki/includes/parser/Parser.php on line 178

What should i do now?

—94.67.155.172 17:33, 15 January 2009 (UTC)


 * I don't see any errors when I visit the site. —Emufarmers(T 04:28, 16 January 2009 (UTC)

Strange error after backuping

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.6
 * MySQL version: 5.0.45
 * URL: http://web223.sydney.webhoster.ag/user/david_b/homepages/vwikika

Hey guys, I installed the backup-script of http://www.mediawiki.org/wiki/User:Flominator/Backup_MW and it works. Then I tried to exec it with a cronjob. I entered the command on my web-interface. Minutes later I want to log in to my Wiki as the error (see below) appeared. The cronjob hasn't been started yet! I absolutely don't know what to do. MediaWiki crashes in reason of copying files?!

Thank you for your help! David

THE ERROR:

Warning: require_once(/var/www/html/web223/html/user/david_b/homepages/vwikika/StartProfiler.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/web223/html/user/david_b/homepages/vwikika/includes/WebStart.php on line 78

Fatal error: require_once [function.require]: Failed opening required '/var/www/html/web223/html/user/david_b/homepages/vwikika/StartProfiler.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/web223/html/user/david_b/homepages/vwikika/includes/WebStart.php on line 78

//edit I upload the StartProfiler.php again and now I got the information: MediaWiki 1.13.2 - Please set up the wiki first.

—Trop 21:33, 15 January 2009 (UTC)


 * Re-upload all the wiki files. Rerun the installer or manually recreate LocalSettings.php if you destroyed your copy. —Emufarmers(T 04:28, 16 January 2009 (UTC)


 * I re-upload all files and it works. Thank you! But isn't this strange? I mean I didn't change any files and the wiki chrashed ^^