graphics

(Líder Mundial con más de 100.000 web sites alojados)

  • Escribiendo tus propios CGI scripts

    Nuestros servidores aceptan CGI scripts basados en Perl, Unix SH,KSH, CSH, y C/C++. Perl es el que mejor se adapta a CGI. Además, Perl no necesita compilarse manualmente, mientras que C/C++ code debe compilarse en nuestros servidores antes de poderse utilizar.

    Si necesitas instalar un script personal, simplemente súbelo a tu "cgi-local". Aquí tienes algunas pistas para instalar Perl scripts:

    1.Súbelo a tu directorio cgi-local y asegúrate de que los permisos son los correctos.
    2.Upload en ASCII transfer mode y NO en modo BINARY )
    3.La primera línea de cada script: #!/usr/local/bin/perl
    4.Usa el Perl script checker en tu Control Panel para buscar posibles errores de sintaxis.
    5.Referencia al script usando /cgi-local (y NO /cgi-bin)
    Si un script llama a un archivo dentro de tu web,pero el script no necesita un URL, necesitarás usar el system path

    ejemplos:

    /u/web//... <- si reside en la raiz
    /u/web//cgi-local/... <- si reside en cgi-local
    Sustituye el path al archivo con tu nombre.Es el nombre de tu dominio.

    *** Rapidsite solo ejecuta 2 compilaciones C/C++

    Implementing custom CGI scripts



    Our servers have the capability to run CGI scripts based on
    Perl, Unix SH, KSH, CSH, and C (NOT C++) languages. Perl is a our
    language of choice as it is a world standard and is well suited
    to CGI. In addition, Perl code does not require manual
    compilations whereas C code must be compiled* on our web servers
    prior to use.



    If you have a custom CGI script that you need to use, simply
    upload it to your personal "cgi-local"



    Here are some helpful tips to follow when installing scripts;



    Shell Scripts




    1. Upload to your cgi-local directory to ensure proper file
      permission settings

    2. Upload in ASCII transfer mode (and NOT BINARY mode)

    3. The first line of each script must read: #!/bin/sh ,
      #!/bin/csh or #!/bin/ksh based on whichever shell scripts
      you prefer using.

    4. Reference the script using /cgi-local (and NOT /cgi-bin)

    5. Always remember to include echo "Content-type:
      text/html\n\n"



    Perl Scripts




    1. Upload to your cgi-local directory to ensure proper file
      permission settings

    2. Upload in ASCII transfer mode (and NOT BINARY mode)

    3. The first line of each script must read:
      #!/usr/local/bin/perl

    4. Use the Perl script checker in your Control Panel to
      check syntax.

    5. Reference the script using /cgi-local (and NOT /cgi-bin)

    6. Always remember to include print "Content-type:
      text/html\n\n"; or alternatively using the Perl
      module CGI.pm (If you do not, your scripts will not run
      and you will get an Internal Server Error message).

       

      use CGI qw(:cgi-lib :standard);

      print header();



     



    If a script calls another file within your account, but the
    script does NOT require a URL, you need to use the system path.
    Instead of using the absolute path to your home directory
    ("/www26/web/someid"), you should instead use the
    DOCUMENT_ROOT environment variable ($ENV{DOCUMENT_ROOT} in Perl)
    to determine the path of your files or programs within a script.



    e.g.




    From:

    /www23/web/yourid/data/fact.html


    To:

    $ENV{DOCUMENT_ROOT}/data/fact.html




     



    *** We can run only two C compilations for you. As such, we
    suggest Perl as an alternative scripting language. A work around
    may be available to seasoned C developers. C++ is NOT supported.



    Other Resources

    DOS based
    Perl editor


    comp.lang.perl.misc

    comp.infosystems.www.authoring.cgi


    Updated: 10/03/98


  • E
    Site Hosting
    E-mail
    U
    Web Design
    y Marketing
    S
    Servicios
    Cliente
    K
    Frequently
    Asked Questions
    A
    Solicítalo
    Ahora
    L
    Home
    Sorginetxe


    Copyright © 1996-98 Euskal Internet Services.
    All Rights Reserved.