Page MenuHomePhabricator

After install using the ".php5" extension (server runs php 4 with ".php" extensions) proceeding to the main wiki page results in an error
Closed, ResolvedPublic

Description

Author: tysonkbrown

Description:
After install using the ".php5" extension (server runs php 4 with ".php" extensions) proceeding to the main wiki page results in an error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/local/pem/vhosts/107170/webspace/httpsdocs/wiki/includes/Exception.php on line 160

I was under the impression that php include files do not need the .php5 extension, but it seems that the server is still parsing it using php v4.

My phpinfo files:

http://www.shoereview.com.au/phpversion.php5
http://www.shoereview.com.au/phpversionv4.php


Version: 1.11.x
Severity: critical
OS: Linux
Platform: PC

Details

Reference
bz11933

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:57 PM
bzimport set Reference to bz11933.
bzimport added a subscriber: Unknown Object (MLST).

jvandegrift wrote:

my guess is you need to look at Apache's config file "httpd.conf" in the /conf directory.

Apache controls which version of PHP is associated with the file extensions ".php", ".php4", & ".php5".

Do a Google search on "apache php4 php5" to get some configuration advice.

Have you set $wgScriptExtension = ".php5"; in LocalSettings.php ?

Also check that index.php5 actually works; eg if just the directory index default is loading up the index.php in PHP4.

Is this still a problem? Is $wgScriptExtension and the directory index set?

Opps, didn't mean to close here.

tysonkbrown wrote:

hi aaron, i have tried again recently and it has worked successfully on the stable latest version with the same setup.