Project:Support desk/Sections/PHP

__NEWSECTIONLINK__ = PHP Error Support =

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)


 * 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:31, 15 January 2009 (UTC)

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)