Jump to content

appache installation


Recommended Posts

Hi every one,

 

I hope this is not will sound very basic but I am new to apache server. ;)

 

Any way, I downloaded  apache_2.2.8-win32-x86-no_ssl and Installed it in deferent windows ( XP, 2000 server and Vista).

 

I make change to the necesseary change to httpd.conf like the path of php.exe.

 

When I type http://localhost in Internet explorer, it shows the message "It works" but when I type the address of the file (sample.php) which was saved at the folder /htdocs,  the web browser reply with "The page cannot be displayed" and the raison is "HTTP Error 403 - Forbidden

Internet Explorer" . I don't understand this knowing I am accessing my computer as admin.

Please nead help and thanks a million

 

rabmerab

 

 

 

Link to comment
Share on other sites

Thanks for showing interest ,

 

1 -I downloaded and install this  software apache_2.2.8-win32-x86-no_ssl

2- Also extract php-5.2.5-Win32 in c:/php

3- I made this changes bellow to the file  httpd.conf and save it in the C:\Program Files\Apache Software Foundation\Apache2.2\conf where apache been install.

The new lines added to httpd.conf are :

# added configurartion

 

      AddType application/x-httpd-php .phtml  .php  .php3  .php4

      AddType application/x-httpd-php-source  .phps

 

      ScriptAlias /php/ "C:/php/"

      Action application/x-httpd-php  "/php/php.exe"

 

4- I added  the following line to php.ini and save it in the c:/windows folder

 

doc_root =C:\Program Files\Apache Software Foundation\Apache2.2\htdocs.

 

This is the way, I did it.

When I type http://localhost  in Internet explorer, it display: “It  works”.

How ever when I type in http://localhost/phpinfo.php , it show can’t display page and underneath access forbidden.

I don’t know what I am doing wrong even I was following a book procedure.

Any more idea. :)

 

Thanks

 

rabmerab

 

 

 

 

 

Link to comment
Share on other sites

php.exe is the command line interpreter (CLI) in php5 and has nothing to do with any kind of web server installation. If you are attempting to install php as a CGI wrapper, php-cgi.exe is the executable you are interested in. The correct GCI installation instructions can be found in the install.txt file that comes with the .zip php package.

Link to comment
Share on other sites

3- I made this changes bellow to the file  httpd.conf and save it in the C:\Program Files\Apache Software Foundation\Apache2.2\conf where apache been install.

The new lines added to httpd.conf are :

# added configurartion

 

      AddType application/x-httpd-php .phtml  .php  .php3  .php4

      AddType application/x-httpd-php-source  .phps

 

      ScriptAlias /php/ "C:/php/"

      Action application/x-httpd-php  "/php/php.exe"

For best results I prefer to configure Apache with the PHP module. So remove these lines:

      ScriptAlias /php/ "C:/php/"

      Action application/x-httpd-php  "/php/php.exe"

 

and replace them with:

      LoadModule php5_module "C:/php/php5apache2_2.dll"

 

Save the httpd.conf and restart Apache. Job done.

Link to comment
Share on other sites

Hi

 

I made the change to httpd file and restart the apache as you adviced me.

 

First  when I type http://localhost in IE it show “It works!”, is that good so far ?

 

Then  I typed http://localhost/phpinfo.php  with phpinfo.php file is saved at htdocs folder. 

 

doc_root in the file php.ini point to the right folder ( doc_root=”C:\Program Files\Apache Software Foundation\Apache2.2\htdocs”).

This is what was displayed in IE:

 

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:·  If you typed the page address in the Address bar, make sure that it is spelled correctly.·  Open the localhost home page, and then look for links to the information you want. ·  Click the  Back button to try another link. · 

Click  Search to look for information on the Internet.

HTTP 404 - File not foundInternet Explorer

 

It seem  I  moving forward  with you help,  any more ideas.

Thanks in advance

 

rabmerab

 

Link to comment
Share on other sites

Strange, first remove all existing files in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs leaving just your phpinfo.php file

 

Open your browser and go to http://localhost

 

This time you should see an Index of / page displayed and lists all folders/files currently in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Can you see your phpinfo.php file? What happens when you click on the link to that file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.