You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joseph A Nagy Jr <jo...@charter.net> on 2003/09/16 04:29:21 UTC
[users@httpd] PHP Problems
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm not sure if this is a PHP implementation problem, or an Apache
Problem.
I am running Apache 2.0.40 with mod_php intalled and loaded, yet when I
go here:
http://jan-jr-ent.homelinux.org/php/
It displays as plain text. I also have
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
in the vhost config for site.
What's going on? Here is the relevant entries from my access log:
192.168.1.1 - - [15/Sep/2003:21:23:40 -0500] "GET /php/ HTTP/1.1" 200
5155 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1
.5b) Gecko/20030827"
There is no entry in my error log.
Idea's?
- --
Wielder of the mighty +1 LARTsaber of Unsubscribe Instructions At End of
Message, the +3 Clue-by-Four of No Attachments to a Mailing List, and
the -4 Shield of No Spell Checker.
http://joseph-a-nagy-jr.homelinux.org http://mc-luug.homelinux.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/ZnWBnjt9jEvKYeARApJ2AJ9QgxGvl7nuL/un2JjcA42WebvAbQCgj9w5
Gk9ezbrgZdbF6C14yNY2xBs=
=Ka6C
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Tim Thorburn <im...@nwconx.net>.
Thanks Robert, after looking again, PHP is in fact compiled as CGI which
would explain why it will not work for me
Thanks again!
-Tim
At 12:39 AM 9/18/2003, you wrote:
>[you should start a new thread when changing topic]
>
>Tim Thorburn wrote:
> > php_value include_path ".:/path/to/web/"
> >
> > This has worked with Apache on Linux (Red Hat specifically), Solaris, and
> > even Windows - yet when I try this same command on a FreeBSD system, the
> > result is all pages for that site give an error 500.
>
>Is it running PHP as a module or CGI? You can not have PHP directives in
>Apache's configuration unless it is as module. Most shared hosting providers
>will not run PHP as a module for security reasons.
>
>If that is the case, you'll have to do it in the script themselves, by:
>
> ini_set('include_path', '.:/path/to/web");
>
>Otherwise (or likewise) you need to look at the error log, to see why the
>500 is generated.
>
>Regards,
>Robert Andersson
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
[you should start a new thread when changing topic]
Tim Thorburn wrote:
> php_value include_path ".:/path/to/web/"
>
> This has worked with Apache on Linux (Red Hat specifically), Solaris, and
> even Windows - yet when I try this same command on a FreeBSD system, the
> result is all pages for that site give an error 500.
Is it running PHP as a module or CGI? You can not have PHP directives in
Apache's configuration unless it is as module. Most shared hosting providers
will not run PHP as a module for security reasons.
If that is the case, you'll have to do it in the script themselves, by:
ini_set('include_path', '.:/path/to/web");
Otherwise (or likewise) you need to look at the error log, to see why the
500 is generated.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Tim Thorburn <im...@nwconx.net>.
Since we're on the topic of Apache and PHP - I've got something of a
confusing problem that maybe some people could shed some light on for me.
I usually like to change the default include directory of PHP to my
websites root document - just makes it easier I find. To do this, I make a
.htaccess file, but it in the sites root with the following command:
php_value include_path ".:/path/to/web/"
This has worked with Apache on Linux (Red Hat specifically), Solaris, and
even Windows - yet when I try this same command on a FreeBSD system, the
result is all pages for that site give an error 500.
So far all my hosting has been with shared hosting providers, and I've
contacted tech support who tell me they do in fact allow for .htaccess but
since they do not specify a default include directory for PHP, they cannot
provide me with any answers.
Currently the host in question is a Verio clone running FreeBSD 4.4-RELEASE
#2 with PHP 4.3.2 and Apache 1.3.27 with RapidSite.
Has anyone had any luck in the past of changing this setting through Apache
on such a system?
TIA,
-Tim
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Joseph A Nagy Jr wrote:
> > ? Are you editing the correct httpd.conf? Does the server's signature
>
> The only one.
>
> > show that PHP is loaded? No interesting lines in the error log on
>
> ServerToken is set to OS only (check out
> http://jan-jr-ent.homelinux.org/images/, scroll to bottom).
"Apache/2.0.40 Server at jan-jr-ent.homelinux.org Port 80"
That is a pretty old version, you should probably upgrade. Also note, that
newer versions of PHP is not compatible with versions prior to 2.0.42. What
version of PHP do you have?
If PHP is loaded, it should be included in the server signature unless you
tampered with something.
The only suggestion I can offer is to start afresh with installing Apache
2.0.47 and PHP 4.3.3, following their documentation.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Joseph A Nagy Jr <jo...@charter.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 17 September 2003 09:10, Robert Andersson wrote this in an
attempt to be witty or informative:
> Joseph A Nagy Jr wrote:
> > Okay, I will comment out php.conf and read the manual. I was just
> > thinking that it was an Apache problem and not a PHP problem.
>
> It's a problem with configuring Apache for PHP, so the discussion is
> justified.
Okay.
>
> Although I have no experience with using input/output filter for
> mod_php4, your config looks reasonable. Have you restarted Apache ;-)
Everytime I save changes to the config file (I work with two Konsole
sessions).
> ? Are you editing the correct httpd.conf? Does the server's signature
The only one.
> show that PHP is loaded? No interesting lines in the error log on
ServerToken is set to OS only (check out
http://jan-jr-ent.homelinux.org/images/, scroll to bottom).
> startup?
No errors at all wrt to mod_php (just a lot of script kiddies trying to
h4x0r my site with IIS exploits).
>
> First and formost, PHP must be loaded. Then it must learn to handle
> documents.
PHP is loaded, of that I'm sure.
>
> Regards,
> Robert Andersson
- --
Wielder of the mighty +1 LARTsaber of Unsubscribe Instructions At End of
Message, the +3 Clue-by-Four of No Attachments to a Mailing List, and
the -4 Shield of No Spell Checker.
http://joseph-a-nagy-jr.homelinux.org http://mc-luug.homelinux.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/aJwEnjt9jEvKYeARAtwqAJ9Oyp3MI6FYBb8qXweiHycxxMa9ZQCgnhJL
nDFawWx4Dj5gS6dBIowdlFo=
=T3R2
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Joseph A Nagy Jr wrote:
> Okay, I will comment out php.conf and read the manual. I was just
> thinking that it was an Apache problem and not a PHP problem.
It's a problem with configuring Apache for PHP, so the discussion is
justified.
Although I have no experience with using input/output filter for mod_php4,
your config looks reasonable. Have you restarted Apache ;-) ? Are you
editing the correct httpd.conf? Does the server's signature show that PHP is
loaded? No interesting lines in the error log on startup?
First and formost, PHP must be loaded. Then it must learn to handle
documents.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Joseph A Nagy Jr <jo...@charter.net>.
On Wed, 17 Sep 2003 14:40:20 +0200
"Robert Andersson" <ro...@profundis.nu> wrote:
>Joseph A Nagy Jr wrote:
>> > In short, what to do:
>> >
>> > 1) "LoadModule php4_module pathto/mod_php4.so"
>>
>> Already loaded, as stated in the message to which you responded.
>>
>> >
>> > 2) "AddType application/x-httpd-php .php .phtml"
>>
>> Also added, convienant how you left out that part. Mozilla now tries
>>to
>> download index.php
>
>I am not familiar with your initial configuration (php.conf &
>filters),
From /etc/httpd/conf.d/php.conf (which is included via Includes
/etc/httpd/conf.d/*.conf in /etc/httpd/conf/httpd.conf)
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
>which is why the above suggested that you start over by removing
>everything
>PHP related, and follow the instructions in the PHP manual.
Okay, I will comment out php.conf and read the manual. I was just
thinking that it was an Apache problem and not a PHP problem.
>
>If it still does not work, please explain your relevant configuration
>in
>detail. Otherwise, I nor anyone else know, or cannot be sure of, in
>which
>context it fails.
Okay, and sorry for getting snippity.
>
>
>Regards,
>Robert Andersson
--
Viva la Penguin!
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Joseph A Nagy Jr wrote:
> > In short, what to do:
> >
> > 1) "LoadModule php4_module pathto/mod_php4.so"
>
> Already loaded, as stated in the message to which you responded.
>
> >
> > 2) "AddType application/x-httpd-php .php .phtml"
>
> Also added, convienant how you left out that part. Mozilla now tries to
> download index.php
I am not familiar with your initial configuration (php.conf & filters),
which is why the above suggested that you start over by removing everything
PHP related, and follow the instructions in the PHP manual.
If it still does not work, please explain your relevant configuration in
detail. Otherwise, I nor anyone else know, or cannot be sure of, in which
context it fails.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Joseph A Nagy Jr <jo...@charter.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 16 September 2003 23:13, Robert Andersson wrote this in an
attempt to be witty or informative:
> Joseph A Nagy Jr wrote:
> > > I may be out of touch here, but PHP as input filter??? [...]
> >
> > That was from /etc/httpd/conf.d/php.conf which was installed by
> > mod_php
>
> Ok, although I still cannot understand what PHP would do as input
> filter. AFAIK, input filters are used to filter the incoming request,
> and as mod_php cannot determine whether its actions (whatever that
> is) apply to the resource in this stage, why it does it beats me. Oh
> well...
>
> > I also have regular PHP installed but haven't a clue on how to use
> > it. I was hoping I could use mod_php like one can use mod_perl.
>
> Just LoadModule it, and use the AddType; and it should be it.
>
> > Yes, the file is index.php.
>
> If you access it as http://yourhost/php/index.php, does it work?
>
> If not, try to go back to the basics. Skim PHP's installation
> instructions for Apache (2):
> http://www.php.net/manual/en/install.apache2.php
>
> In short, what to do:
>
> 1) "LoadModule php4_module pathto/mod_php4.so"
Already loaded, as stated in the message to which you responded.
>
> 2) "AddType application/x-httpd-php .php .phtml"
Also added, convienant how you left out that part. Mozilla now tries to
download index.php
<snip>
- --
Wielder of the mighty +1 LARTsaber of Unsubscribe Instructions At End of
Message, the +3 Clue-by-Four of No Attachments to a Mailing List, and
the -4 Shield of No Spell Checker.
http://joseph-a-nagy-jr.homelinux.org http://mc-luug.homelinux.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/aFMGnjt9jEvKYeARAoMuAJ4zC2pLN0iZ4YtrNj685SLE07GECwCeN/3d
qHpISPJCDnM1lyjXEB6ufDI=
=4ZFe
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Zac Stevens wrote:
> It is perhaps reasonable to wonder why the request body is not available
in
> later stages of request handling.
It is, I think, for normal handlers in the request_rec structure. I have
just skimmed through docs on filters so I'm not 100% sure, but it seems that
that structure isn't available to either input or output filters. Which
makes sense, since conceptually a filter shouldn't care about such things.
Is there any purpose of using PHP as a filter, besides being able to "chain"
it before/after SSI etc?
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Zac Stevens <zt...@cryptocracy.com>.
On Wed, Sep 17, 2003 at 07:01:58AM +0200, Robert Andersson wrote:
> the output filter then can use. If so, I doubt that the output filter can
> see the request headers either. Something like that.
That's correct, the output filter will see the response headers. However,
most (if not all) of the request header values are made available in the
output phase via environment variables so it's not a problem in practice.
It is perhaps reasonable to wonder why the request body is not available in
later stages of request handling. Minimising memory usage springs to mind
as a likely answer, but I'm just speculating...
Cheers,
Zac
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Zac Stevens wrote:
> PHP only needs to be run as an input filter if you wish to use it to
handle
> POST and PUT requests (among others). The reason for this is that those
> methods include data in the body of the request; not just the headers, as
> is the case for the GET method.
>
> The difference between input and output filters is the data they work on;
> input filters get the request, while output filters see the response.
> Both will see headers, but only the input filter will see the request
> *body*.
Uhm, on further thought this is probably it. Normal modules do have access
to the request body, but it makes sense that output filters doesn't, so
there must be a corresponding input filter to catch the request body which
the output filter then can use. If so, I doubt that the output filter can
see the request headers either. Something like that.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Robert,
On Wed, Sep 17, 2003 at 06:13:47AM +0200, Robert Andersson wrote:
> Ok, although I still cannot understand what PHP would do as input filter.
> AFAIK, input filters are used to filter the incoming request, and as mod_php
> cannot determine whether its actions (whatever that is) apply to the
> resource in this stage, why it does it beats me. Oh well...
PHP only needs to be run as an input filter if you wish to use it to handle
POST and PUT requests (among others). The reason for this is that those
methods include data in the body of the request; not just the headers, as
is the case for the GET method.
The difference between input and output filters is the data they work on;
input filters get the request, while output filters see the response.
Both will see headers, but only the input filter will see the request
*body*.
Now I'm not at all familiar with the code, but I assume that when PHP is
called on the input chain, all it does is pick the data out of the request.
Then, PHP is called again on the output chain with a response body to
parse. The data picked up on the input chain is still available at this
point.
My knowledge of all this is relatively high level, so if someone familiar
with the code can correct me it would be most welcome.
Cheers,
Zac
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Joseph A Nagy Jr wrote:
> > I may be out of touch here, but PHP as input filter??? [...]
>
> That was from /etc/httpd/conf.d/php.conf which was installed by mod_php
Ok, although I still cannot understand what PHP would do as input filter.
AFAIK, input filters are used to filter the incoming request, and as mod_php
cannot determine whether its actions (whatever that is) apply to the
resource in this stage, why it does it beats me. Oh well...
> I also have regular PHP installed but haven't a clue on how to use it. I
> was hoping I could use mod_php like one can use mod_perl.
Just LoadModule it, and use the AddType; and it should be it.
> Yes, the file is index.php.
If you access it as http://yourhost/php/index.php, does it work?
If not, try to go back to the basics. Skim PHP's installation instructions
for Apache (2): http://www.php.net/manual/en/install.apache2.php
In short, what to do:
1) "LoadModule php4_module pathto/mod_php4.so"
2) "AddType application/x-httpd-php .php .phtml"
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Joseph A Nagy Jr <jo...@charter.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 16 September 2003 04:09, Robert Andersson wrote this in an
attempt to be witty or informative:
> Joseph A Nagy Jr wrote:
<snip>
> > <Files *.php>
> > SetOutputFilter PHP
> > SetInputFilter PHP
> > LimitRequestBody 524288
> > </Files>
>
> I may be out of touch here, but PHP as input filter??? AFAIK PHP do
> not do this; at least, I cannot see the point. What are you trying to
> accomplish by using this, rather than the conventional AddType,
> setup? Have you read/follow the installation instructions bundled
> with PHP?
That was from /etc/httpd/conf.d/php.conf which was installed by mod_php
I also have regular PHP installed but haven't a clue on how to use it. I
was hoping I could use mod_php like one can use mod_perl.
>
> > 192.168.1.1 - - [15/Sep/2003:21:23:40 -0500] "GET /php/ HTTP/1.1"
> > 200 5155 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1
> > .5b) Gecko/20030827"
>
> Did you expect anything else here? I assume you have an index.php in
> that directory, which Apache apparently send as plain/text. This may
> be because your <Files> block may not match an indirect directory
> index file?
I'm not really sure what I expected, to be honest. Yes, the file is
index.php. That happens with or without the <Files> block. I also have
the file, /etc/httpd/conf.d/php.conf loaded in one of the directories
that are included. I had to comment out the LoadModule line though
because the PHP module was already loaded in the main httpd.conf file.
>
> I suggest you try this line instead:
>
> AddType application/x-httpd-php .php .phtml
Just tried that. My browser (Mozilla 1.5b) wants to download the page.
Go ahead and try http://jan-jr-ent.homelinux.org/php/ again.
- --
Wielder of the mighty +1 LARTsaber of Unsubscribe Instructions At End of
Message, the +3 Clue-by-Four of No Attachments to a Mailing List, and
the -4 Shield of No Spell Checker.
http://joseph-a-nagy-jr.homelinux.org http://mc-luug.homelinux.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/ZysJnjt9jEvKYeARAvBgAJ4qbPbXS/NiaMbzqeXSGgG4H3NiLgCgiGcH
lDM2DQp/vKZL0SbPb355214=
=2LhY
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by DvDmanDT <dv...@telia.com>.
Well, there are two versions of the Apache 2 PHP module... Filter and
something else... My guess would be that PHP takes it as input filter as
well to parse get, post and session data and so on... I would go with the
normal version though... (AddType version)
// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Tuesday, September 16, 2003 11:09 AM
Subject: Re: [users@httpd] PHP Problems
> Joseph A Nagy Jr wrote:
> > I am running Apache 2.0.40 with mod_php intalled and loaded, yet when I
> > go here:
> >
> > http://jan-jr-ent.homelinux.org/php/
> >
> > It displays as plain text. I also have
> >
> > <Files *.php>
> > SetOutputFilter PHP
> > SetInputFilter PHP
> > LimitRequestBody 524288
> > </Files>
>
>
> I may be out of touch here, but PHP as input filter??? AFAIK PHP do not do
> this; at least, I cannot see the point. What are you trying to accomplish
by
> using this, rather than the conventional AddType, setup? Have you
> read/follow the installation instructions bundled with PHP?
>
> > 192.168.1.1 - - [15/Sep/2003:21:23:40 -0500] "GET /php/ HTTP/1.1" 200
> > 5155 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1
> > .5b) Gecko/20030827"
>
> Did you expect anything else here? I assume you have an index.php in that
> directory, which Apache apparently send as plain/text. This may be because
> your <Files> block may not match an indirect directory index file?
>
> I suggest you try this line instead:
>
> AddType application/x-httpd-php .php .phtml
>
> Regards,
> Robert Andersson
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] PHP Problems
Posted by Robert Andersson <ro...@profundis.nu>.
Joseph A Nagy Jr wrote:
> I am running Apache 2.0.40 with mod_php intalled and loaded, yet when I
> go here:
>
> http://jan-jr-ent.homelinux.org/php/
>
> It displays as plain text. I also have
>
> <Files *.php>
> SetOutputFilter PHP
> SetInputFilter PHP
> LimitRequestBody 524288
> </Files>
I may be out of touch here, but PHP as input filter??? AFAIK PHP do not do
this; at least, I cannot see the point. What are you trying to accomplish by
using this, rather than the conventional AddType, setup? Have you
read/follow the installation instructions bundled with PHP?
> 192.168.1.1 - - [15/Sep/2003:21:23:40 -0500] "GET /php/ HTTP/1.1" 200
> 5155 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1
> .5b) Gecko/20030827"
Did you expect anything else here? I assume you have an index.php in that
directory, which Apache apparently send as plain/text. This may be because
your <Files> block may not match an indirect directory index file?
I suggest you try this line instead:
AddType application/x-httpd-php .php .phtml
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org