Re: can php parse .cgi files in cgi-bin - php module

From: Paul Barfoot (Paul_at_theglobalfamily.fsworld.co.uk)
Date: 10/05/04

  • Next message: nipepsi: "Re: sending html email using php script"
    Date: Tue, 5 Oct 2004 10:24:27 +0100
    
    

    Hi

    I just tried this out as I can see that it might be useful.

    In my Apache httpd.conf file I have the following line:

    AddType application/x-httpd-php .php

    If I put this one beneath it and then rename a .php file to .cgi then it is
    processed as if it was .php:

    AddType application/x-httpd-php .cgi

    As long as your cgi-bin is beneath your doc_root as specified in your
    php.ini everything should work. I think!

    -- 
    Paul Barfoot
    "Blake" <blake@shopwhatcom.com> wrote in message 
    news:adb08a4b.0410041802.6eec94d@posting.google.com...
    >I DO NOT need cgi or my cgi-bin, however due to some indexed .cgi
    > files in the cgi-bin indexed on a search engine.
    >
    > My question: Can I build a PHP file, name it something.cgi, place it
    > in a directory named cgi-bin and have the Apache/PHP/Module process
    > the file just as it does .php and .php4 files?
    >
    > I know how to tell the module to process various extensions, can i
    > specify .cgi or .pl and would this be a problem? How can I make the
    > cgi-bin directory just like any other directory in my /www folder?
    >
    > Thanks for all your help! 
    

  • Next message: nipepsi: "Re: sending html email using php script"

    Relevant Pages

    • Re: Run PHP as CGI?
      ... You have to put your php CGI file in a special directory that have execute ... permission (eg. cgi-bin). ... > I'm having trouble getting my PHP scripts to run. ...
      (comp.lang.php)
    • Re: Problem with PHP enviromental variables
      ... > I have tried setting up php as an Apache Modlue. ... >> Run PHP as an Apache module, not as CGI? ... AddType application/x-httpd-php .php ...
      (comp.lang.php)
    • Re: What websites use Lisp?
      ... languages, frameworks, and libraries are used by various websites. ... languages for their CGI applications, my personal answer is that I ... In the future I plan to switch to PHP for the ... different alias to that script for each user online at a given ...
      (comp.lang.lisp)
    • Re: Apache: limiting the execution place
      ... They want it so users can't use FTP, shell, or a CGI or PHP script to view, ... other users via shell, FTP, web server processes (such as PHP or CGI ...
      (Security-Basics)
    • Re: Most productive web development frameworks
      ... If you don't like PHP, try CGI, in any language ... > how well PHP or CGI scales in a HA clustered environment. ... > I am really interested in peoples experience with different frameworks, ...
      (comp.programming)