I'm working on a PHP-project and there is a 3rd party API-wrapper that uses HttpRequest
class (so it requires PECL_HTTP PHP-library to be installed). I'm using Lando (v3.0.0-rc.12) for local development with the basic LAMP reciepe:
recipe: lamp
config:
webroot: .
php: '5.6'
And with this set up I got a Fatal error: Class 'HttpRequest' not found
when I try to call the class like this $request = new HttpRequest( $url );
.
Based on discussions here, here and there I've tried to install PECL_HTTP on Lando by adding the following configuration to my lando.yml
file:
services:
appserver:
build_as_root:
- apt-get update -y
- apt-get install -y curl libcurl3 libcurl4-gnutls-dev libmagic-dev
- pecl install -f pecl_http-1.7.6
- docker-php-ext-enable pecl_http
This does not help and HttpRequest is still unavailable, while lando start
shows this error message on installation of the packages:
Starting projectname_appserver_1 ... done
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [831 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 10s (980 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
And I'm running out of ideas. What am I doing wrong?