|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help Needed: Configuring Apache for PHP
Hi all, I was hoping someone would be able to help me. I'm planning on learning php and I'm in the process of configuring my computer (Win XP) with Apache, MySQL and PHP. Apache has been installed with no probs and I've got mySQL running too.
I've just installed php 5.1.6 for windows, and the book I'm using to get started says I need to edit the configuration for Apache to reconise the PHP files. It gives me three lines of code to add to the httpd.conf file. Those are: LoadModule php5_module c:/php/php5apache.dll AddModule mod_php5.c AddType application/x-httpd-php .php .phtml I've added the lines of code and have also created the phpinfo.php page and placed it in the apache htdocs folder, but now Apache fails to run (there is a failure when I try to run the service). When I remove the three lines it runs fine but obviously when I type in http://localhost/phpinfo.php to my browser I get the standard page cannot be displayed file. Does anyone know what I'm doing wrong? I'm a trained java programmer and this is the first time I've tinkered with php and apache. Any advice would really be appreciated. |
|
#2
|
|||
|
|||
|
RE: Help Needed: Configuring Apache for PHP
Hi!
Since I am also not the "Server Guru" I used a verz simple trick - I got myself a copy of XAMPP - a complete package consisting of Apache, MySQL, PHP, & PHPMyAdmin - absolutely easy to install - stable - fast. You can find XAMPP at www.apachefriends.org Definitely easier than trying to configure Apache by yourself - especially when you are on windows and not in a production environment - there I would still rely on a LINUX implementation. regards, desrtfx (Georg) |
|
#3
|
|||
|
|||
|
RE: Help Needed: Configuring Apache for PHP
Thanks so much for the advice. I'll need to give it a try...it sounds so much easier than the way I'm doing it.
Would that make any difference to the php stuff when I get around to uploading it to the web? |
|
#4
|
|||
|
|||
|
RE: Help Needed: Configuring Apache for PHP
Hi again!
No, it wouldn't make any difference as long as you bear in mind that UNIX (and thus LINUX) Path & File Names are Case -sensitive (i.e. Root is not the same as root). Other than that I could not find any differences. Anyhow, it's definitely worth giving XAMPP a try, the guys there are doing a phantastic job making it so easy for everyone to have a proper webserver running in no time. (I actually have even a local copy of the german site of Wikipedia running on my XAMPP - needed it for the times when I had no Internet at my work-location {Sahara}) Regards, desrtfx |
|
#5
|
|||
|
|||
|
RE: Help Needed: Configuring Apache for PHP
If you have apache 2.2.x then download from http://snaps.php.net/ php v5.2
then in httpd.conf: LoadModule php5_module c:/php/php5apache2_2.dll <IfModule dir_module> DirectoryIndex index.php index.html </IfModule> I Have newer used this: AddModule mod_php5.c |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Help Needed: Configuring Apache for PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|