Re: does the phpinfo() command ever lie?

From: lawrence (lkrubner_at_geocities.com)
Date: 08/03/04


Date: 3 Aug 2004 10:05:47 -0700

gordonb.uzga5@burditt.org (Gordon Burditt) wrote in message news:<cen9qj$c0s@library1.airnews.net>...
> >I wanted to use the AddType directive in an .htaccess file. So I used
> >phpinfo() to get the path info for PHP.
>
> If you are using PHP as an Apache module, there may not BE
> any executable named php, nor is one necessary.
>
> >I found this line:
> >
> >PATH /bin:/usr/bin
>
> This is a list of directory names separated by colons. It is NOT
> a single directory name. It is set from the environment of whatever
> started Apache. PHP doesn't set it, it just reports it.
>
> >
> >So I tried this, but it did not work:
> >
> >AddType application/x-php .htm Action application/x-php
> >/bin:/usr/bin/php
> >AddType application/x-php .html Action application/x-php
> >/bin:/usr/bin/php
>
> With PHP as an Apache module, leave out the Action
> stuff, it's not necessary. In my setup, the MIME type
> for the module is application/x-httpd-php.
>
> >Does it go by another name? Why isn't it where PATH said it would be?
>
> PATH is the system startup routines telling Apache where to find
> executables. Not modules. And if you really intend to use PHP as
> a CGI, PATH doesn't indicate where you installed it or if you forgot
> to build it (I don't think the default configuration builds both the
> module AND the CGI).

I don't know if this is a PHP or an Apache question, but how can I
tell if I'm dealing with an Apache module or the CGI version? I looked
in cgi-bin and there was nothing there, can I conclude from that that
I'm dealing with an Apache module version of PHP?



Relevant Pages

  • Re: ftp extensions
    ... Turns out I have both Apache module and CGI versions of php on my server. ... The CGI version hadn't got ftp installed so, of course it didn't work whereas the Apache module did. ...
    (alt.php)
  • Re: Php5 port and Apache Module
    ... possible to install php5 from the packages .. ... in any way of justifying removing the apache module from the default setting ... people installing php do so for use as an apache module. ...
    (freebsd-questions)
  • RE: PHP Problem
    ... > You installed the CGI port.. ... You need to install the apache module. ... PHP as CGI and PHP as Module have very minor differences, ...
    (freebsd-questions)
  • Re: PHP is looking for php.ini file in c:windows
    ... I'm not using the CGI ... SetEnv in httpd.conf won't have any effect on PHP as an Apache module, ... SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI. ...
    (comp.lang.php)
  • Re: Extension files not loading
    ... If an Apache module doesn't use those files it is not necessary to load ... the newsgroup - and it's way too long for a newsgroup, ... You want to use more than one PHP version? ... along with PHP and they both have LibMySQL.dll in distro. ...
    (comp.lang.php)