20/12/2009, 16:31
|
| | Fecha de Ingreso: abril-2003 Ubicación: Mexico
Mensajes: 604
Antigüedad: 21 años Puntos: 23 | |
Respuesta: usuario con su propio espacio buenas!!
aqui pongo la parte del script en cgi que crea el espacio
pero a mi me marca error interno
error 500 Código HTML: ¡Error en el servidor!
El servidor encontro un error interno y fue imposible completar su solicitud.
Mensaje de error:
Premature end of script headers: signup.cgi
Por favor contacte con el webmaster en caso de que usted crea que existe un error en el servidor.
Error 500
el codigo que se tendria que convertir a php seria este: Código PHP: #!C:\xampp\perl\bin\perl.exe use Fcntl; use AnyDBM_File; $ENV{'PATH_TRANSLATED'} =~ s////g; $ENV{'PATH_TRANSLATED'} =~ s//(w)+.(w)+$//; $ENV{'SCRIPT_FILENAME'} =~ s//(w)+.(w)+$//; if (length($ENV{'SCRIPT_FILENAME'}) >1) { $path = $ENV{'SCRIPT_FILENAME'}; } else {$path=$ENV{'PATH_TRANSLATED'};} require "$path/cgi-lib.pl"; &ReadParse; print "Content-type: text/html\n\n"; open(CONFIG,"$path/config.txt") || &error_html("El archivo de Config está extrañando. hecho que usted instala todavía?"); while (<CONFIG>) { if ($_ =~ /n/) { chop $_; } @config=split(/=/,$_,2); $config{$config[0]}=$config[1]; } close (CONFIG); if (!$in{'submit'}) { print qq~ <html> <head> <title>Mantenimiento Preventivo Computacional</title> </head> <body bgcolor="#FFFFFF" link="#000000" vlink="#FF0000" alink="#800080"> <p align="center"><big><big><strong><font face="Arial">Mantenimiento Preventivo Computacional</font></strong></big></big></p> <form method="POST"> <div align="center"><center><table border="0" cellpadding="0" cellspacing="0" bgcolor="#004080"> <tr> <td><table border="0" cellpadding="2" cellspacing="1" width="600"> <tr> <td><font face="Arial" color="#FFFFFF"><strong>Signup</strong></font></td> </tr> <tr> <td bgcolor="#0080FF"><font face="Arial"> Por Favor Rellene completamente el formulario lea las condiciones de uso y Presione en 'enviar' Para Procesar su Solicitud.<br><br>Recuerde que al enviar la solicitud acepta incondicionalmente los terminos especificados.<br><br> Nos Reservamos el derecho de Eliminar cualquier archivo ó pagina SIN explicacion alguna que ignore las condiciones de uso.<br><br> Los Terminos y Condiciones de Uso Estan Especificados <a href="javascript:window.open('http://www.mpcmerida.com/sytes/faqs.htm', 'nombreTarget', 'width=290,height=260,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes');void(null);">Aqui</A><br><br><br></font><table border="0" cellPadding="0" cellSpacing="0"> <TBODY> <tr> <td width="120"><div align="right"><p><font face="Arial">Username</font></td> <td><small><font face="Arial"> <input name="username" style="BACKGROUND-COLOR: rgb(255,255,255)" size="22"></font></small></td> </tr> </TBODY> </table> <table border="0" cellPadding="0" cellSpacing="0"> <TBODY> <tr> <td width="120"><div align="right"><p><font face="Arial">Contraseña</font></td> <td><small><font face="Arial"> <input name="password" style="BACKGROUND-COLOR: rgb(255,255,255)" size="10"></font></small></td> </tr> </TBODY> </table> <table border="0" cellPadding="0" cellSpacing="0"> <TBODY> <tr> <td width="120"><div align="right"><p><font face="Arial">Email</font></td> <td><small><font face="Arial"> <input name="email" style="BACKGROUND-COLOR: rgb(255,255,255)" size="30"></font></small></td> </tr> </TBODY> </table> <table border="0" cellPadding="0" cellSpacing="0"> <TBODY> <tr> <td width="120"><div align="right"><p><font face="Arial">Nombre Real</font></td> <td><small><font face="Arial"> <input name="real_name" style="BACKGROUND-COLOR: rgb(255,255,255)" size="40"></font></small></td> </tr> </TBODY> </table> <table border="0" cellPadding="0" cellSpacing="0"> <TBODY> <tr> <td width="120"><div align="right"><p><font face="Arial">Descripcion</font></td> <td><small><font face="Arial"> <input name="site_description" style="BACKGROUND-COLOR: rgb(255,255,255)" size="60"></font></small></td> </tr> </TBODY> </table> <p><input type="submit" value="Enviar" name="submit"> <input type="reset" value="Reset"></td> </tr> </table> </td> </tr> </table> </center></div> </form> <hr width="80%" noshade size="1" color="#000000"> <p align="center"><font face="Arial">© Copyright 2002 Mpcmerida<br> Regrese a la <a href="http://www.mpcmerida.com.mx">Pagina Principal</a>!</font></p> <p align="center"><a href="mailto:[email protected]">Servicios y Problemas</a>!</font></p> </body> </html> ~; } else { # Convert username to all lower case letters $in{'username'} = lc($in{'username'}); # Open the user database $flags = O_CREAT | O_RDWR; $db = "$config{'data_dir'}/users"; tie(%users, 'AnyDBM_File', $db , $flags, 0666) || print &error_html("No puedo abrir banco de datos del usuario"); # Check for missing form field values if (!$in{'username'}) { &error_html("Username Perdido"); } if (!$in{'password'}) { &error_html("Password Perdido"); } if (!$in{'email'}) { &error_html("Direccion email Perdido"); } if (!$in{'real_name'}) { &error_html("Nombre real Perdido"); } # Check if the account name is availible if ($users{"$in{'username'}"}) { &error_html("Username ya Esta en Uso"); } @reserved_names=split(/,/,$config{'reserved_names'}); foreach $line (@reserved_names) { if ($in{'username'} eq $line) { &error_html("Username ha sido reservado"); } } # Check for invalid characters if ($in{'username'} !~ /^[a-z0-9-_]*$/i) { &error_html("Caracteres Invalidos En El Username"); } if ($in{'password'} =~ /|/) { &error_html("caracteres Invalidos en password"); } if ($in{'email'} !~ /@/ || $in{'email'} =~ /|/) { &error_html("Direccion de Correo Electronico Invalido."); } if ($in{'real_name'} =~ /|/) { &error_html("Nombre Real Invalido"); } # Fix up site description if (length($in{'site_description'}) > 100) { &error_html(" La longitud de descripción del sitio no puede ser más larga de 100 carácteres"); } $in{'site_description'} =~ s/<[^>]>//g; unless (-d "$config{'root_dir'}/$in{'username'}") { # Create directory mkdir ("$config{'root_dir'}/$in{'username'}", 0755) || &error_html("No puedo crear directorio del usuario : $!"); # Create default html open (INDEX,">$config{'root_dir'}/$in{'username'}/index.html") || &error_html("No puedo crear al usuario predefinido index.html: $!"); print INDEX qq~ <html> <head> <title>$in{'username'}'s Hospedado en mpcmerida</title> </head> <body bgcolor="#FFFFFF"> <font face="Arial,Helvetica"> <big><big>$in{'username}s homepage</big></big><p> Disculpe, mi homepage se encuentra en construccion.<br> Favor de Regresar mas Tarde. <br><br> <font face="arial" size="2"><img src="../images/mpc.gif" align="left" width="150" height="150"> <br><br> <p align="center"><a href="mailto:[email protected]">Servicios y Problemas</a>!</font></p> <p align="center"><font face="Arial">© Copyright 2002 Mpcmerida<br> Una Pagina Hospedada en <a href="http://www.mpcmerida.com.mx">Mpcmerida</a>!</font></p> </font> </body> </html> ~; close (INDEX); } // aqui continua......... upps no me permite poner todo el codigo asi que lo divido en dos
cualquier ayuda es bien recibida para hacer la conversion a php
un saludo!!!
__________________ ¡El Respeto al Derecho Ajeno Es la Paz! |