I have installed Apache server correctly and I have downloaded php thread safe from php official website.
I start apache service and create a (phpinfo.php) file which contains the following code:
<?php
phpinfo();
?>
I copy the following file to the directory "Apache\htdocs\" and try to access the following file through the browser with the address "localhost/phpinfo.php". But I get 404 file not found error.
if I try to access "localhost" I get a single text "It Works" but nothing more. I deleted all the files in the htdocs directory but I still get "It Workds" text when I try to navigate "localhost".
Why is it happening? how can I create a .php file and browse it through the browser?
Note that: 1- Apache service is started. 2- I have add the following code to the end of the "apache\conf\httpd.conf" file:
AddType application/x-httpd-php .php
PHPIniDir "C:/php5/"
LoadModule php5_module "C:/php5/php5apache2_4.dll"
Thanks in advance
The problem was since I had changed the listening port of my apache server I did not wrote it when I was trying to access the pages in the "apache/htdocs" directory.
Now all I have to do is to add the port number when I want to access a page through the browser:
http://localhost:8085/Index.html
Its working...