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)

(RESOLVED) URL rewrites

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.6 (apache2handler)
 * MySQL version: 5.0.45
 * URL: http://wiki.atelier-idees.org/index.php/Accueil

When I open mediawiki with this url: http://wiki.atelier-idees.org/index.php/Accueil It works fine

When I open mediawiki with this url : http://wiki.atelier-idees.org/ I am redirected to the main site http://www.atelier-idees.org/index.php/Accueil :-(

When I submit an article, the article is saved, but, I move to http://www.atelier-idees.org/index.php/The_article :-(

I change nothing in the setup LocalSettings ...

note :

the wiki is installed in the repository /web/wiki of the server just near this you have /web/www

/web/.htaccess here is the extraction of /web/.htaccess to adapt the subdomain : RewriteEngine on RewriteCond %{HTTP_HOST} ^www.atelier-idees.org RewriteCond %{REQUEST_URI} !^/www RewriteRule (.*) /www/$1 [P] RewriteEngine on RewriteCond %{HTTP_HOST} !atelier-idees.org RewriteRule (.*) http://www.atelier-idees.org/$1 [R=301]

/.rewrites

here is the extraction of /.rewrites to adapt the subdomain : RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteCond %{HTTP_HOST} ^([^\.]+)\..*\..*(:[0-9]+)?$ RewriteCond %{ENV:REDIR} !cgiwrap RewriteCond %{DOCUMENT_ROOT}/%1/%{REQUEST_URI} -f RewriteRule ^/(.*\.(pl|cgi))(\?|$) /cgiwrapDir/cgiwrap/%1/$1 [PT,E=REDIR:cgiwrap] RewriteCond %{REQUEST_URI} !\.(cgi|pl)$ RewriteCond %{HTTP_HOST} !^www RewriteCond %{HTTP_HOST} ^([^\.]+)\..*\..*(:[0-9]+)?$ RewriteCond %{DOCUMENT_ROOT}/%1 -d RewriteRule .* %{DOCUMENT_ROOT}/%1%{REQUEST_URI} RewriteCond %{REQUEST_URI} !\.(cgi|pl)$ RewriteCond %{SERVER_PORT} ^80$ RewriteCond %{HTTP_HOST} !^www RewriteCond %{HTTP_HOST} ^([^\.]+)\..*\..*(:[0-9]+)?$ RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_FILENAME} -d RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [R] RewriteCond %{REQUEST_URI} !\.(cgi|pl)$ RewriteCond %{SERVER_PORT} ^443$ RewriteCond %{HTTP_HOST} !^www RewriteCond %{HTTP_HOST} ^([^\.]+)\..*\..*(:[0-9]+)?$ RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_FILENAME} -d RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}/ [R]

My provider is www.informaniak.ch

Thanks a lot

—Proffial 15:55, 23 December 2008 (UTC)

--> Resolved, I had to setup in LocalSettings.php $wgServer          = "http://wiki.atelier-idees.org"; Why it was not automatic ? no idea. --Proffial 17:09, 26 December 2008 (UTC)


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