Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirecting CGI(perl) error output to client

Tags:

apache

cgi

perl

I use perl as cgi for apache server,when each time the script encounters an error,the client just show 500 error and I have to check the apache error log every time.

Is there a way to let perl send it's error message just to the client (just like asp's debug mode)?

like image 748
Guan Yuxin Avatar asked Feb 22 '23 13:02

Guan Yuxin


1 Answers

You need to use the CGI::Carp module:

use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
like image 121
Ilion Avatar answered Mar 05 '23 16:03

Ilion