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

Not working with whmcs V 7 #99

Closed
emakundi opened this issue Dec 15, 2016 · 15 comments
Closed

Not working with whmcs V 7 #99

emakundi opened this issue Dec 15, 2016 · 15 comments

Comments

@emakundi
Copy link

I have just update my whmcs and the plugin stopped working it return and empty error number. just error:

Any one know anything about this?

@shibby
Copy link
Owner

shibby commented Dec 15, 2016

Thanks, @emakundi

Is your debug mode open? Since i don't have whmcs7 installation, i need to see more detailed errors.

http://docs.whmcs.com/Troubleshooting_Guide
Please open debug mode and let see if there is any information for me

@emakundi
Copy link
Author

Thank for the prompt response @shibby

I have enable all sort of debug and error logs but i am not really getting any error from the logs. if i enable log when i am sending and sms this is what i am getting ( I have masked the password) but if you enter that link on a browser the messsage is sent

Let me continue checking if not i will have to set up another whmcs and see


Debug Result
Params: {"senderid":"WebHostTZ","user":"evmaktz","pass":"XXXXX","signature":""}
To: 255686668866
Message: test6 
SenderClass: evmaksms
Request url: https://api.sendsms.co.tz/api/sendsms/plain?user=evmaktz&password=XXXX&sender=WebHostTZ&SMSText=test6&GSM=255686668866
response from the server: 
Message Not Sent Other Error. Error: 
Mesaj veritabanına kaydedildi

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

Oh ok for now the query is public function getSettings()
{
$result = select_query("mod_aktuelsms_settings", "*");
return mysql_fetch_array($result);
}

@shibby
Copy link
Owner

shibby commented Dec 15, 2016

Is this debug related with whmcs 7 problem? I didnt get it.

For Whmcs7 problem @Oscah3 shared a screenshot.

This screenshot says, select_query function need 3rd parameter. Which you can replace it as $result = select_query("mod_aktuelsms_settings", "*", ''); i guess.
But when we refer to Whmcs docs, we can see select_query function deprecated in Whmcs 6. So we need to rewrite all database functions at extension.

@Oscah3
Do you using whmcs 6 or 7?

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

Please tell me what to replace and with what sir.

@shibby
Copy link
Owner

shibby commented Dec 15, 2016

@Oscah3
Here: https://github.com/shibby/WHMCS-SmsModule/blob/master/modules/addons/aktuel_sms/smsclass.php#L102

This line should change as

$result = select_query("mod_aktuelsms_settings", "*", array());

Try this and let me know if its working. Also, u using whmcs 6 or 7?

@emakundi
Copy link
Author

@shibby or @Oscah3

WHMCS v7 is using php v 5.6 and i have changed it to that as well

Might that be the issue? can any of you guys change their php version to 5.6 if you have or even higher and test the sms function?

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

I am using 7

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

I will update you after makinga those updates you gave me

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

ThaNK YOU VERY MUCH IT IS FINE NOW

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

Is there a way of querring credits like on the clickatell one?

@emakundi
Copy link
Author

emakundi commented Dec 15, 2016

Yes @Oscah3 you need to create a separate function for that check the below link

https://dev.infobip.com/docs/account-balance

But these should be posted on another issue if there is. let just dedicate this place for v 7 for now.

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

Ok thanks

@Oscah3
Copy link

Oscah3 commented Dec 15, 2016

I opened issue #100

@emakundi
Copy link
Author

emakundi commented Dec 16, 2016

After Hours of Hustle i managed to close this issue with infobip only

It seems file_get_contents() [Inside the sender class] function works a bit different with php 5.6 than php 5.4

In php 5.6 it watches the certificate as well. i was using my own ssl certificate with was published on InfoBip servers as well but it did not really match with the ones they use to receive such requests as they have their own as well

so instead of using api.infobip.com i was using my domain that is api.sendsms.co.tz and that is why i was getting an empty response i created a separate file that was only getting the content from a ready made url and it gave the the below error

Warning: file_get_contents(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/webhost/public_html/test.php on line 3

Warning: file_get_contents(): Peer certificate CN=*.infobip.com' did not match expected CN=api.sendsms.co.tz' in /home/webhost/public_html/test.php on line 3

Warning: file_get_contents(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/webhost/public_html/test.php on line 3

Warning: file_get_contents(): Failed to enable crypto in /home/webhost/public_html/test.php on line 3

Warning: file_get_contents(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/webhost/public_html/test.php on line 3

Warning: file_get_contents(https://api.sendsms.co.tz/api/sendsms/plain?user=xxxxx&password=xxxxx&sender=WebHostTZ&SMSText=uygbsjs&GSM=25500000000): failed to open stream: operation failed in /home/webhost/public_html/test.php on line 3

So the issue was not really on whmcs installation rather it was with the php version as i thought before.

Thanks @shibby for your prompt responses and for keeping this plugin alive...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants