Laravel Forge: PHP7 and bzip2
This article is old.
Some information might be out of date, as I don't always update older articles.
In the last weeks, I finally got my Mojo™ back and began working on Screeenly again. One thing that bugged me the most in the last months was the performance of the app. I currently host it on uberspace which is meant for small sites or projects that don't use a ton of memory (phantomjs uses a lot of memory).
I always wanted to try a Cloud Hoster like Digital Ocean for one of my projects and I think Screeenly finally deserves its own server. The cost and my not existing devops knowledge always scared me off this idea. But Forge comes to the rescue.
The Bug Hunt
I set up all accounts and began tinkering around. For hours I couldn’t figure out, why composer and one of my used packages would try to download
phantomjs 4 times, exit with a
Successful download message but wouldn’t put the binary in the correct place.
After reading the actual PHP Code of the package which get’s executed the problem was found. Zip-extraction failed.
But how on earth could I fix that? (Sidenote: I still have no experience in devops. 😂)
After some research, the solution was so simple I couldn’t believe it. Just execute a one-liner and restart the server … done.1
sudo apt-get install php7.0-bz2
- Forge doesn’t install the
- Packages are not perfect, but PRs make them better
Or you could add
php.inifile and restart the server ↩