Debugging:CGI programs

From SPCTools

Jump to: navigation, search

Many programs have different behavior when run from within the webserver context versus the command-line. In order to simulate the webserver enviroment in standard debugging (with gdb, etc.):

(from bash):

export REQUEST_METHOD=GET
export QUERY_STRING='<<copy and paste from your browser everything after the question-mark>>'
Personal tools