beginners Q: configuring apache - php on XP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • P.Hill

    beginners Q: configuring apache - php on XP

    I was just trying to install Apache and php on an XP box for test of a PHP
    website I built last year. It was my first and only, so I am now rusty about
    the little I did learn last year.

    I get the following error in my log after I think I have I configured apache and php

    "[Thu Apr 29 15:31:19 2004] [alert] [client 127.0.0.1]
    C:/Websites/matrixcsbsju/html.test/matrix.htaccess : Invalid command 'php_value',
    perhaps mis-spelled or defined by a module not included in the server configuration"

    I am running:
    PHP 4.1.2
    Apache 2.0.47

    The apache
    conf/httpd.conf contains the follow extra bits:


    # My local copy of bunch of files that make up the site.
    DocumentRoot "C:/Websites/matrixcsbsju/html.test"
    [...]

    # left over from a previous configuration of this site, but we are still
    # using this name, so I'll keep it for now.
    AccessFileName matrix.htaccess

    [...]
    # A directory element for my little website
    <Directory "C:/Websites/matrixcsbsju/html.test">
    [...]
    AllowOverride All
    [...]
    #
    DirectoryIndex index.html index.html.var index.php index.htm
    [...]
    # And directing all php to the php module
    ScriptAlias /php/ "C:/dev/tools/php/"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .htm
    AddType application/x-httpd-php .html
    Action application/x-httpd-php "/php/php.exe"

    Is there anything else? It seems to be saying it doesn't know about
    php in the error message?
    Can anyone help? Let's talk.

    TIA,
    -Paul

  • Daniel Tryba

    #2
    Re: beginners Q: configuring apache - php on XP

    P.Hill <goodhill@xmiss ion.com> wrote:[color=blue]
    > I get the following error in my log after I think I have I configured apache and php
    >
    > "[Thu Apr 29 15:31:19 2004] [alert] [client 127.0.0.1]
    > C:/Websites/matrixcsbsju/html.test/matrix.htaccess : Invalid command 'php_value',
    > perhaps mis-spelled or defined by a module not included in the server configuration"[/color]
    [snip][color=blue]
    > Action application/x-httpd-php "/php/php.exe"[/color]
    [color=blue]
    > Is there anything else? It seems to be saying it doesn't know about
    > php in the error message?[/color]

    You forgot the most important bit, whats in the file that is generating
    the error!
    [color=blue]
    > Can anyone help? Let's talk.[/color]

    Learn to help yourself. You should have taken a look at the PHP
    reference and should have spotten the (runtime) configuration section...
    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

    <q>
    When using PHP as an Apache module, you can also change the
    configuration settings using directives in Apache configuration files
    (e.g. httpd.conf) and .htaccess files (You will need "AllowOverr ide
    Options" or "AllowOverr ide All" privileges)
    </q>

    Guess what, you are not running PHP as a module! So no htaccess stuff
    for you :)

    But maybe the windows registry section can be of some help to you.

    --

    Daniel Tryba

    Comment

    • P.Hill

      #3
      Re: beginners Q: configuring apache - php on XP

      Daniel Tryba wrote:
      [color=blue][color=green]
      >>[...]Invalid command 'php_value',[/color]
      >[...]
      > You forgot the most important bit, whats in the file that is generating
      > the error![/color]

      Well, I thought it was pretty obvious from the error message that the offending
      line was a 'php_value' declaration.
      [color=blue]
      > Learn to help yourself. You should have taken a look at the PHP
      > reference and should have spotten the (runtime) configuration section...[/color]

      Thanks for the reference, I will definitely look into it more, yet the quote you
      give only says it is possible to do such things using the "AllowOverr ide All".
      Obviously I thought that was the case otherwise I wouldn't have been trying it,
      nor would I have shown where I had thought I had done that in my ini file.
      [color=blue]
      > Guess what, you are not running PHP as a module! So no htaccess stuff
      > for you :)[/color]

      Thanks for this. This is the most useful fact. Now I see the
      beginners error. I did configure my PHP, but I did the wrong type of
      configuration. Oops.
      [color=blue]
      > But maybe the windows registry section can be of some help to you.[/color]

      I think the right information I need is:
      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

      which comes down to getting the DLLs in place and defining a LoadModule
      instead of an Action.

      thanks for the comments,
      -Paul

      Comment

      Working...