Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem sending sms with PHP script (accents) #465

lucashtn opened this issue Apr 17, 2019 · 0 comments


None yet
1 participant
Copy link

commented Apr 17, 2019


First, Sorry for my English :)
I have a problem with sending of SMS using php and gammu command.

When I try to send a SMS with accent, the following caracters after the accent are not sended.
But when I try to send the sms with accent in shell server, its work !

This is my php script :

<? php
shell_exec(‘sudo gammu-smsd-inject TEXT 06XXXXXXXX -text "Bonjour la météo est belle ce matin"’)

The return message below from the php script :

gammu-smsd-inject[8079]: Using FILES service
gammu-smsd-inject[8079]: Configuring Gammu SMSD...
gammu-smsd-inject[8079]: SHM token: 0x10205cd (16909773)
gammu-smsd-inject[8079]: PIN code is "0000"
gammu-smsd-inject[8079]: CommTimeout=5, SendTimeout=30, ReceiveFrequency=15, ResetFrequency=0, HardResetFrequency=0
gammu-smsd-inject[8079]: checks: CheckSecurity=1, CheckBattery=1, CheckSignal=1, CheckNetwork=1
gammu-smsd-inject[8079]: mode: Send=1, Receive=1
gammu-smsd-inject[8079]: deliveryreport = no
gammu-smsd-inject[8079]: phoneid = 
gammu-smsd-inject[8079]: Inbox is "/var/spool/gammu/inbox/" with format "standard"
gammu-smsd-inject[8079]: Outbox is "/var/spool/gammu/outbox/" with format "detail" and transmission format "7bit"
gammu-smsd-inject[8079]: Sent SMS moved to "/var/spool/gammu/sent/"
gammu-smsd-inject[8079]: SMS with errors moved to "/var/spool/gammu/error/"
gammu-smsd-inject[8079]: Created outbox message OUTC20190417_115240_00_06XXXXXXXX_sms0.smsbackup
Written message with ID /var/spool/gammu/outbox/OUTC20190417_115240_00_06XXXXXXXX_sms0.smsbackup

After that, I receive : " Bonjour la m" on my phone.
Excepted : “Bonjour la météo est belle ce matin”
Received : “Bonjour la m” the message is truncated

My gammu-smsdrc config :

# Configuration file for Gammu SMS Daemon

# Gammu library configuration, see gammurc(5)
# Please configure this!
port = /dev/ttyUSB0
model = at
connection = at19200
synchronizetime = yes
logfile = /tmp/gammu.log
logformat = textall
use_locking =
GammuLoc = fr_FR.UTF8
GammuCoding = utf8

# Debugging
#logformat = textall

# SMSD configuration, see gammu-smsdrc(5)
PIN = 0000
service = files
logfile = /tmp/gammu.log
CommTimeout = 5
# Increase for debugging information
debuglevel = 255
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/

Thank you to responding if it's possible.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.