https://bugzilla.wikimedia.org/show_bug.cgi?id=44132

--- Comment #10 from Pavel Selitskas <[email protected]> ---
(In reply to comment #9)
> (In reply to comment #8)
> > No, it seems like in some situations $IP is set to 
> > "Z:/usr/local/apache/bin",
> > not the actual MediaWiki path. Init.php is at
> > Z:/home/wikimedia/mw/includes/Init.php. Z:/usr/local/apache/bin is the path
> > where httpd.exe lives.
> 
> Right.  This makes complete sense.
> 
> Now, the question is why does apache/php sometimes execute the the php files
> from the apache directory instead of the script's directory?  Is it just not
> setting the CWD?

I dunno. I wish I did. Here is some info for further consideration.

When load.php doesn't fail, we have the following data ($IP is the current $IP,
realpath - realpath( '.' ) called once again for debugging, dirname - dirname(
__DIR__ ), dir - __DIR__ itself):
$IP: E:\Wikimedia\mediawiki\core
realpath: E:\Wikimedia\mediawiki\core
dirname: E:\Wikimedia\mediawiki\core
dir: E:\Wikimedia\mediawiki\core\includes

As you see, all symlinks were resolved into proper paths (not Z:\home\...).
When load.php fails, we have the following picture:
$IP: Z:\usr\local\apache\bin
realpath: Z:\usr\local\apache\bin
dirname: E:\Wikimedia\mediawiki\core
dir: E:\Wikimedia\mediawiki\core\includes

According to the logics of present code, realpath should have failed and return
false, thus giving MediaWiki a way to fall back to dirname, but it didn't, and
moreover it provides a wrong path...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to