I am running XAMPP on windows, and trying to run following python code and it is giving 500 Internal Server Error, when I checked error log it says:AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name, [cgi:error] [pid 17416:tid 1836] (OS 5)Access is denied. : [client ::1:1031] AH01223: couldn’t spawn child process: C:/xampp/htdocs/test.py
My code:
#!C:/Users/Sravani/AppData/Local/Programs/Python/Python38-32
print ("Content-type:text/htmln")
print ("")
print ("")
print ("First CGI Program")
print ("")
print ("")
print ("
Hello
")
print ("")
print ("")
can anyone help me in this regard
2
Answers
You should probably check if it’s the wrong location
use install.bat i posted here :
https://stackoverflow.com/a/71735909/5781320
in windows 10 x64+ apache + php 8.1 +… and python associated correctly i have in my htdocs a folder test where i have 2 files:
index.php
and index.py :
print(‘Python:Hello, World!’)
by calling in browser http://localhost/test/ i got running the python script without calling it cgi (!#…)
i let in place the comments you read ..
cause i have even ruby and the index.rb and they running both ! (i am not python user and neither ruby but i usually for a while i try both of them -even golang to see what’s new ..)
the index.rb
in ruby is no need to associate nothing you have already all done(in case you corrupt that you fix with this)