onlinecity / php-smpp

PHP 5 based SMPP client library
232 stars 160 forks source link

Connection Issue #67

Open HemanParbhakar opened 7 years ago

HemanParbhakar commented 7 years ago

Uncaught exception 'SocketTransportException' with message 'Could not create socket; Address family not supported by protocol' in /home/example/public_html/smsApi/test/1/sockettransport.class.php:219 Stack trace: #0 /home/example/public_html/smsApi/test/1/4.php(16): SocketTransport->open() #1 {main} thrown in /home/example/public_html/smsApi/test/1/sockettransport.class.php on line 219

imranniaz commented 7 years ago

increase the $defaultSendTimeout in SocketTransport Class, it should work afterwards:

class SocketTransport { protected $socket; protected $hosts; protected $persist; protected $debugHandler; public $debug;

protected static $defaultSendTimeout=500;
protected static $defaultRecvTimeout=750;
public static $defaultDebug=true;
HemanParbhakar commented 7 years ago

Still The Same error after changing the timeout

himikeb1 commented 6 years ago

I found that it is trying IPV6 by default.. got past it with: $transport::$forceIpv4 = true; before the transport->open() call.

yerganat commented 6 years ago

Solve the problem by setting $transport->setSendTimeout(30000);