I've search the Forum, but I didn't find an answer. Sorry if this seem repetitive.
I'll try and keep it well doc. and simple

ERROR🙁Ver. PHP4)
Premature end of script headers c:\php\php.exe

My Config: (Apache 1.3.14 http.conf)

ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4-source .phps
Action application/x-httpd-php4 "/php/php.exe"

[sidebar: its okay that the lines are right after another in the httpd file right? Under the ScriptAlias Line for /cgi-bin/??]

I know its late, and I'm really tired.
Its driving me nuts!! (Damn Windows 🙂

Your help is greatly appreciated! Thanks
in advance!

    Sorry, heres the code for the PHP file
    in case that helps. There are no hard
    returns or spaces before the <?

    <?
    phpinfo();
    ?>

    I'm just testing it out.

      Try putting it in HTML, eg:

      <body>
      <?php
      phpinfo();
      ?>
      </body>

      Let me know if that works. Dave

      ======================================================
      http://badblue.com

      Small, easy installing web servers for PHP and Windows

        When I looked at the message, some of the markup was missing. Pretend the square brackets are angle brackets. Somehow they're getting destroyed when I post a message.

        [body]
        [?php
          phpinfo();
         ?]
        [/body]

        Dave

        ======================================================
        http://badblue.com

        Small, easy installing web servers for PHP and Windows

          I tried it with the HTML tags, and that didn't work either. I check the logs,
          and its the same errors. Hmmm.
          The file name is: test.php and its
          in the ../htdocs/ directory (under apache)

            a month later

            i had this exact same problem
            all i needed to do is put the .php files into the document root of my apache server.

            As opposed to the /php directory c:\php

            cheers, hope this helps

              2 months later

              Hi,

              well i had the same problem.
              I commented the lines you me mentioned somewhere which should configure Apache to run .php files and used these lines:

              LoadModule php4_module c:/php/sapi/php4apache.dll

              AddType application/x-httpd-php .php .phtml

              Just add them somewhere near line 206 in the httpd.conf file.
              After this everything worked fine for me.

              Ruben

                Write a Reply...