1

We are trying to upgrade to Mediawiki 1.30 through Mediawiki's release tarball. upgrade.php is failing because the release tarball is missing components (for example, PHP Fatal error: Uncaught Error: Class 'Wikimedia\Assert\Assert' not found).

If I am parsing things correctly, it looks like we have to set the web server up as a developer machine. We installed composer, symphony and its 33 dependencies according to Upgraded to MediaWiki 26 alpha, missing Assert.

Attempting to run composer results in a open_basedir restriction in effect... error (see below). We are now trying to figure out where the restriction is coming from. According to How to set for specific directory open_basedir, it is httpd.conf, php.ini or a .htaccess file.

The problem is, none of our configuration files have the restriction:

# find /etc -name php.ini -exec cat {} \; | grep open_basedir
; open_basedir, if set, limits all file operations to the defined directory
;open_basedir =
# find /opt/rh -name php.ini -exec cat {} \; | grep open_basedir
; open_basedir, if set, limits all file operations to the defined directory
;open_basedir =
# find /etc -name httpd.conf -exec cat {} \; | grep open_basedir
# find /opt/rh -name httpd.conf -exec cat {} \; | grep open_basedir
# find /var/www/html -name .htaccess -exec cat {} \; | grep open_basedir

I have two questions. First, is there a way to get a release tarball with everything that is needed to run the software?

Second, if a release tarball is not available, then how do we determine where the configuration is coming from?


# cd /var/www/html/wiki
# composer update
PHP Warning:  require(): open_basedir restriction in effect. File(/usr/share/php/Composer/autoload.php) is not within the allowed path(s): (/var/www/html/:/var/www/html/w/:/var/lib/php/session/) in /usr/bin/composer on line 9
PHP Warning:  require(/usr/share/php/Composer/autoload.php): failed to open stream: Operation not permitted in /usr/bin/composer on line 9
PHP Fatal error:  require(): Failed opening required '/usr/share/php/Composer/autoload.php' (include_path='.:/opt/rh/rh-php71/root/usr/share/pear:/opt/rh/rh-php71/root/usr/share/php') in /usr/bin/composer on line 9
1

open_basedir errors are common with PHP and not necessarily specific to mediawiki. open_basedir is set in php.ini. Try installing mlocate and then run: locate php.ini

If none of the php.ini files explicitly have open_basedir set, it may be using default values so try manually adding it anyway, including your existing path, and then restarting your web server i.e.:

open_basedir = ".:/opt/rh/rh-php71/root/usr/share/pear:/opt/rh/rh-php71/root/usr/share/php:/usr/share/php/Composer/"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.