2

I am trying to execute this code:

#!C:\python-3.7.0-embed-amd64\python.exe

print('Content-type: text/html\r\n')
print('\r\n')
print('Hello, World!')

and I got this error:

Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500
localhost
Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.6

What could be causing this problem?

Cody Gray
  • 222,280
  • 47
  • 466
  • 543
Nadin Martini
  • 91
  • 1
  • 2
  • 10

1 Answers1

2

Make sure there is no white space or tab characters before the shebang (#!). That was my issue.

It must be at the first character position of the file.

Stack Man
  • 816
  • 11
  • 21