Page MenuHomePhabricator

include_path not correct after install
Closed, DeclinedPublic

Description

Author: peppone

Description:
I just installed MediaWiki but when I had configured it I got this error message
when going to the root:

Warning: main(C:\apachefriends
mpp\htdocs\bastard/PHPTAL-NP-0.7.0/libs/GetText.php): failed to open stream:
Invalid argument in
C:\DOCUME~1\Peppone\LOCALS~1\Temp\tpl_0_7_0_b3cc3e673392338ec9834517ef3cca2f.php
on line 1

Fatal error: main(): Failed opening required 'C:\apachefriends
mpp\htdocs\bastard/PHPTAL-NP-0.7.0/libs/GetText.php'
(include_path='.;C:\apachefriends\xampp\htdocs\bastard;C:\apachefriends\xampp\htdocs\bastard/includes;C:\apachefriends\xampp\htdocs\bastard/languages')
in
C:\DOCUME~1\Peppone\LOCALS~1\Temp\tpl_0_7_0_b3cc3e673392338ec9834517ef3cca2f.php
on line 1

I can see that the paths are not correct (/) but haven't been able to change
them to the right ones.
I am running ApacheFriends XAMPP 1.4.5 on Windows XP (SP1).


Version: 1.3.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz636

Event Timeline

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

jeluf wrote:

Those paths should be set in your LocalSettings.php,
about line 3 or so.

peppone wrote:

$IP = "C:\\apachefriends\\xampp\\htdocs\\bastard";
ini_set( "include_path", ".;$IP;$IP\includes;$IP\languages" );
require_once( "DefaultSettings.php" );

How do I change ini_set() to print \ instead of /? I've tried it with no luck.
(If I set $IP to "localhost/bastard" paths will be "correct" but the includes
don't work of course.)

jeluf wrote:

(In reply to comment #2)

$IP = "C:\\apachefriends\\xampp\\htdocs\\bastard";
ini_set( "include_path", ".;$IP;$IP\includes;$IP\languages" );
require_once( "DefaultSettings.php" );

Make it:

ini_set( "include_path", ".;$IP;$IP\\includes;$IP\\languages" );

The character \ has a special meaning for PHP, one has to use \\ to get a
"normal" \ character.

peppone wrote:

(In reply to comment #3)

(In reply to comment #2)

$IP = "C:\\apachefriends\\xampp\\htdocs\\bastard";
ini_set( "include_path", ".;$IP;$IP\includes;$IP\languages" );
require_once( "DefaultSettings.php" );

Make it:

ini_set( "include_path", ".;$IP;$IP\\includes;$IP\\languages" );

The character \ has a special meaning for PHP, one has to use \\ to get a
"normal" \ character.

I did that but didn't see that the error messages I got were different from the
first ones.

Warning: main(C:\apachefriends
mpp\htdocs\bastard/PHPTAL-NP-0.7.0/libs/GetText.php): failed to open stream:
Invalid argument in
C:\DOCUME~1\Peppone\LOCALS~1\Temp\tpl_0_7_0_b3cc3e673392338ec9834517ef3cca2f.php
on line 1

Fatal error: main(): Failed opening required 'C:\apachefriends
mpp\htdocs\bastard/PHPTAL-NP-0.7.0/libs/GetText.php'
(include_path='.;C:\apachefriends\xampp\htdocs\bastard;C:\apachefriends\xampp\htdocs\bastard\includes;C:\apachefriends\xampp\htdocs\bastard\languages')
in
C:\DOCUME~1\Peppone\LOCALS~1\Temp\tpl_0_7_0_b3cc3e673392338ec9834517ef3cca2f.php
on line 1

Closing old 1.3 bug, probably fixed since.

Please restest using lastest 1.4 stable, the bug is most probably fixed.
if not, please reopen the bug with full details.