Perl en Español

  1. Home
  2. Tutoriales
  3. Foro
  4. Artículos
  5. Donativos
  6. Publicidad
 

Problemas en cgi

 
Publicar nuevo tema   Responder al tema    Foros de discusión -> CGI
Mensaje Jue Oct 12, 2006 1:00 am
Legolas
Perlero Nuevo
Perlero Nuevo
Registrado: 12 Oct 2006
Mensajes: 1
Problemas en cgi Responder citando

Tengo un cgi que desde la linea de comandos se ejecuta perfectamente, pero cuando lo llamo desde un web form pasandole los parametros me devuelve un error. El código del web form:

HTML:
<html>
<form action="../perl/blog.pl" method="POST">
NickName: <input type="text" name="nick"><br>
Email: <input type="text" name="email"><br>
Titulo: <input type="text" name="titulo"><br>
Asunto: <input type="text" name="asunto"><br>
Comments:<br>
<textarea name="comentario" rows="5"
   cols="80">
</textarea>
   <br>
<input type="submit" value="Enviar al blog.">
</form>
</html>


El código del cgi:

Perl:
# codigo creado por Legolas.
# 2006 Game.

#!/usr/bin/perl
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use Blog::Simple;


print header;
print start_html("Bloging");
print end_html;

&insertar_blog;

sub insertar_blog()
{
        if ( param() )
        {

                my $nickname    = param('nick');
                my $email       = param('email');
               my $titulo     = param('titulo');
                my $asunto       = param('asunto');
                my $contenido   = param('contenido');
        
                print $nickname;
                $sbO = Blog::Simple->new('../blog/');
                #$sbO->create_index();
                $sbO->add($titulo,$nickname,$email,$asunto,$contenido);
                $sbO->render_all('myxslfile.xsl','blog.html');
        }
}


el error:

Código:
Software error:

../blog/b_base/Thu_Oct_12_08_40_49_2006_Legolas/blog.xml at /usr/local/share/perl/5.8.7/Blog/Simple.pm line 115.


Puede ser tema de permisos le he dado 777 a toda el directorio.

Gracias de antemano.
Mensaje Jue Oct 19, 2006 9:23 am
explorer
Moderador
Moderador
Registrado: 24 Jul 2005
Mensajes: 4212
Ubicación: Valladolid, España
Responder citando

Hay algo que no entiendo... haces un start_html y luego un end_html y luego llamas a la función. ¿Eso está bien?
Publicar nuevo tema   Responder al tema    Foros de discusión -> CGI Todas las horas son GMT - 6 Horas
Página 1 de 1



Powered by phpBB © 2001, 2005 phpBB Group