Can't configure APACHE to view php file...pls help....

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

cjzone81
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Aug 11, 2002 8:26 am

Can't configure APACHE to view php file...pls help....

Postby cjzone81 » Thu Aug 15, 2002 11:17 pm

hi..
all the experts out there.

lately i've installed apache version 1.3.
i typed http://127.0.0.1/index.html in my i.e and i can view the file.
that mean apache server've been successfully installed in my pc,rite?
but when i put my php file inside the root folder n type
http://127.0.0.1/xxx.php
it cant execute the php file.
i've tried PHP with IIS before n works well.but before doing that,
i have to configure setting for IIS.
i'm using windows XP Pro, so setting for IIS can be done through interface.
but i cant find any interface to configure apache server.
can anyone teach me how to configure apache so that i can view php files with apache server???????
n if no trouble, can u pls teach me how to configure apache so that i can view asp files as well???

THANX A LOT FOR YOUR HELP....

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Can't configure APACHE to view php file...pls help....

Postby WiZARD » Fri Aug 16, 2002 12:11 am

cjzone81 wrote:hi..
all the experts out there.

lately i've installed apache version 1.3.
i typed http://127.0.0.1/index.html in my i.e and i can view the file.
that mean apache server've been successfully installed in my pc,rite?
but when i put my php file inside the root folder n type
http://127.0.0.1/xxx.php
it cant execute the php file.
i've tried PHP with IIS before n works well.but before doing that,
i have to configure setting for IIS.
i'm using windows XP Pro, so setting for IIS can be done through interface.
but i cant find any interface to configure apache server.
can anyone teach me how to configure apache so that i can view php files with apache server???????
n if no trouble, can u pls teach me how to configure apache so that i can view asp files as well???

THANX A LOT FOR YOUR HELP....

Hi!
First read carefuly this:
http://www.devshed.com/Server_Side/Admi ... che1/print and
http://www.devshed.com/Server_Side/Admi ... che2/print

In httpd.conf add next:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps (optional)

Try test apache, if some error see httpd.conf and php.ini

P.S.
Dont fogot copy files from c:\php\dll to c:\windows
and php.ini too.
Good luck

P.P.S. read carefuly all info about installation in install.txt what complete distibute of PHP.

:wink:

cjzone81
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Aug 11, 2002 8:26 am

Postby cjzone81 » Fri Aug 16, 2002 11:05 pm

i've tried your advice n read the install.txt that come along with php installation.
there's two ways to configure apache so that i can view php file through apache.
one is the same with wat u've taught me.i've tried it.but fail.

LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
it's just keep saying that it cant locate the module to the server everytime i start apache.

but another way:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
it works...

what's the differences between both way?
what's the problem that i cant use the first way u taught me to configure apache??
n can u teach me how add asp module in apache as well so that it can view asp files too??
a little troublesome rite??but i'll appreciate very much of your help...
thanx a lot.

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Sat Aug 17, 2002 12:18 pm

cjzone81 wrote:i've tried your advice n read the install.txt that come along with php installation.
there's two ways to configure apache so that i can view php file through apache.
one is the same with wat u've taught me.i've tried it.but fail.

LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
it's just keep saying that it cant locate the module to the server everytime i start apache.

but another way:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
it works...

what's the differences between both way?
what's the problem that i cant use the first way u taught me to configure apache??
n can u teach me how add asp module in apache as well so that it can view asp files too??
a little troublesome rite??but i'll appreciate very much of your help...
thanx a lot.

Interestin why you do not check of file c:/php/sapi/php4apache.dll and once like CGI module PHP version from 4.1.x not working for security ...

cjzone81
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Aug 11, 2002 8:26 am

Postby cjzone81 » Mon Aug 19, 2002 7:12 pm

can't understand what your r trying to say??
is it mean that i can only stick to the way that make my php works fine under apache?
n dun try the first way??

elitecodex
New php-forum User
New php-forum User
Posts: 68
Joined: Tue Jul 09, 2002 8:45 am
Location: East Coast, USA
Contact:

Postby elitecodex » Tue Aug 20, 2002 6:21 am

There are two basic ways to install PHP on Apache. You can either install it as a CGI Binary (when you are referencing the php.exe file) and a ISAPI Module (when you are referencing the dll files).

The big difference is that the CGI Binary way is not as secure as the ISAPI module. Read the Security section of the PHP Manual for more information.

Dont know if this helps or not, but I figured I would throw my 2-cents in :)

Will

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Tue Aug 20, 2002 9:35 pm

elitecodex wrote:There are two basic ways to install PHP on Apache. You can either install it as a CGI Binary (when you are referencing the php.exe file) and a ISAPI Module (when you are referencing the dll files).

The big difference is that the CGI Binary way is not as secure as the ISAPI module. Read the Security section of the PHP Manual for more information.

Dont know if this helps or not, but I figured I would throw my 2-cents in :)

Will

But don't forget about what PHP will not working like CGI....

elitecodex
New php-forum User
New php-forum User
Posts: 68
Joined: Tue Jul 09, 2002 8:45 am
Location: East Coast, USA
Contact:

Postby elitecodex » Wed Aug 21, 2002 6:22 am

WiZARD wrote:But don't forget about what PHP will not working like CGI....


What do you mean? You lost me there :\

Will


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 2 guests