1

I created a drush command which call a function which send emails. When I'm calling this method with the devel help module, the function is called correctly and my emails are sent. But when I tried to call it from a drush command I have this error below :

Drush command terminated abnormally due to an unrecoverable error.
[error] Error: Class 'HttpRequest' not found

Here is how I instanciate my HttpRequest class :

// Configuration client Http
$clientHttp = new HttpRequest($url, HttpRequest::METH_POST);

I am working on my local environment with WAMP (PHP 5.2.11).

I will be very happy if you can give me some advice, thanks !

  • That's not a core php class, unless you have pecl_http installed it won't be available. Perhaps it's just not enabled for cli? – Clive Feb 11 '15 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.