के साथ पाइथन लिपियों को निष्पादित करना मुझे लाइटनपीडी और सीजीआई-बिन के भीतर निष्पादित करने के लिए पाइथन स्क्रिप्ट प्राप्त करने में समस्या आ रही है। मुझे स्टैक ओवरफ्लो (यानी Lighttpd and cgi python) और अन्य वेबसाइटों के भीतर समान समस्याएं मिली हैं, लेकिन कोई भी मेरी कॉन्फ़िगरेशन से पूरी तरह से संबंधित नहीं है। मैं बिना किसी समस्या के "पायथन flash.py" जारी करके स्टैंडअलोन पायथन स्क्रिप्ट निष्पादित कर सकता हूं।लाइटटैड और सीजीआई
एक महत्वपूर्ण बिंदु जो इसे हल करने में मदद कर सकता है यह तथ्य यह है कि "apt-get update" और "apt-get upgrade" चलाने से पहले सब कुछ ठीक काम कर रहा था। मैंने कुछ फ़ाइलों पर अनुमतियों के साथ गड़बड़ करके और कॉन्फ़िगरेशन फ़ाइलों के साथ गड़बड़ कर प्रयोग किया है, लेकिन इनमें से कोई भी मदद नहीं करता है।
मैंने तब से सब कुछ वापस राज्य में डाल दिया है, जहां यह अपडेट चलाने के बाद ही था। यह मेरे लिए नया क्षेत्र है और मैं कुछ भी स्पष्ट खोजने के लिए पर्याप्त शिक्षित नहीं हूं। जैसा कि यह खड़ा है, यहां मेरी वर्तमान कॉन्फ़िगरेशन है।
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_auth",
# "mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ("/var/cache/lighttpd/uploads")
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
index-file.names = ("index.php", "index.html", "index.lighttpd.html")
url.access-deny = ("~", ".inc")
static-file.exclude-extensions = (".php", ".pl", ".fcgi")
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("application/javascript", "text/css", "text/html", "text/plain")
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
#auth.backend = "plain"
#auth.backend.plain.userfile = "/etc/lighttpd/.lighttpdpwd"
#auth.require = ("/var/www" =>
#(
#.method. => "basic",
#.realm. => "Authentication required",
#.require. => "user=admin"
#)
#)
etc/lighttpd/conf-सक्षम/10-cgi.conf /etc/lighttpd/lighttpd.conf
# /usr/share/doc/lighttpd/cgi.txt
server.modules += ("mod_cgi")
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = (".py" => "/usr/bin/python")
}
## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.py even outside of /usr/lib/cgi-bin.
#
#cgi.assign = (
# ".pl" => "/usr/bin/perl",
# ".py" => "/usr/bin/python",
#)
/var/www/cgi-bin/फ्लैश। पीई
#Dog Treat Dispenser. Flash Code
import RPIO
import time
import cgi
FLASHER = 22
#ADD CLICKER!
RPIO.setup(FLASHER , RPIO.OUT) #Set FLASHER pin as OUTPUT
for x in range(0, 5): #Flash for 2 seconds
RPIO.output(FLASHER, True)
#ADD CLICKER SUBROUTINE
time.sleep(.500)
RPIO.output(FLASHER, False)
#ADD CLICKER SUBROUTINE
time.sleep(.500)
# reset every channel that has been set up by this program,
# and unexport interrupt gpio interfaces
RPIO.cleanup()
print "Content-Type: text/html"
print "Location: http://10.143.141.164"
print
print "<html><head>"
print "<title>Flash!</title>"
print "</head>"
print "<body>"
print "<h1>Flash!</h1>"
print "</body>"
print "</html>"
अनुसंधान के एक टन करने के बाद, और कहीं भी नहीं, मुझे नुकसान हुआ है। कोई भी मदद जो आप प्रदान कर सकते हैं उसकी सराहना की जाएगी। यदि कुछ भी है जो मुझे याद आया है, तो कृपया मुझे बताएं और मैं आपको यह प्राप्त करने के लिए अपनी पूरी कोशिश करूंगा।
धन्यवाद!