Apache newbie needs help with PHP

From: Web Surfer (raisin_at_delete-this-trash.mts.net)
Date: 05/31/04

  • Next message: DaveDiego: "Re: automatic emailing script (not spam)"
    Date: Sun, 30 May 2004 17:09:15 -0500
    
    

    [This followup was posted to linux.redhat]

    My system is Linux Redhat 9 (2.4.20-8)

    My system has the Apache HTTP server installed. It runs fine for simple
    web pages and CGI scripts.

    I am having problems getting Apache to run PHP scripts.
    Under my Apache distribution there is a conf.d directory with a php.conf
    file. Shouldn't Apache notice this file when it starts and "enable" the
    processing of PHP scripts?

    The FORM tag in my HTML page which references the PHP script looks like
    this :

    <FORM METHOD="POST" ACTION="/cgi-bin/php1.php">

    Whenever I click on the form's submit button I get the following error
    message :

    Premature end of script headers: php1.php

    However when I run php1.php from the command line (using the php
    command) it runs as expected.

    This is my sample php script which I found on the web.

    <script language="php">
    phpinfo();
    </script>

    Any help would be appreciated.


  • Next message: DaveDiego: "Re: automatic emailing script (not spam)"