Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It work fine in python shell but when I run in my server it come with internal server error. The question is to check to
It work fine in python shell but when I run in my server it come with internal server error. The question is to check to see where the error is in picture? Yes I ha e checked the permission of folder cgi-bin which is 755 and the python file is also 755.
1u/bin/python3 Ir The Plet l Import modules for CGI handling import cgi, cgitb l Create in-tance of FieldStorag ch form cgi.Fieldstorage ) Get data from fields acti/Eirst name torm.getvalue ('finame y d the bdlast_nameform.getvalue('Iname ') Mo i form.getvalue('sex'): sex form.getvalue (.sex') sex = "Not set" form.getvalue ('agegroup'): subject -form.getvalue ('agegroup') ct subject-"Not entered" cb Ch chprint ("Content-type:text/htmlrnrin") K/print ("") sprint ("titlelelio second CGI Program/ print ("") print (" ") print ("Hello %s %s
" % (first-name, last-name)) print ("The email address is %s
" % (email-ad)) print (" Gender is %s" % (sex)) print (" your age is between %s
" (subject)) print ("") print ("
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started