php and apache2 errors

From: Glenn Davy (gdavy_at_tpg.com.au)
Date: 05/31/05

  • Next message: Jonathan Kaye: "Re: already solved"
    To: debian-user@lists.debian.org
    Date: Tue, 31 May 2005 17:04:17 +1000
    
    

    Could someone tell me where I've gone wrong - I'm clearly missing
    something. This is a setup which had been working for quite a while, but
    its been weeks since I've used it, and Im not sure whats changed. Im
    running debian unstable, with apache2 (prefork) and libapache2-mod-php4

    When I try browse to a php file served by my apache2 setup I get error
    500, with the message "Premature end of script headers:
    phpinfo.php" (where phpinfo.php is the script with the content
    <?phpinfo.php?>).

    /var/log/apache2/error.log tells me the user is not allowed to run
    scripts.

    If it try it from /home/*/public_html - same error, but in log file the
    message is that "script is not in document root"

    As far as I can tell from the apache2 documentations is that the error
    "Premature end of script headers" relates to cgi - afaik, using mod_php4
    is _not_ using cgi - correct? There are AddType Application clauses for
    php, but no php clause agains and AddHandler directives.

    AFAIK all the permissions on directories are ok - I can su to www-data
    and go to any script thats giving me grief and execute it with the
    command line php <scriptname> with no problem, so I guess its in my
    apache2 configuration.

    Im going out of my mind with this - I don't think its actally a prob
    with the default debian config as after googling for a while I seem to
    be be only one in this same scenario - any ideas, anyone?

    thanks
    Glenn

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Jonathan Kaye: "Re: already solved"

    Relevant Pages

    • Re: php and apache2 errors
      ... who owns your script to be executed? ... > When I try browse to a php file served by my apache2 setup I get error ... > and go to any script thats giving me grief and execute it with the ...
      (Debian-User)
    • Re: Web server structure?
      ... It is how the webserver is setup, PHP is not execute per se, but a script that is server processed. ... If the server is setup properly then you should only see the processed results, not the source script. ...
      (alt.html)
    • Sessions
      ... Please can someone provide a nice simple script to test if my php is setup ... properly for sessions. ...
      (comp.lang.php)
    • Re: Sessions
      ... > Please can someone provide a nice simple script to test if my php is setup ... > properly for sessions. ...
      (comp.lang.php)
    • Re: [PHP] PHP console script vs C/C++/C#
      ... My script is taking a longer time to execute than I want. ... I prefer to write in PHP because that is what I know best. ... This is why I am thinking about rewriting my whole script in a C language. ... Perhaps there are different methods I could be using to speed up execution. ...
      (php.general)