Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Can not instantiate http\Client on Ubuntu 18.04 with php5.6-http #1638

@nagyt234

Description

@nagyt234

The simple php program which instantiates http\Client generates an exception on Ubuntu 18:

$ cat /tmp/test.php
<?php
      $client = new \http\Client;

$ php /tmp/test.php
PHP Fatal error:  Uncaught exception 'http\Exception\UnexpectedValueException' with message 'Failed to locate "(null)" client request handler' in /tmp/test.php:2
Stack trace:
#0 /tmp/test.php(2): http\Client->__construct()
#1 {main}
  thrown in /tmp/test.php on line 2

PHP version:

$ php -v
PHP 5.6.40-53+ubuntu18.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Installed php and curl packages:

$ dpkg --get-selections | egrep 'php|curl'
libapache2-mod-php5.6                           install
libcurl3:amd64                                  install
libcurl3-gnutls:amd64                           install
php-common                                      install
php-pear                                        install
php5.6                                          install
php5.6-cli                                      install
php5.6-common                                   install
php5.6-dev                                      install
php5.6-http                                     install
php5.6-json                                     install
php5.6-mbstring                                 install
php5.6-mysql                                    install
php5.6-opcache                                  install
php5.6-propro                                   install
php5.6-raphf                                    install
php5.6-readline                                 install
php5.6-xml                                      install
pkg-php-tools                                   install

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions