[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: php and apache2 errors



Hi Glenn

1. Check your php.ini if safe_mode is enabled (on)
2. If it is, who owns your script to be executed? It has to be the same
users as the one running apache.

I'm a little bit fuzzy about '<?phpinfo.php?>'? Not sure what you want
to do, but I would try '<?phpinfo()?>', this produces the PHP test/info
page.

regards
rafi
On Tue, 2005-05-31 at 17:04 +1000, Glenn Davy wrote:
> 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
> 
> 
-- 
  ,           , 
 /             \  Rafael Ostertag
((__-^^-,-^^-__)) Mellingerstrasse 99
 `-_---' `---_-'  CH-5400 Baden
  `--|o` 'o|--'   Switzerland
     \  `  /      Phone: +41 (0)56 222 5410
      ): :(       Mobile: +41 (0)79 257 0654
      :o_o:       ICQ# 225700135 
       "-"        http://www.guengel.ch

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html




Reply to: