May 16, 2007 0

A PERL Script for Troubleshooting CGI Scripts

By Levi Senft in Web

I started working on a Python program that is hosted on GoDaddy. Much to my dismay GoDaddy doesn’t provide shell logins. I was testing the scripts on my machine, but I don’t have the mysql library installed. When I started to write the database portion of the script I wrote this PERL CGI script to execute my Python script and report STDERR if it doesn’t work.

 


#!/usr/bin/perl

print "Content-type: text/htmlnn";

print "";

print "
";

system ("python MyPythonScript.py 2>&1n");

print"

";

print "";

 

Tags: , , ,

Leave a Reply