Buildpack issues with Mediawiki
See original GitHub issueWhat version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version
?
{
"name": "",
"build": "",
"support": "https://support.run.pivotal.io",
"version": 0,
"description": "Cloud Foundry sponsored by Pivotal",
"authorization_endpoint": "https://login.run.pivotal.io",
"token_endpoint": "https://uaa.run.pivotal.io",
"min_cli_version": "6.22.0",
"min_recommended_cli_version": "latest",
"api_version": "2.84.0",
"app_ssh_endpoint": "ssh.run.pivotal.io:2222",
"app_ssh_host_key_fingerprint": "e7:13:4e:32:ee:39:62:df:54:41:d7:f7:8b:b2:a7:6b",
"app_ssh_oauth_client": "ssh-proxy",
"routing_endpoint": "https://api.run.pivotal.io/routing",
"doppler_logging_endpoint": "wss://doppler.run.pivotal.io:443"
}
cf version 6.25.0+787326d95.2017-02-28
What version of the buildpack are you using?
php_buildpack-cached-v4.3.33.zip
If you were attempting to accomplish a task, what was it you were attempting to do?
I tried to install Mediawiki 1.28.2, from a tarball, on PWS.
What did you expect to happen?
I expected the Mediawiki installer to work easily with the CF PHP buildpack.
What was the actual behavior?
Using the CF PHP buildpack, I can’t get the Mediawiki installer past “Installing some external dependencies (e.g. via composer) is required.”
Using the Heroku PHP buildpack, I got useful guidance, and I managed to get the installer working. When I attempted to stage:
-
it complained about a missing composer.lock. I generated one.
-
it warned about
/vendor
in the source tree, and that it could confuse composer. I ranrm -rf vendor/
.
Then, it stages, and the installer works, but only with the Heroku buildpack.
I’m sure that Mediawiki is responsible for some of this, but I lack the context to untangle the various issues.
Please confirm where necessary:
- I have included a log output
- My log includes an error message
- I have included steps for reproduction
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (4 by maintainers)
Top GitHub Comments
Here’s what worked for me:
1.) Add
.cfignore
. Insert one linevendor
so thatcf push
does not upload the vendor directory. This is optional but saves you upload bandwidth.2.) Make
.bp-config/options.json
. Insert the following:This tells the build pack to put composer installed dependencies into the
htdocs/vendor
directory which is where Mediawiki seems to expecting them.2.) Make
.bp-config/php/php.ini.d/wiki.ini
. Insert the following:This will enable the mysqli and apcu extensions. You may need to add additional other extensions, perhaps if you use a different database.
For what it’s worth, the build pack detects and enables the following extensions automatically so you don’t need to manually enable these.
3.) I created the following manifest.yml file.
The main points here are to set the PHP build pack and to bind a MySQL service.
4.)
cf push
the app.5.) Run through the installer & download the configuration file.
6.) Copy the downloaded
LocalSettings.php
to the root of your project. Runcf push
again.You should now be able to access your Mediawiki install. As a side note, do be careful with any files that you upload. The won’t persist across future
cf push
’s or even your app getting restarted since CF doesn’t have a persistent file system (by default).Hope that helps!
I have mounted an external fileshare to which uploaded files are saved. https://docs.cloudfoundry.org/devguide/services/using-vol-services.html.