+ Reply to Thread
Results 1 to 6 of 6

Thread: Cgi/perl

  1. #1
    perlplan is offline x10Hosting Member perlplan is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    2

    Question Cgi/perl

    Hi,

    I installed a simple hello world Perl script, set the permissions and cannot get the script to work. It works on PC windows/apache setup at home, but it is a windows enviroment. I have checked the error logs and could not find that I had accessed the script even though in the raw logs I get
    66.249.71.237 - - [15/Dec/2009:22:11:25 -0500] "GET /cgi/helloworld.cgi HTTP/1.1" 404 3395 "-" "Mediapartners-Google"...I've searched the forums and have found nothing of value there.

    Anyone have any ideas? Help would be greatly appreciated!!!:dunno:

  2. #2
    jacob3 is offline x10Hosting Member jacob3 is an unknown quantity at this point
    Join Date
    Nov 2009
    Location
    Worcs UK
    Posts
    3

    Question Re: Cgi/perl

    Hi perlplan
    It works for me with perms set to 755.
    Perhaps you got the path wrong /cgi/helloworld.cgi

    On my X10server (chopin), it's /cgi-bin/helloworld.cgi

    Try that ?? :bigok:

  3. #3
    extrerem-cgi is offline x10Hosting Member extrerem-cgi is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    6

    Re: Cgi/perl

    on the server use this code :D

    #!/usr/bin/perl
    use strict;
    use warnings;
    print "Content-type: text/html\n\n";
    print "Hello, World...\n";



    on the appache server :D you must install a perl exe with the appache :D

    the set up must be :D to usr file :D

    or just chage the
    #!/usr/bin/perl
    to the file that the perl is like this

    #!/perl/bin/perl


    hope it work .....and if you need more help i will be glad to do that when i am online :D yours

  4. #4
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: Cgi/perl

    http://perlplan.x10hosting.com/cgi-bin/helloworld.cgi accesses the CGI script but results in a 500 error. What do the error logs say?

    When a script works under Windows but not a Unix flavor, it's almost always a matter of permissions or line endings. The Unix family and MS OS family use different line ending representations: LF for Unix, CR LF for MS. If you develop on a MS platform, you have to make sure the uploaded file follows Unix line ending discipline. One way of doing this is FTPing the file in ASCII, rather than binary, mode.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  5. #5
    extrerem-cgi is offline x10Hosting Member extrerem-cgi is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    6

    Re: Cgi/perl

    make sure that the file premision is 777 or 755

  6. #6
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: Cgi/perl

    Quote Originally Posted by extrerem-cgi View Post
    make sure that the file premision is 777 or 755
    Almost nothing should be world-writable (that is, have permissions mode 777).
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. [500 Credits] To help debug Upload Form CGI/Perl
    By gillapsfi in forum The Marketplace
    Replies: 1
    Last Post: 02-04-2009, 11:12 PM
  2. CGI/Perl Problem
    By garland1000 in forum Free Hosting
    Replies: 2
    Last Post: 11-25-2008, 09:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers