On Wed, Aug 22, 2007 at 03:38:31PM +0100, Jason Bhalla-Gaunt wrote:
> I literally added those 4 (well, 5 including the comment) lines to the conf 
> and it didn't work, still the same presenting it as a download result.

The relevant configuration lines you provided here were:

>>> AddType application/x-httpd-php .php
>>> AddType application/x-httpd-php-source .phps

Compare this to:

>> AddType application/x-httpd-php .php
>> AddHandler x-httpd-php .php

Do you see the difference?  Notice the missing AddHandler.  Without
this, suphp isn't going to get called.

The AddType just adds the appropriate MIME type for PHP documents; this,
would cause some browsers to offer the PHP script as a download, since
no actual parser is being executed on it prior.

An incorrect AddType (e.g. removing "application/", which I'm sure you
did because there's a bazillion websites on Google which talk about how
"this worked great for me", despite the administrator having no idea
what they're doing, nor had they looked in mime.types to see what the
proper syntax was) would cause the browser to default to render as
text/plain, e.g. the PHP script would simply display in the browser.

Sorry if I sound bitter or rude, but this is a common thread here, and
most of the time it ends in the same way -- someone's server having
"mysterious" configurations that the admin overlooked day after day,
lots of hand-holding, and then becoming reliant on websites written by
random Internet jhonkas running Apache.  :-)

What I'm trying to say is: it really helps if you slow down and learn
what it is you're working with / learn what it is you're doing, rather
than just pounding keys, making it work, and thinking it's magical.

-- 
| 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 |


_______________________________________________
suPHP mailing list
[email protected]
http://lists.marsching.biz/mailman/listinfo/suphp

Reply via email to