Caphalem
3 years ago
537
12
Laravel

How do I use HTTP_Request2 in Laravel 5?

Posted 3 years ago by Caphalem

Hello!

So here's the thing. I'm trying to make a small website that will use an ontology stored on a Sesame Server. I found this (https://github.com/labxxi/phpsesame ) library, put it into my custom directory in app/Libraries and namespaced it. All is fine there. To use that PhpSesame library you need HTTP_Request2 (https://pear.php.net/package/HTTP_Request2 ) and semsol/ARC2 (https://github.com/semsol/arc2 ). Installing ARC2 was simple, update composer.json and do composer update. However, HTTP_Request2 requires you to install PEAR and then install it through PEAR. I believe I have done that but if I try to use phpSesame I get this: FatalErrorException in phpSesame.php line 156: Class 'App\Libraries\HTTP_Request2' not found.

If I look up the usability of HTTP_Request2 it basically says that you need to have "require_once 'HTTP/Request2.php';" in your code to use it which the phpSesame seem to have. My guess is that the fact that I'm doing this on a framework is what's causing issues which brings me here. Any ideas?

Please sign in or create an account to participate in this conversation.