question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Buildpack issues with Mediawiki

See original GitHub issue

What 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:

  1. it complained about a missing composer.lock. I generated one.

  2. it warned about /vendor in the source tree, and that it could confuse composer. I ran rm -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:closed
  • Created 6 years ago
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dmikusacommented, Jun 23, 2017

Here’s what worked for me:

1.) Add .cfignore. Insert one line vendor so that cf push does not upload the vendor directory. This is optional but saves you upload bandwidth.

2.) Make .bp-config/options.json. Insert the following:

{
    "COMPOSER_VENDOR_DIR": "{BUILD_DIR}/htdocs/vendor"
}

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:

extension=mysqli.so
extension=apcu.so

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.

extension=bz2.so
extension=zlib.so
extension=curl.so
extension=mcrypt.so
extension=openssl.so
extension=mbstring.so

3.) I created the following manifest.yml file.

---
applications:
- name: php-wiki
  memory: 128M
  instances: 1
  path: .
  buildpack: php_buildpack
  services:
  - p-mysql-ded

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. Run cf 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!

0reactions
ajknolcommented, Nov 12, 2018

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).

What kind of solutions have folks put in place with PCF to handle file uploads from MediaWiki?

I have mounted an external fileshare to which uploaded files are saved. https://docs.cloudfoundry.org/devguide/services/using-vol-services.html.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MediaWiki installation on Pivotal Cloud Foundry - GitHub
My Goal is to run MediaWiki on Cloud Foundry ... More specifically, my goal is to cf push mediawiki version 1.27.4 to run...
Read more >
New URL → Issues with VisualEditor on a shared host
I'm having trouble in recreating the Parsoid app, ... Select Node.js (ok and changes saved: "Your new buildpack configuration will be used ...
Read more >
Manual:Common errors and symptoms - MediaWiki
MediaWiki Errors · All pages have no content, but when editing a page the wiki text is there · Image Thumbnails not working...
Read more >
Tabs no longer working on Extension talk:Tabs - MediaWiki
I am getting the same issue, with MediaWiki 1.30.0 and PHP 7.0.27, with the same version of Tabs (but from the master branch)....
Read more >
MediaWiki on Heroku: mbstring, intl PHP extensions missing
I'm using the heroku/php build pack. MediaWiki says: MediaWiki 1.39 internal error. Installing some PHP extensions is required. Required ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found