gammu

Error trying to send sms by php


I installed gammu in linux and I can send sms using the shell command. But when I add the command in a php page I get the following error:

$phone = 3588459717;

echo shell_exec ('gammu sendSms TEXT '.$phone.' -text "test msg"');

Error opening device, it does not exist.


Solution

  • Most likely the web server is running as different user and Gammu running under this user does not see your configuration file and/or does not have permissions to open the device.