Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: PHP and CGI

  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP and CGI

    Hello,

    I am working on a simple CMS that will be placed in the cgi-bin directory. I am running into issues; the script doesn't work, etc. I have done some searching around the web and plenty of places are saying that php can be executed within the cgi-bin directory, but I am having trouble figuring out how to make it work. I have seen plenty of messages about a cgi-php.ini and php.cgi...

    Can somebody help me out?

    I am writing this into a pre-existing form registration system that allows people to view certain content. I would like to add in a simple cms that will allow the admins to create a heading, simple description paragraph and upload a PDF file into a folder and place the link. Very simple, but it doesn't work in the cgi-bin. It seems to reference a start.cgi and a htmlos.cgi file...

    Thanks

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    You can run PHP scripts in your main directory or any "other" directory.

    The "cgi-bin" has usually been associated with the Perl programming language ...
    that's where you're hearing about that. People call it "CGI", but they actually
    mean Perl. CGI (common gateway interface) is not a programming language.

    So, although Perl is a tremendous (and powerful) programming language, more
    people are using PHP for the simple reason that it can be run in any of the other
    directories, is easier to learn than Perl, works well with MySQL, and has a ton of
    online support ... for those willing to learn it themselves.

    Maybe you can elaborate on why your PHP script has to run in the "cgi-bin" directory.
    Or, perhaps you didn't try any PHP test scripts in your other directories?

    I would say, leave the "cgi-bin" directory alone, unless you're working
    with Perl scripting ... and maybe that's what is causing your confusion?


    .

  • #3
    New Coder
    Join Date
    Aug 2007
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    here is my reply

    Thanks for your help.

    I know all that you have said.

    The reason why I was planning on using php within the cgi folder is that my clients already have a login/authetication scripting installed, plus there is a encryption script that turns the address into numbers based on sessions, so that it bcomes semi-secure. I figured I can just add a simple php cms within this as an added feature.

    Oh well. Off to building a whole new solution.

    M


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •