Page 1 of 1
how can i configure php with apache
Posted: Wed Jul 31, 2002 4:49 am
by saadatshah
hi all,
i ve installed apahe version 1.3.26 on my win2k professional.....
under the current folder...
"D:\Program Files\Apache Group\Apache\"
and the installed location of PHP4.2.6 is
"D:\php"
now tell me what directive i ve 2 set in httpd.conf.....so that apahe can handle all php requests.....
need and urgent reply.....
advance thx 2 all
Posted: Wed Jul 31, 2002 5:54 am
by gnu2php
According to
this thread, you do this:
Code: Select all
ScriptAlias /php/ "d:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"
Posted: Wed Jul 31, 2002 6:27 am
by saadatshah
hi ,
thx 4 the solution....now apache can handle php files...but there is another problem i m dealing with now.....
--------FILE URL is-----
http://php:8000/Magic/admin/admin.php
-----------------------
i m using the following code for setting the action parameter of the form tag.....
<form name="frmAdmin" action="<? print($_SERVER['SCRIPT_NAME']) ."?pst=1"; ?>" method="post">
when i post my form by clicking submit button...it 'll take me 2 a url....
http://php:8000/php/php.exe?pst=1
and in the source code of the file.....the action parameter of form looks like this
<form name="frmAdmin" action="/php/php.exe?pst=1" method="post">"
so now tell me what 2 do........
Posted: Wed Jul 31, 2002 2:11 pm
by gnu2php
That's odd. I'm not sure why $_SERVER['SCRIPT_NAME'] contains the path to PHP. (It does it for me, too.)
But you could use $_SERVER['PHP_SELF'] instead.