Jue Oct 12, 2006 1:00 am
|
 |
Legolas
Perlero Nuevo

|
Registrado: 12 Oct 2006
Mensajes: 1
|
|
| Problemas en cgi |
|
|
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. |
|
|
|

Jue Oct 19, 2006 9:23 am
|
 |
explorer
Moderador

|
Registrado: 24 Jul 2005
Mensajes: 4212
Ubicación: Valladolid, España
|
|
|
|
|
| Hay algo que no entiendo... haces un start_html y luego un end_html y luego llamas a la función. ¿Eso está bien? |
|
Powered by phpBB © 2001, 2005 phpBB Group
|