python - Unable to run a .py in cgi-bin -


hi guys:) using beagle bone black debian wheezy make project. have small problem:i have index.php in /var/www there call python file called send_email.php using ajax:

$.ajax({ url:"/cgi-bin/send_email.py" }); 

it works (it sends me email , receive it).

but when try same thing send_sms.py has following code inside

import nexmo client = nexmo.client(key='xxxxx', secret='xxxxxxxxx') client.send_message({'from': 'nexmo number', 'to': 'my own number', 'text': 'hello world'}) 

when run terminal using: python send_sms.py, works when call using ajax not. confused thought calling .py file in cgi-bin using ajax, execute them (and works send_email.py) send_sms.py not.

thank help, appreciated!


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -