Windows installation for use with apache

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
RaidersRule
Forum Newbie
Posts: 1
Joined: Sat Sep 21, 2002 8:34 am

Windows installation for use with apache

Post by RaidersRule »

Sorry if this has been answered before but I've searched high and low. This is regarding the cgi binary security problems and the cgi.force-redirect action.

Yes, I've read the stuff in the manual about setting cgi.force_redirect to 0. I still get the security warning when I try to serve a php file. I believe my problem is that I can't get my apache server to use the .dll instead of the cgi binary.

I've configured my apache httpd.conf to use the php4apache.dll with these lines:

LoadModule php4_module D:php/sapi/php4apache.dll
AddType application/x-httpd-php .php .phtml


However, the cgi-bin seems to still be trying to proces the php files with the cgi binary (otherwise I wouldn't be getting this warning, correct?). I've copied the dll to my system directory (along with all the dlls from the php/dlls directory).

I've put the php.ini file n my system directory and from what I've read, even if I'm using the cgi-binary, setting cgi.force_redirect to 0 should be enough. However, that didn't fix the problem either.

I would greatly appreciate the input of any installation gurus.
Thanks.
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

D:php/sapi/php4apache.dll

looks wrong...

try

D:/php/sapi/php4apache.dll

or

D:\\php\\sapi\\php4apache.dll

i forgot how to do windows paths when it comes to things like these, but you forgot the '/' after d:
thedunn
Forum Newbie
Posts: 8
Joined: Sat Sep 21, 2002 9:29 am
Location: DUNNland

Post by thedunn »

Ok, you have the windows binary of Apache installed, yes? And apache service is on :p yes? Ok. Then copy php4apache.dll to your PHPdir, eg D:/php and then move the php.ini file to your windir, eg D:/winnt or D:/WINDOWS
Look around php.ini and use the manual to change the settings there. This is what I did and PHP runs fine. Try making sure that the php4apache.dll line is uncommented. I don't know what version of php you're using, so I don't know if it will be commented or no. Hope this helps (and hope I am right ;))
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Which version of Apache are you using?

Don't use CGI-binary, SAPI's better... Much better. If you're using Apache 2 you will have to download PHP from snaps.php.net
Post Reply