I have a Python (2.7) script that connect to a remote device through SSH and configure it. This script works fine when I run it.
I have a PHP page that execute other Python scripts and they are also working fine. The problem: the SSH script doesn't work when I'm running it from the PHP page. (there is no problem with the PHP page nor the Python script)
To be more specific, the script (when executed by PHP) is running until it gets to the first SSH related code (
How can it be, and is there anything I can do to make it work? Thanks!
(OS: windows XP. Server:Wamp (Apachi http server)
for example, consider this simple code:
fp=open("file.txt","w") fp.write("text") import paramiko fp.write("another text") fp.close()
if executed by me, everything works fine. If by the PHP page- only the code until "import paramiko" is executed.
fp=open("file.txt","w") fp.close() import paramiko fp2=open("file2.txt","w") fp2.close()
Executed by me- both files created. by php- only the first.
Moreover: I tried using Try & Catch but nothing comes up. No exception is thrown.
- Python：无法通过脚本启动Selenium Webdriver（Firefox），但它可以通过命令行工作
- PHP执行时，Python SSH脚本不起作用