I have a problem with configuring the apache and php, for your information, i download the php, mysql and apache in separate way. the problem i face is, before this, i'm using the foxserv where everythings in one suite. but when i run my project, the codes cannot function. i give somebody my source code and he try, suprisingly everythings ok, after he ask me to configure something with foxserv, still the codes cannot run. he tells me me that he using php, mysql and apache separately, maybe because of that. so i try to install in separate way, but now, i dont know how to tell the apache to handle the *.php file. and i ask somebody again and he say that change the line
DirectoryIndex index.html index.html.var
and add the
DirectoryIndex index.html index.html.var index.php
but still no works, when i test via my browser, http://localhost/M@S/index.php. the window that promt to download the index.php. i dont know why, please help me, i spent a whole night just to configure it...
thanks in advance
Configuring Apache and PHP
Moderator: General Moderators
-
unorthodokz
- Forum Newbie
- Posts: 11
- Joined: Tue Apr 10, 2007 2:33 pm
- Location: Nashville, TN
Try EasyPHP. http://www.easyphp.org/telechargements.php3
A lot of it is in french, but it's fairly easy to use and I didn't have too many issues with getting it all working straight.
A lot of it is in french, but it's fairly easy to use and I didn't have too many issues with getting it all working straight.
Apache Config for PHP
I'm very new to PHP, in fact, i'm still trying to set up apache to recognize and parse the files.
Books, and various websites tell me to open the apache "httpd.config" file and add the following code:
LoadModule php5_module C:/php5/php5apache2.dll <----- "C:/php5" is in fact the directory I installed PHP into
AddType application/x-htppd-php .php <----- I'm assuming this tells apache to send .php files to the above directory for parsing
Then I'm supposed to copy/paste the "php.ini-recommended" to my apache directory and rename it "php.ini"
However, it's at this point where apache does not restart like it should
. So I am at a loss as to where I'm going wrong and would love some assistance.
I'm using Apache2.2 with openSSL support on a WindowsXP and PHP version 5, if that is any help.
Until I figure out what's going wrong, I am prevented from even learning or testing the <? phpinfo(); ?> lol. Please help!
EDIT: It may be of use to know that if I take out those two lines from the httpd.config, Apache will start up as it should. Maybe it depends on where i put these lines?
Books, and various websites tell me to open the apache "httpd.config" file and add the following code:
LoadModule php5_module C:/php5/php5apache2.dll <----- "C:/php5" is in fact the directory I installed PHP into
AddType application/x-htppd-php .php <----- I'm assuming this tells apache to send .php files to the above directory for parsing
Then I'm supposed to copy/paste the "php.ini-recommended" to my apache directory and rename it "php.ini"
However, it's at this point where apache does not restart like it should
I'm using Apache2.2 with openSSL support on a WindowsXP and PHP version 5, if that is any help.
Until I figure out what's going wrong, I am prevented from even learning or testing the <? phpinfo(); ?> lol. Please help!
EDIT: It may be of use to know that if I take out those two lines from the httpd.config, Apache will start up as it should. Maybe it depends on where i put these lines?
check out this thread at apachelounge.com. very easy to follow directions and it hasn't failed me yet.
Wayne
Wayne