Jump to content

Unable to make aligment between PHP and Apache


Recommended Posts

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!

Could you post the full error message you are getting here. From what you have said your configuration should be fine. Make sure your firewall is setup to allow incomming connections to Apache on port 80 and that Apache is running.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.