Click to See Complete Forum and Search --> : Unable to make aligment between PHP and Apache


akirajt
06-14-2007, 10:07 AM
Hey,

The big trouble is that I am not enabling to make Apache 2.2 be working together with PHP files.

I definitely sure that Apache work very well before I made some modification in php files.

The instruction I followed:

I installed apache and added the php files in a map named php. I put the map in C:\.

I rename the php.ini-dist to php.ini. Then I copy and paste the file in the category windows.

In the php.ini file I make some following changes:

* After that I locate "extension_dir = "./"" and change it into "extension_dir = "C:\php\ext\""
* I remove the semicolon of ;extension=php_mbstring.dll, ;extension=php_gd2.dll,
* Add some lines which is extension=php_pdo.dll, extension=php_pdo_mysql.dll


Make following changes in "httpd.conf":

* I add the line "LoadModule php5_module c:/php/php5apache2_2.dll" and "AddType application/x-httpd-php .php"
* I add some text after the "DirectoryIndex index.html", so I would look like "DirectoryIndex index.html index.php"


The current path of DocumentRoot and Directory is "C:/htdocs" in "httpd.conf".

Once I have fulfilled the following points I restarted the Apache 2.2 and after that I created a file named info.php and added a line "<?php phpinfo();?>". I put the file in "C:\htdocs". Then I typed "localhost/info.php" in Firefox, but unfortunately no result will show up. Its says something about error or this website don't exist.


What should I do in order to overcome this problem?

I really appreciate if I get some help of you guys!

sheephat
06-14-2007, 12:21 PM
Are you sure apache is enabled? it sounds like your files might be in the wrong place, as if there was an error with php then <? phpinfo() ?> would display on the screen instead of the result you should get if PHP was working correctly.

akirajt
06-14-2007, 07:42 PM
Are you sure apache is enabled? it sounds like your files might be in the wrong place, as if there was an error with php then <? phpinfo() ?> would display on the screen instead of the result you should get if PHP was working correctly.

Hey,

Iam pretty sure that the Apache worked well. If Apache didn't work so well an error will appear and I have to go to the logg to read the specific problem

The php files is should be located in the following path c:\php. The reason I believe it is that many people and author agree to same aspect to have the php files in php category.

FusionComputers
06-14-2007, 11:53 PM
If you're looking to just install PHP, Apache, and MySQL, you can download WAMP. Simplest installation of these packages I've found. http://www.wampserver.com/en/

bradgrafelman
06-16-2007, 11:41 AM
First, there is no reason to move php.ini to the Windows folder. Keep it in c:\php\ and add a line like this to your httpd.conf:

PHPIniDir c:/phpSecond, have you looked at Apache's error log? Does it show any errors? Do other plain .html files still work?