httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sindhi Sindhi <sindhi....@gmail.com>
Subject Issue in using php5_module module.
Date Tue, 28 May 2013 14:38:57 GMT
Hello,

I'm trying to setup PHP module with 64-bit Apache 2.4.4, and also load a
C++ module to do the HTML filtering. As I understand the php module acts
like an interpreter and translates the php into HTML and then invokes the
HTML output filter.

Heres my setup -
1. I downloaded Apache from
http://www.apachelounge.com/download/win64/ -> httpd-2.4.4-win64.zip
which they have built using Visual Studio 2010

2. I downloaded PHP from
http://www.apachelounge.com/viewtopic.php?p=24538 ->
php-5.4.15-Win32-VC9-x64.zip

3. Changed httpd.conf file -
LoadModule php5_module "C:/PHP/php5apache2_4.dll"

LoadModule my_filter modules/MyFilter.dll
AddOutputFilterByType MyFilter text/html text/php

<IfModule dir_module>
    DirectoryIndex *.php index.html
</IfModule>

<IfModule mime_module>
AddType application/x-httpd-php .php
</IfModule>

4. Renamed php.ini-development to php.ini and made the below changes-
short_open_tag = On
session.save_path = "c:\tmp"

My original PHP file -
<!doctype html><html><head></head><body><?php Print "Hello
from PHP";
?></body></html>

With these changes, when I start httpd.exe and try to launch a simple php
file shown above, from the browser, the first time I see that my filter
module gets the correct php data from php file in the buckets. But when I
try to open the same php file second time, I see that there are some extra
strings appended to the original php file contents and sent to my filter
module in the buckets. So in my filter when I read php data from the bucket
I get the php data and some additional strings appended to the php data
like below -

"<!doctype html><html><head></head><body>Hello from PHP</body>
</html>6.26%20(KHTML,%20like%20Gecko)%20Version/6.0%20Mobile/10A5355d
%20Safari/8536.25 HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101
Firefox/22.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5........ "

Any help is highly appreciated.

Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message