The reason Daniel isn't spelling it out for you in black and white is
because he wants you to learn.  Copy-pasting what someone tells you
teaches you nothing.  :-)

Secondly, the syntaxes you're being given and are using are flat
out wrong.  You need to pay more attention to what you're doing
and read some documentation (Apache and suPHP both).

For every handler-name entry in the [handlers] section of suphp.conf,
you need to tell the mod_suphp Apache module what handler-name to
associate itself with (so PHP will interpret the data).  You also have
to tell Apache what file extension to map to what handler-name.

For example, this would spawn the php5-cgi binary interpreter via
suPHP when Apache sees requests for a .php5 extension:

suphp.conf:
[handlers]
i-like-rice=php:/usr/bin/php5-cgi

httpd.conf:
suPHP_Engine on
AddHandler i-like-rice .php5
suPHP_AddHandler i-like-rice

Now, STOP RIGHT HERE and read those lines VERY CAREFULLY.  Notice how
many parameters suPHP_AddHandler is being given, and where the file
extension is being defined.  Just slow down and read them over a few
times.

I also urge people to use actual MIME types in their suphp.conf and
httpd.conf, as AddHandler falls under mod_mime, and that makes me often
wonder if you need a real MIME type and not just a string...

suphp.conf:
[handlers]
application/x-httpd-php=php:/usr/bin/php5-cgi

httpd.conf:
suPHP_Engine on
AddType application/x-httpd-php .php
suPHP_AddHandler application/x-httpd-php

Finally, this is not a "Linux" thing.  You're working with two specific
pieces of software: suPHP and Apache.  Neither of these are Linux, as
they both can run on BSD, Solaris, IRIX, or even Windows.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

On Thu, Oct 02, 2008 at 04:33:51PM +0100, [EMAIL PROTECTED] wrote:
> Sorry for being a bit thick but I'm fairly new to the world of Linux are you 
> suggesting adding the following line to suphp.conf:
> 
>    php5-script=php:/usr/bin/php5-cgi
> 
> If this is correct then It still fails to resolve the problem.
> 
> Kind regards, j.
> 
> -----Original Message-----
> From: Daniel Llewellyn [mailto:[EMAIL PROTECTED] 
> Sent: 02 October 2008 15:45
> To: [EMAIL PROTECTED]
> Cc: suphp@lists.marsching.biz
> Subject: Re: [suPHP] Problem installing and configuring suPHP on Debian 4.0 
> Etch
> 
> > suphp.conf:
> >> [handlers]
> >> ;Handler for php-scripts
> >> x-httpd-php=php:/usr/bin/php5-cgi
> 
> check this line
> 
> >
> > hosts.conf:
> >> AddHandler php5-script .php
> >> AddHandler x-httpd-php .php5
> >> suPHP_AddHandler php5-script .php
> 
> and these three lines
> 
> > .php5 files won't execute with suPHP (hasn't been told to execute
> > them, but does know what to execute them with)
> > .php files won't execute with suPHP (has been told to execute them,
> > but doesn't know what to execute them with)
> 
> these two statements should help with your diagnosis.. suphp knows
> what to do with x-httpd-php, but not php5-script
> 
> -- 
> Regards,
>     The Honeymonster aka Daniel Llewellyn
> 
> 
> 
> _______________________________________________
> suPHP mailing list
> suPHP@lists.marsching.biz
> http://lists.marsching.com/mailman/listinfo/suphp

_______________________________________________
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp

Reply via email to