#!/Python27/pythonold/python.exe
import mysql.connnector
import cgi,cgitb
print("content-type:text/html\n")
db=mysql.connector.connect(host="localhost",user="root",password="xyz",database="shyam")
cursor=db.cursor()
cursor.execute("select version()")
data=cursor.fetchone()
print("database version %s" % data)
print("<a href="#">home</a>")
db.close()
-------------------------------------------------------
this is my code when i run this with filename.py i am getting the error as:-
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
couldn't create child process: 720002: exam2.py
If you think this is a server error, please contact the webmaster.
Error 500
localhost
Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9