[Cascavel-pm] Scripts iguais mas resultados diferentes
Gilmar Júnior
gilmarjr em im.ufba.br
Terça Junho 21 21:06:17 PDT 2005
Pode ser problemas com permissão.
O script tem que ser legível e executável pelo apache.
Qual o resultado de "ls -l"?
Gilmar Júnior.
kamusbr escreveu:
>Pessoal, gostaria de saber uma coisa, estava testando uns códigos q
>peguei em alguns lugares na Internet e no mínimo estou achando curioso o
>comportamento de um deles...
>
>Primeira coisa, no meu micro fiz o seguinte:
>
>robson em diamante:~/Desenvolvimento/perl$ diff data.pl data4.pl
>robson em diamante:~/Desenvolvimento/perl$
>
>ambos no memso diretório e sem diferenças...
>
>mas qnd executo pelo apache;
>
>O "data.pl", resultado:
>
>Updated: December 31, 1969
>
>Já com "data4.pl" tenho:
>
>
> Internal Server Error
>
>The server encountered an internal error or misconfiguration and was
>unable to complete your request.
>
>Please contact the server administrator, webmaster em localhost and inform
>them of the time the error occurred, and anything you might have done
>that may have caused the error.
>
>More information about this error may be available in the server error log.
>
>------------------------------------------------------------------------
>Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-15 mod_perl/1.999.21
>Perl/v5.8.4 Server at 200.165.81.132 Port 80
>
>
>O código fonte do data.pl
>
>#!/usr/bin/perl
>
>my ($Source) = $ENV{"REQUEST_URI"};
>my ($Path) = $ENV{"DOCUMENT_ROOT"};
>my ($Filename) = "$Path/$Source";
>my ($Day,$Month,$Year) = (localtime( (stat($Filename))[9] ))[3..5];
>my (@Months) = ('January',
> 'February',
> 'March',
> 'April',
> 'May',
> 'June',
> 'July',
> 'August',
> 'September',
> 'October',
> 'November',
> 'December');
>
>$Year = $Year+1900;
>
>####################################################################################
># display the status bar with the last updated date, and top link
>####################################################################################
>print "Content-type: text/html \n\n";
>print <<HTML
><tr>
> <td> </td>
> <td style='padding:0 5px;'>
> <table cellpadding='0' cellspacing='0' width='100%'>
> <tr>
> <td width='50%' align='left' style='font-size:20px;color:#000000;'>
> Updated: $Months[$Month] $Day, $Year
> </td>
> <td width='50%' align='right'>
> <a style='font-size:10px;color:#000000;' href='#top'>Top</a>
> </td>
> </tr>
> </table>
> </td>
> </tr>
>HTML
>
>Alguma idéia?
>
>_______________________________________________
>Cascavel-pm mailing list
>Cascavel-pm em pm.org
>http://mail.pm.org/mailman/listinfo/cascavel-pm
>
>
Mais detalhes sobre a lista de discussão Cascavel-pm