Reputation: 410
I am using Ubuntu 19.10 and have installed pear/Request2
using sudo pear install http_request2
. I am trying to use it inside my PHP file while sending a request to Azure Face API but it is giving me the following error.
Warning: require_once(HTTP/Request2.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/php_to_flutter/create_face_list.php on line 3
Fatal error: require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/php_to_flutter/create_face_list.php on line 3
I have verified that the required files are available at
/usr/share/php/HTTP
but it isn't picking them. How am I supposed to resolve it? Thanks
Upvotes: 0
Views: 1309
Reputation: 424
As official PEAR manual states, before requiring the packages files you should check if the directory where pear stores all its extensions added to "include_path" .ini php settings, and if it's not you should add it manually. Official documentation
But you better switch from pear to composer as pear already dead package manager that is not updating for long term
Upvotes: 1
Reputation: 410
I have resolved the issue. It might not be an efficient solution but it worked for me. Here are the steps
Upvotes: 1