* dan nessett <dness...@yahoo.com> [Tue, 11 Aug 2009 09:00:50 -0700 
(PDT)]:
> I'm probably missing something since I have only been programming in 
PHP
> for about 4 weeks, but if you set include_path in php.ini so it 
includes
> the root of the MW tree, put a php file at that level that has a
> function (or a method in a class) that returns the MW root path,
> wouldn't that work? For example, if you modified include_path in 
php.ini
> to include <pathname to MW root>, added the file MWInit.php to the MW
> root directory and in MWInit.php put a function MWInit() that computes
> and returns $IP, wouldn't that eliminate the necessity of manually
> figuring out the value of $IP [each place where you now compute $IP
> could require_once('MWInit.php') and call MWInit()]?
>
> Of course, it may be considered dangerous for the MW installation
> software to fool around with php.ini. But, even if you require setting
> the MW root manually in php.ini::include_path (abusing the php 
namespace
> disambiguation operator here) that would be an improvement. You should
> only have to do this once and could upgrade MW without disturbing this
> binding.
>
Sorry for interrupting the conversation, but not everyone have root 
rights to change php.ini freely. (MediaWiki can be used at shared 
hosting sometimes).
I'd better define a shell variable for that ($MW_INSTALL_PATH).
Dmitriy

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to