Phoenix.pm: help!

Doug and Julie Miles djmilesfamily at earthlink.net
Sat Jun 10 16:15:37 CDT 2000


This is a program that I have used when desperate, and without shell access:

#!/usr/bin/perl

my $output = `/usr/bin/perl -cw 
/export/clients/development/hit_stats/log_hit.cgi 2>&1`;

my $output =~ s/\n/<BR>\n/g;

print "Content-type: text/html\n\n";
print "<Title>cgi_debug output</Title> \n";
print "<H2>$Output</H2>";

Put this program in a cgi directory.  I wouldn't recommend leaving this 
running after you're done with it, as it might be a security risk.  Just 
change the paths to point to where your perl is located, and change the 
part after the '-cw' to point to the program you want to debug.  Then point 
your browser to this program, and it will run perl -cw on the program and 
display the output to the browser.  Good luck!

At 06:00 PM 6/9/00 -0600, you wrote:
>Type 'man rcs' or 'man cvs' at the prompt.  It'll cough manual pages
>on you.
>
>One problem: I don't get a prompt. I am on a WinNT network using SAMBA to 
>access our Linux webserver.
>
>>\_ >2) use version control religously
>>\_ I have been careful to do this.
>>That's good to know.
>>
>>
>>\_ >3) diff my-broken-script.cgi my-virgin-source.cgi
>>\_
>>\_ diff?
>>
>>... reports differences between two files.  Presumably if it worked
>>and then you did something to break it, it'll show up when compared
>>against the virgin code.
>>
>>\_ >4) perl -cw my-broken-script.cgi
>>\_ -cw?
>>
>>Check for syntax errors and throw warnings.
>>
>>man perlrun
>>
>>\_
>>\_ >5) perl my-broken-script.cgi
>>
>>If you're not firing the script up on a unix box (I assumed so b/c of
>>the apache error), you'll need to do the local variant mambo of what I
>>said.
>>
>>YMMV.
>>
>>David
>





More information about the Phoenix-pm mailing list