rabmerab Posted April 14, 2008 Share Posted April 14, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/ Share on other sites More sharing options...
wildteen88 Posted April 14, 2008 Share Posted April 14, 2008 How are you configuring Apache, Sounds like you are using PHP as CGI. It is better to configure PHP with Apache using the provided Apache module that comes with PHP (php5apache2_2.dll). Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-516978 Share on other sites More sharing options...
rabmerab Posted April 15, 2008 Author Share Posted April 15, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-517522 Share on other sites More sharing options...
rabmerab Posted April 15, 2008 Author Share Posted April 15, 2008 hi again, just to add this, I did install apache, mysql and PHP 03 years a go and that was a peace of cake . Now I don't know where is the problem. Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-517524 Share on other sites More sharing options...
PFMaBiSmAd Posted April 15, 2008 Share Posted April 15, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-517581 Share on other sites More sharing options...
wildteen88 Posted April 15, 2008 Share Posted April 15, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-517803 Share on other sites More sharing options...
rabmerab Posted April 16, 2008 Author Share Posted April 16, 2008 Hi wildteen88, I will try this and get back to you. Thank you very much. rabmerab Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-518314 Share on other sites More sharing options...
rabmerab Posted April 16, 2008 Author Share Posted April 16, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-518344 Share on other sites More sharing options...
wildteen88 Posted April 16, 2008 Share Posted April 16, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-518673 Share on other sites More sharing options...
rabmerab Posted April 18, 2008 Author Share Posted April 18, 2008 Hi there, I was in rush so I went for the easy installation given in other part of this forum (http://www.wampserver.com/en/index.php ) . But I wasn't happy until I make it work using the normal way ( httpd.conf and php.ini). I am glad it did work. Thank you very much for the help. rabmerab Quote Link to comment https://forums.phpfreaks.com/topic/101022-appache-installation/#findComment-520171 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.