(8)Exec format error: exec of '...' failed

Usually this error message means one of two things:

  1. Your CGI script does not have a #! line 2. Your CGI program is not a valid binary for the system

The first two bytes of a file are used to determine how to execute the file. If those two bytes are #!, something special happens: The rest of the line is treated as the path to an executable to run the rest of the file. If those two bytes are not #!, then the system assumes it's a binary file and tries to execute it that way.

See Also

  • No labels