jleyva / moodle-message_airnotifier

Moodle messaging plugin for PUSH notifications using AirNotifier
0 stars 1 forks source link

PHP Fatal error: Class 'curl' not found in moodle/message/output/airnotifier/message_output_airnotifier.php on line 110 #2

Open khyamshahzad opened 10 years ago

khyamshahzad commented 10 years ago

Hi,

My MOODLE server details are below.

MOODLE Version: 2014051200.08 | 2.7+ (Build: 20140619) Airnotifier Plugin Version: 2014051200 PHP Version: PHP 5.4.31 (cli) Moodle Mobile App Version: 1.5 | Version Code: 377

The issue is when I send a private message to a course participant via mobile app (MM) service moodle_message_send_instantmessages, I receive the error message below in Moodle Mobile.

"Cannot connect: Verify that your have typed correctly the URL and that your site uses Moodle 2.4 or later."

while on server I can see the Apache (PHP) error log below.

PHP Fatal error: Class 'curl' not found in /my_moodle_path/moodle/message/output/airnotifier/message_output_airnotifier.php on line 110

Note: The error occurs only when I send a private message through Mobile App service. However if I send a private message directly from the Moodle Web interface, it works fine without any error message.

Thanks

khyamshahzad commented 10 years ago

I think I found the solution to fix the error. Just include 'filelib.php' file before using the curl library.

require_once($CFG->libdir . '/filelib.php');

Thanks

jleyva commented 10 years ago

Hi,

thanks for reporting, I'm fixing it

scara commented 10 years ago

Hi @jleyva, is there already an issue in the Moodle Tracker? I was not able to find it.

TIA, Matteo

jleyva commented 10 years ago

Hi,

I fixed it in the 2.4, 2.5 and 2.6 versions (that are add-ones)

For the 2.7 version (in Moodle core) I've created this issue you may watch MDL-47014

scara commented 10 years ago

TNX, appreciated!