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
  • 230,875
  • 49
  • 477
  • 553
Nadin Martini
  • 161
  • 1
  • 3
  • 12

1 Answers1

3

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
  • 846
  • 11
  • 22