GSM modem SMS sending error: unable to setup com port - php

i was using this code ref : https://stackoverflow.com/a/50632966/11144183
and i thought the problem was solve but this thing pop up
Fatal error: Uncaught exception 'Exception' with message 'Unable to setup COM port,
check it is correct' in C:\xammp\htdocs\gnokii\send.php:56 Stack
trace: #0 C:\xammp\htdocs\gnokii\send.php(18): gsm_send_sms->init() #1
{main} thrown in C:\xammp\htdocs\gnokii\send.php on line 56
i've used the PORT COM given on the modem and also the baudrate but it always showing this error hope you can help me thanks in advance

Related

Zend Framework - Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception'

can someone help?
I have issue with sending mail from website (eshop) after order confirmation.
Zend fremework is used to 2 identically eshop. Both use the same classes, same settings, on one it works fine and on the other one crashes with this error:
Settings:
Zend framework, Eshop, PHP version 5.3
MAIL
mail.encoding = UTF-8
mail.useSmtp = true
mail.smtp.server = mail.*******.**
mail.smtp.port = 465
mail.smtp.ssl = ssl
mail.smtp.auth = login
mail.smtp.username = #.**
mail.smtp.password = **********
ISSUE
Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'No connection has been established to mail8.hostmaster.sk' in /home/hn003000/www_root/ShibumiFramework/Zend/Mail/Protocol/Abstract.php:312 Stack trace:
#0 /home/hn003000/www_root/ShibumiFramework/Zend/Mail/Protocol/Abstract.php(370): Zend_Mail_Protocol_Abstract->_receive(300)
#1 /home/hn003000/www_root/ShibumiFramework/Zend/Mail/Protocol/Smtp.php(199): Z Zend_Mail_Protocol_Abstract->_expect(220, 300)
#2/home/hn003000/www_root/ShibumiFramework/Zend/Mail/Transport/Smtp.php(198): Z Ze Znd_Mail_Protocol_Smtp->helo('localhost')
#3 /home/hn003000/www_root/ShibumiFramework/Zend/Mail/Transport/Abstract.php(349): Zend_Mail_Transport_Smtp->_sendMail()
#4/home/hn003000/www_root/ShibumiFramework/Zend/Mail.php(960): Zend_Mail_Transport_Abstract->send(Object(Shibumi_Mail))
#5/home/hn003000/www_root/ShibumiFramework/Shibumi/Mail.php(27): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#6 /home/hn003000/www_root/www_akva24/application/modules/catalog/controllers/ in /home/hn003000/www_root/ShibumiFramework/Zend/Mail/Protocol/Abstract.php on line 312
Thanks for answers
I tried change to TLS
I tried another mail server
Requests did not arrive on the mail server
My hosting privider blocked php mail function on my site!
After they fixed it (a week of convincing that the fault is with them) it works.
Thanks, solved

No route to host error while login using google plus in PHP

I wanted Google plus login in my PHP website. I tried to integrate it from : http://www.codexworld.com/login-with-google-api-using-php
When I try to login, It throws error:
Fatal error: Uncaught exception 'Google_IOException' with message 'HTTP Error: (0) Failed to connect to accounts.google.com port 443: No route to host' in /home/thewiref/public_html/mastkids.in/test_google/src/io/Google_CurlIO.php:128 Stack trace: #0 /home/thewiref/public_html/mastkids.in/test_google/src/auth/Google_OAuth2.php(101): Google_CurlIO->makeRequest(Object(Google_HttpRequest)) #1 /home/thewiref/public_html/mastkids.in/test_google/src/Google_Client.php(131): Google_OAuth2->authenticate(Array, NULL) #2 /home/thewiref/public_html/mastkids.in/test_google/index.php(8): Google_Client->authenticate() #3 {main} thrown in /home/thewiref/public_html/mastkids.in/test_google/src/io/Google_CurlIO.php on line 128
Same code is working perfect in different domain and server. So what could be issue in this server?
Check your Firewall settings and network connectivity to see if you are able to connect to the network.
Try running the following
<?php
$read = file_get_contents("https://google.com");
echo $read;
If you are able to see the google page(even if it is distorted).
If not then your system has a network connectivity issue or DNS issues.

Failed to connect to www.googleapis.com port 443: and some CURL information needed

Can someone tell me, I'm using curl in other ways on this machine, so I know it works, but it's just loaded as a php extension, and the dll is called php_curl.dll
Is curl so much more? I can see it can me downloaded multiple places, and I'm wondering if my problem is that I'm missing some curl installation.
I've read this, but I'm not that familiar with curl
My trouble story
I'm trying to connect to Google Analytics Reporting V4
I've been following this tutorial (Earlier I've used V3 on another server).
I've been informed it had some trouble in the docs right now (whitch I've experienced as well) therefor I've used the google-api-2-client as discussed here.
It got me further, but the newest problem is throwing me of...
I get this Message:
"Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to www.googleapis.com port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:186 Stack trace: #0 D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(G in D:\www\rest\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 186"
Maybe the firewall blocks outward connections on port 443 (HTTPS).

Failed to connect to accounts.google.com port 443: Operation timed out

I am trying to use Google Analytics API. After I enabled Analytic API I received my client_secrets.p12 and downloaded the API client library. I then replaced the service_account_email and changed the key_file_location. How ever when I run my script 'HelloAnalytics.php', I get an error:
PHP Fatal error: Uncaught exception 'Google_IO_Exception' with
message 'Failed to connect to accounts.google.com port 443: Operation
timed out' in
/Users/weiqi.tan/Downloads/ga_api/google-api-php-client/src/Google/IO/Curl.php:115
Stack trace:
0
/Users/weiqi.tan/Downloads/ga_api/google-api-php-client/src/Google/IO/Abstract.php(136):
Google_IO_Curl->executeRequest(Object(Google_Http_Request)) 1
/Users/weiqi.tan/Downloads/ga_api/google-api-php-client/src/Google/Auth/OAuth2.php(342):
Google_IO_Abstract->makeRequest(Object(Google_Http_Request)) 2
/Users/weiqi.tan/Downloads/ga_api/google-api-php-client/src/Google/Auth/OAuth2.php(314):
Google_Auth_OAuth2->refreshTokenRequest(Array) 3
/Users/weiqi.tan/Downloads/ga_api/HelloAnalytics.php(30):
Google_Auth_OAuth2->refreshTokenWithAssertion(Object(Google_Auth_AssertionCredentials))
4 /Users/weiqi.tan/Downloads/ga_api/HelloAnalytics.php(105):
getService() 5 {main} thrown in
/Users/weiqi.tan/Downloads/ga_api/google-api-php-client/src/Google/IO/Curl.php
on line 115
I don't know if anyone else ever had the same problem. Please tell me why this happened and how to solve it.
I had same problem today so
I just disable the firewall and it worked for me
I am using avg internet security

Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]'

I had already searched it in google and tried all the suggestions here in StackOverflow but I still get a Fatal Error:
I am using SwiftMailer for sending and email to GMAIL. It works perfectly on my localhost but when I uploaded it and try It gives me a Fatal Error:
Here is a part of my code:
require_once 'Swift-5.1.0/lib/swift_required.php';
$email = "fromemail#gmail.com";
$transport = Swift_SmtpTransport::newInstance('ssl://smtp.gmail.com', 465);
$transport->setUsername("username#gmail.com");
$transport->setPassword("usernamepassword");
// Create the message
$message = Swift_Message::newInstance();
$message->setTo(array(
"to#gmail.com" => "First Name"
));
$message->setCc(array("cc_email1#gmail.com" => "Name NAme" , "cc_email2#gmail.com" => "His Name"));
$message->setSubject("Subject");
$message->setBody("The Body");
$message->setFrom($email, "Full Name");
$message->setReplyTo(array($email => "Full Name"));
// Send the email
$mailer = Swift_Mailer::newInstance($transport);
$mailer->send($message);
This is the Fatal Error I get when I send an email to gmail :
Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]' in /homepages/41/d513702051/htdocs/php/Swift-5.1.0/lib/classes/Swift/Transport/StreamBuffer.php:266 Stack trace: #0 /homepages/41/d513702051/htdocs/php/Swift-5.1.0/lib/classes/Swift/Transport/StreamBuffer.php(64): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 /homepages/41/d513702051/htdocs/php/Swift-5.1.0/lib/classes/Swift/Transport/AbstractSmtpTransport.php(115): Swift_Transport_StreamBuffer->initialize(Array) #2 /homepages/41/d513702051/htdocs/php/Swift-5.1.0/lib/classes/Swift/Mailer.php(80): Swift_Transport_AbstractSmtpTransport->start() #3 /homepages/41/d513702051/htdocs/php/contactus.php(33): Swift_Mailer->send(Object(Swift_Message)) #4 {main} thrown in /homepages/41/d513702051/htdocs/php/Swift-5.1.0/lib/classes/Swift/Transport/StreamBuffer.php on line 266
I'm not sure but I think when you adding port 465, Swift class automatically will add ssl protocol.
Try
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465);
In the case of using Windows and XAMPP, the solution is to either deactivate your anti-virus software or open the proper port within it.
In my case, I had installed Avast and was getting this same problem (I had thought it may have been the Apache or PHP configuration within XAMPP, but no dice). Each time, once I deactivated my anti-virus software, it worked.
You must include this (for Swiftmailer):
$transport->setStreamOptions(array('ssl' => array('allow_self_signed' => false,'verify_peer' => false)));
That's all folks

Categories