Stas Bekman wrote:

Actually it's not only about \n and \t, it's about other chars as well. Now I get error messages like this:

This is just my opinion, but isn't this much to place in your error log? Is this something you want your random sys admin to parse?
Why don't you have a separate mod_perl defect log, and the error log can say something like "Failure: see filename for error info". This way the error goes back to the app developer, instead of the web admin.


Aryeh
[Thu Dec 18 23:33:58 2003] [error] [client 127.0.0.1] Fh::new: Variable "@SAVED_SYMBOLS" is not available\teval 'package Fh; sub new {\n my($pack,$name,$file,$delete) = @_;\n _setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;\n require Fcntl unless defined &Fcntl::O_RDWR;\n (my $safename = $name) =~ s/([\\':%])/ sprintf \\'%%%02X\\', ord $1 /eg;\n my $fv = ++$FH . $safename;\n my $ref = \\\\*{"Fh::$fv"};\n $file =~ m!^([a-zA-Z0-9_ \\\\\\'\\\\":/.\\\\$\\\\\\\\-]+)$! || return;\n my $safe = $1;\n sysopen($ref,$safe,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return;\n unlink($safe) if $delete;\n CORE::delete $Fh::{$fv};\n return bless $ref,$pack;\n}\n\n;' called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 776\n\tCGI::_compile called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 740\n\tCGI::AUTOLOAD('Fh','b','/home/stas/apache.org/mp2-cvs2/t/logs/CGItemp3961',0) called at (eval 80) line 59\n\tCGI::read_multipart('CGI=HASH(0x8d42248)',742617000027,130) called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 489\n\tCGI::init('CGI=HASH(0x8d42248)') called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 325\n\tCGI::new('CGI') called at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31\n\tTestModules::cgi::handler('Apache::RequestRec=SCALAR(0x8d421a0)') called at (eval 95) line 3\n\teval {...} called at (eval 95) line 3\n at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31\n\tCGI::_compile called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 740\n\tCGI::AUTOLOAD('Fh','b','/home/stas/apache.org/mp2-cvs2/t/logs/CGItemp3961',0) called at (eval 80) line 59\n\tCGI::read_multipart('CGI=HASH(0x8d42248)',742617000027,130) called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 489\n\tCGI::init('CGI=HASH(0x8d42248)') called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 325\n\tCGI::new('CGI') called at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31\n\tTestModules::cgi::handler('Apache::RequestRec=SCALAR(0x8d421a0)') called at -e line 0\n\teval {...} called at -e line 0\n

which is a totally ruined version of:

[Fri Dec 19 00:19:12 2003] [error] [client 127.0.0.1] Fh::new: Variable "@SAVED_SYMBOLS" is not available eval 'package Fh; sub new {
my($pack,$name,$file,$delete) = @_;
_setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
require Fcntl unless defined &Fcntl::O_RDWR;
(my $safename = $name) =~ s/([\':%])/ sprintf \'%%%02X\', ord $1 /eg;
my $fv = ++$FH . $safename;
my $ref = \\*{"Fh::$fv"};
$file =~ m!^([a-zA-Z0-9_ \\\'\\":/.\\$\\\\-]+)$! || return;
my $safe = $1;
sysopen($ref,$safe,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return;
unlink($safe) if $delete;
CORE::delete $Fh::{$fv};
return bless $ref,$pack;
}


;' called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 776
CGI::_compile called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 740


CGI::AUTOLOAD('Fh','b','/home/stas/apache.org/mp2-cvs2/t/logs/CGItemp3845',0) called at (eval 80) line 59
CGI::read_multipart('CGI=HASH(0x8d42268)',742617000027,130) called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 489
CGI::init('CGI=HASH(0x8d42268)') called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 325
CGI::new('CGI') called at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31
TestModules::cgi::handler('Apache::RequestRec=SCALAR(0x8d421c0)') called at (eval 95) line 3
eval {...} called at (eval 95) line 3
at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31
CGI::_compile called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 740


CGI::AUTOLOAD('Fh','b','/home/stas/apache.org/mp2-cvs2/t/logs/CGItemp3845',0) called at (eval 80) line 59
CGI::read_multipart('CGI=HASH(0x8d42268)',742617000027,130) called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 489
CGI::init('CGI=HASH(0x8d42268)') called at /home/stas/perl/blead-ithread/lib/5.9.0/CGI.pm line 325
CGI::new('CGI') called at /home/stas/apache.org/mp2-cvs2/t/response/TestModules/cgi.pm line 31
TestModules::cgi::handler('Apache::RequestRec=SCALAR(0x8d421c0)') called at -e line 0
eval {...} called at -e line 0




__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



--
Aryeh Katz
SecureD Services
http://www.secured-services.com/
410 673 0700 x 2



Reply via email to