Debian: Apache and Perl (CGI)

Discussion in 'Computer Science & Culture' started by Stryder, Mar 2, 2002.

Thread Status:
Not open for further replies.
  1. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    I've been messing around with a server for a while, at present it's just kicking out some normal HTML pages, but I've been trying to configure the sucker to run CGI.

    I did have it running at one point, but that was before I started trying to get MySQL and PHP to work also, when I did that everything went Pear-shaped.

    Now I'm getting 404 Errors when I try to access a Cgi file, I know it's possibly just the config files (Httpd.conf/srm.conf/access.conf) not configured correctly, but there is also the possibility that I haven't loaded the correct PERL files.

    Is there anyone that has anything they can input on this problem (Since google searchs show nobody can seem to answer it)
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    Good news for my 800th Post...

    I managed to get my CGI up again and working after a few hours playing around with code. I tried loads of things but neglected to remember (because the log was deleted) something that could of saved me loads of time.

    First of all the problem was this:

    When I tried running a CGI program I would get an error in my log file for Apache.

    [Day Mon # ##:##:## YEAR] [error] [client *.*.*.*] script not found or unable to stat: /usr/home/~a/cgi-bin/test.cgi

    Another error that occured was, Failed to find file.

    I had previously had Apache working with CGI but I had been messing around and removed a few modules and eventually found that one such module was to recover my CGI usage.

    libapache-mod-auth-pam

    Yes, the problem was a mixture of my system not Authorising the files correctly and not indexing them, originally [PAM] had appeared many times in my my error.log

    This was for Apache/1.3.9 UNIX (Not Apache-Perl or Apache-ssl).

    Updated:
    I Forced this problem again, through a failed installation of PHP/MySQL.

    The result was simple, The programs I tried to load changed the way perl works with Apache.
    To put it fully right, I had to:

    Remove libapache-mod-auth-pam
    Re-Install libapache-mod-auth-pam

    Remove libapache-mod-perl
    Re-install libapache-mod-perl

    ###:/apacheconfig

    This then reconfigured the "Modules" in apache. I could have altered them myself, but it was best to allow the reloads of the modules I mentioned do that work for me.
     
    Last edited: Mar 7, 2002
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,105
    After a bit more toying about, I came up with a few:

    500 Internal Server Error's

    At first it foxed me as I'd Chown and Chgrp's all files to that of the user assigned to webpages under apache (Although SuEXEC should of been able to account for any user aslong as it wasn't Root)

    It occured to me it was due to my CGI scripts being written/housed on a windows system and when they were moved across in FTP, it selected BINARY.

    The fix was to shift the files across again but in ASCII.

    (Quite simply the windows system remembers returns, that when shifted in BINARY malform scripts, so sending it across in ASCII releaved that problem)

    The CGI files now work

    Please Register or Log in to view the hidden image!

     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
Thread Status:
Not open for further replies.

Share This Page