Executing a Python script in Apache2

前端 未结 6 1840
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 22:51

I am trying to execute a Python program using Apache. However, Apache will only serve the file and not actually execute it. The permissions on the file are r/w/x and it is

6条回答
  •  星月不相逢
    2020-12-04 23:32

    I'm assuming you are using firefox. I read somewhere else on the 'net that it could be related to the firefox addons installed on a machine.

    I was getting this error and I use firefox 20. Switched to Opera and I did not get any more errors and the python scripts seemed to execute just fine.

    Edit: It was actually an eval() method call I had overlooked that had appended "(" and ")" to the results of the script that caused my failure. Once I removed them, it worked for me.

    I noticed you did not post the javascript, html, or whatever it is you use to call the script in the first place. Perhaps you could post it for us? I did a direct copy/paste example from a blog site without looking at what I had copied. That was my error.

提交回复
热议问题