[Mediawiki-l] 1.7.1 Error. RE : UtfNormalUtil.php PEAR Problem

Bisset Doctoresse Jacqueline jaqueline_bisset_fr at yahoo.fr
Wed Jul 12 14:07:06 UTC 2006


----- Original Message ----- 
From: "Congresos del PSOE" <congresos_del_psoe at yahoo.es>
To: <mediawiki-l at Wikimedia.org>
Sent: Wednesday, July 12, 2006 12:37 PM
Subject: [Mediawiki-l] UtfNormalUtil.php PEAR Problem

Bisset Doctoresse Jacqueline wrote:
<snip>
  > I moved the file LocalSettings.php in the parent directory. But when
i point the link :
> http://sciencemoleculaire.studentblog.org/angleterre/
>
> i have the error :
>
> Warning: main() [function.main]: open_basedir restriction in effect. 
> File(/usr/share/pear/UtfNormalUtil.php) is not within the allowed path(s): 
> (/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs:/tmp) in 
> /home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/normal/UtfNormal.php 
> on line 36
>
> Warning: main(UtfNormalUtil.php) [function.main]: failed to open stream: 
> Operation not permitted in 
> /home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/normal/UtfNormal.php 
> on line 36
>
> Fatal error: main() [function.require]: Failed opening required 
> 'UtfNormalUtil.php' 
> (include_path='/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre:/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes:/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/languages:.:/usr/share/pear') 
> in 
> /home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/normal/UtfNormal.php 
> on line 36
>
> THIS IS THE PHP.INI :
> http://sciencemoleculaire.studentblog.org/php.ini

Bonjour Jacqueline,

The problem comes from UtfNormalUtil.php :) It exists both as a PEAR
package and as MediaWiki file but the PEAR path (/usr/share/pear/) is
most probably before our paths.

The easiest way is probably to add /usr/share/pear/ to the open_basedir
restriction. I am not sure why it is used though, as we are supposed to
override the include path in localsettings.php:

----------------------------------------------------------------
if( defined( 'MW_INSTALL_PATH' ) ) {
     $IP = MW_INSTALL_PATH;
} else {
     $IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) );

REPLY
---------------------
I have not changed LocalSetting.php or UtfNormalUtil.php  because i have not 
any idea about them.

THIS IS THE SITUATION :

At the moment if i simply add (in php.ini)

include_path = ".:/usr/share/pear"
include_path = ".:.:"


PHP.INI :

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;
;
;include_path = ".:/php/includes"

include_path = ".:/usr/share/pear"
include_path = ".:.:"

Here http://sciencemoleculaire.studentblog.org/angleterre/ i have :

Warning: main() [function.main]: open_basedir restriction in effect. 
File(/includes/AutoLoader.php) is not within the allowed path(s): 
(/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs:/tmp) in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28

Warning: main(/includes/AutoLoader.php) [function.main]: failed to open 
stream: Operation not permitted in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28

Fatal error: main() [function.require]: Failed opening required 
'/includes/AutoLoader.php' (include_path='.:.:') in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28
-----------------------

If i add a vhost.conf in the directory conf with :

<Directory 
"/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/">
php_admin_value safe_mode 0
php_admin_value open_basedir /usr/share/pear/
php_admin_value open_basedir /
</Directory>

Here http://sciencemoleculaire.studentblog.org/angleterre/ i have :


Warning: Unknown: open_basedir restriction in effect. 
File(/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/index.php) 
is not within the allowed path(s): (/) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown 
on line 0

Warning: Unknown: Failed opening 
'/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/index.php' 
for inclusion (include_path='.:.:') in Unknown on line 0
----------------

If i add a vhost.conf in the directory conf with :

<Directory 
"/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/index.php/">
php_admin_value safe_mode 0
php_admin_value open_basedir /usr/share/pear/
php_admin_value open_basedir /
</Directory>

Here http://sciencemoleculaire.studentblog.org/angleterre/ i have :

Warning: main() [function.main]: open_basedir restriction in effect. 
File(/includes/AutoLoader.php) is not within the allowed path(s): 
(/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs:/tmp) in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28

Warning: main(/includes/AutoLoader.php) [function.main]: failed to open 
stream: Operation not permitted in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28

Fatal error: main() [function.require]: Failed opening required 
'/includes/AutoLoader.php' (include_path='.:.:') in 
/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/includes/Setup.php 
on line 28
------------------

If i add a vhost.conf in the directory conf with :

<Directory 
"/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/">
php_admin_value safe_mode 0
php_admin_value open_basedir /usr/share/pear/
php_admin_value open_basedir /
</Directory>

Here http://sciencemoleculaire.studentblog.org/angleterre/ i have :

Warning: Unknown: open_basedir restriction in effect. 
File(/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/index.php) 
is not within the allowed path(s): (/) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown 
on line 0

Warning: Unknown: Failed opening 
'/home/httpd/vhosts/sciencemoleculaire.studentblog.org/httpdocs/angleterre/index.php' 
for inclusion (include_path='.:.:') in Unknown on line 0


More information about the MediaWiki-l mailing list