PHP and CGI files not executed - Mandriva

This is a discussion on PHP and CGI files not executed - Mandriva ; I have installed Apache with a clean /var/www directory. Now PHP files and CGI files are no longer executed, and a link ending in .php instead of .html calls up the "What application do you want to use?" dialog. I ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: PHP and CGI files not executed

  1. PHP and CGI files not executed

    I have installed Apache with a clean /var/www directory. Now PHP files and
    CGI files are no longer executed, and a link ending in .php instead
    of .html calls up the "What application do you want to use?" dialog. I
    haven't fiddled with httpd.conf, which seems to include everything that it
    should. It all worked before I deleted the /var/www directory, which
    suggests a permission problem, but I have checked and reset those.

    Any ideas please?

    Doug.
    --
    If you want to make peace, you don't talk to your friends. You talk to your
    enemies.
    - Moshe Dayan.


  2. Re: PHP and CGI files not executed

    On 2007-07-26, Doug Laidlaw wrote:
    > I have installed Apache with a clean /var/www directory. Now PHP files and
    > CGI files are no longer executed, and a link ending in .php instead
    > of .html calls up the "What application do you want to use?" dialog. I
    > haven't fiddled with httpd.conf, which seems to include everything that it
    > should. It all worked before I deleted the /var/www directory, which
    > suggests a permission problem, but I have checked and reset those.


    Did you install apache-mod_php package ? Do the apache logs say anything
    interesting ?

    Nicolas


  3. Re: PHP and CGI files not executed

    nicolas vigier wrote:

    > On 2007-07-26, Doug Laidlaw wrote:
    >> I have installed Apache with a clean /var/www directory. Now PHP files
    >> and CGI files are no longer executed, and a link ending in .php instead
    >> of .html calls up the "What application do you want to use?" dialog. I
    >> haven't fiddled with httpd.conf, which seems to include everything that
    >> it
    >> should. It all worked before I deleted the /var/www directory, which
    >> suggests a permission problem, but I have checked and reset those.

    >
    > Did you install apache-mod_php package ? Do the apache logs say anything
    > interesting ?
    >
    > Nicolas


    Yes, I have apache-mod_php installed. I copied the directory across to a
    PCLinuxOS installation, and PHP works there (but not cgi,) but I can't see
    any different packages installed.

    Running http://localhost/cgi-bin/test.cgi works, so the problem there has to
    be in the particular program. Running http://localhost/cgi-bin/pcal.cgi
    (the one I want) directly, instead of from a Web page, gives me Access
    Forbidden. (In the Web page it is http://localhost/cgi-bin/pcal.cgi action=get.)
    Both files are owned by user and group apache, and both have
    permissions 755.

    /var/log/httpd/error_log told me that I had to include cgi-bin in the path
    to test.cgi, but gives no output for php. access_log simply records the
    attempt.

    Doug.
    --
    The place for the knocker is outside the door.
    - W.G.P.


  4. Re: PHP and CGI files not executed

    Doug Laidlaw wrote:

    > nicolas vigier wrote:
    >
    >> On 2007-07-26, Doug Laidlaw wrote:
    >>> I have installed Apache with a clean /var/www directory. Now PHP files
    >>> and CGI files are no longer executed, and a link ending in .php instead
    >>> of .html calls up the "What application do you want to use?" dialog. I
    >>> haven't fiddled with httpd.conf, which seems to include everything that
    >>> it
    >>> should. It all worked before I deleted the /var/www directory, which
    >>> suggests a permission problem, but I have checked and reset those.

    >>
    >> Did you install apache-mod_php package ? Do the apache logs say anything
    >> interesting ?
    >>
    >> Nicolas

    >
    > Yes, I have apache-mod_php installed. I copied the directory across to a
    > PCLinuxOS installation, and PHP works there (but not cgi,) but I can't see
    > any different packages installed.
    >
    > Running http://localhost/cgi-bin/test.cgi works, so the problem there has
    > to
    > be in the particular program. Running http://localhost/cgi-bin/pcal.cgi
    > (the one I want) directly, instead of from a Web page, gives me Access
    > Forbidden. (In the Web page it is http://localhost/cgi-bin/pcal.cgi
    > action=get.) Both files are owned by user and group apache, and both have
    > permissions 755.
    >
    > /var/log/httpd/error_log told me that I had to include cgi-bin in the path
    > to test.cgi, but gives no output for php. access_log simply records the
    > attempt.
    >
    > Doug.


    I have the SAMS book on installing PHP, MySQL and Apache. It has PHP 5, and
    says that my httpd.conf should have a line:

    LoadModule php5_module modules/libphp5.so

    There is no such line. A case-insensitive search of httpd.conf for the
    string "php" gave an absolutely nil result. And I have no such file. The
    directory /etc/httpd/conf.d is empty. I do have mod_php5.so in
    /usr/lib/apache-extramodules.

    Doug.
    --
    Husbands are like the fire on the hearth - likely to go out if left
    unattended.
    - W.G.P.


  5. Re: PHP and CGI files not executed

    On 2007-07-27, Doug Laidlaw wrote:
    >> /var/log/httpd/error_log told me that I had to include cgi-bin in the path
    >> to test.cgi, but gives no output for php. access_log simply records the
    >> attempt.
    >>
    >> Doug.

    >
    > I have the SAMS book on installing PHP, MySQL and Apache. It has PHP 5, and
    > says that my httpd.conf should have a line:
    >
    > LoadModule php5_module modules/libphp5.so
    >
    > There is no such line. A case-insensitive search of httpd.conf for the
    > string "php" gave an absolutely nil result. And I have no such file. The
    > directory /etc/httpd/conf.d is empty. I do have mod_php5.so in
    > /usr/lib/apache-extramodules.


    You should have a file /etc/httpd/modules.d/70_mod_php.conf that has
    the LoadModule line.

    Nicolas


  6. Re: PHP and CGI files not executed

    Doug Laidlaw wrote:

    > I have the SAMS book on installing PHP, MySQL and Apache. *It has PHP 5,
    > and says that my httpd.conf should have a line:
    >
    > LoadModule php5_module * * * * *modules/libphp5.so
    >
    > There is no such line. *A case-insensitive search of httpd.conf for the
    > string "php" gave an absolutely nil result. *And I have no such file. *The
    > directory /etc/httpd/conf.d is empty. *I do have mod_php5.so in
    > /usr/lib/apache-extramodules.
    >
    > Doug.


    Thanks for your reply on this topic, which I saw on Google Groups. For some
    reason, new posts are often unavailable on my ISP's server over the w/e.

    I reinstalled Apache and PHP, including every package with either in its
    name and a few more besides. Basically, both now work, and the ongoing
    errors must be at the program level.

    Doug.
    --
    Success is getting what you want. Happiness is liking what you get.
    - Anonymous


+ Reply to Thread