kristophjunge / docker-mediawiki

Dockerized MediaWiki running under Nginx and PHP-FPM. Based on the official PHP7 image. Packaged with VisualEditor plugin and Parsoid service.
MIT License
62 stars 41 forks source link

Error during install #2

Closed sepastian closed 7 years ago

sepastian commented 7 years ago

Thanks for this container!

When trying to install, I get the following error:

docker exec -i -t mediawiki /script/install.sh sebastian <password>
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.0 is installed.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Using server URL "/".
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
Warning: Your default directory for uploads (/var/www/mediawiki/images/) is not checked for vulnerability
to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked.
You can install MediaWiki.
Setting up database
done
Creating tables
done
Creating database user
[c92a15dca702094194ea7e14] [no req]   Error from line 560 of /var/www/mediawiki/includes/installer/MysqlInstaller.php: Call to undefined method DBQueryError::getText()
Backtrace:
#0 /var/www/mediawiki/includes/installer/Installer.php(1515): MysqlInstaller->setupUser(MysqlInstaller)
#1 /var/www/mediawiki/includes/installer/CliInstaller.php(135): Installer->performInstallation(array, array)
#2 /var/www/mediawiki/maintenance/install.php(142): CliInstaller->execute()
#3 /var/www/mediawiki/maintenance/doMaintenance.php(111): CommandLineInstaller->execute()
#4 /var/www/mediawiki/maintenance/install.php(156): require_once(string)
#5 {main}

grep: LocalSettings.php: No such file or directory

From what I can tell, install.php fails here; as a consequence, LocalSettings.php never gets moved back from /tmp/ to /var/www/mediawiki/, which is why grep fails.

I noticed that script/install.sh passes Wiki to install.php; shouldn't this be $MEDIAWIKI_SITENAME instead?

I'm using the following commands to start docker containers:

#!/bin/bash
docker run --name mediawiki-mysql \
       -e MYSQL_DATABASE=mediawiki \
       -e MYSQL_USER=mediawiki \
       -e MYSQL_PASSWORD=mediawiki \
       -e MYSQL_RANDOM_ROOT_PASSWORD=1 \
       -v /data/mediawiki/mysql:/var/lib/mysql \
       -d mysql:5.7
docker run --name mediawiki \
       --link mediawiki-mysql:mysql \
       -p 8085:80 \
       -e MEDIAWIKI_SERVER=http://my.server.com:8085 \
       -e MEDIAWIKI_SITENAME=NameOfWiki \
       -e MEDIAWIKI_LANGUAGE_CODE=de \
       -e MEDIAWIKI_DB_TYPE=mysql \
       -e MEDIAWIKI_DB_HOST=mediawiki-mysql \
       -e MEDIAWIKI_DB_PORT=3306 \
       -e MEDIAWIKI_DB_NAME=mediawiki \
       -e MEDIAWIKI_DB_USER=mediawiki \
       -e MEDIAWIKI_DB_PASSWORD=mediawiki \
       -e MEDIAWIKI_ENABLE_UPLOADS=1 \
       -v /data/mediawiki/images:/images \
       -v /data/mediawiki/logo.png:/var/www/mediawiki/resources/assets/wiki.png:ro \
       -d kristophjunge/mediawiki

Do you know what's going on here?

kristophjunge commented 7 years ago

Iam not sure why the arguments --dbuser and --dbpass were used in your case. I ended up adding all four arguments.

Thanks very much for your PR.