David-fethiye Posted May 11, 2006 Share Posted May 11, 2006 After extracting the php5 files into my php directory ı need to modify the httpd.conf fileTrouble is these instruction (below) are for php4 can someone please tell me what i should replace them with for php5 ?I have tried various guesses but Apache failed to start.(instructions) Modifying Apache ConfigurationApache doesn't know that you just install PHP. We need to tell Apache about PHP and where to find it. Open the Apache configuration file in C:\Program Files\Apache Group\Apache2\conf\httpd.conf and add the following three lines :LoadModule php4_module php/sapi/php4apache2.dllAddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps ( end instructions) Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/9545-installing-php5-om-apache-2/ Share on other sites More sharing options...
wildteen88 Posted May 11, 2006 Share Posted May 11, 2006 Are you on Windows. If you are the following these instructions:[b]NOTE: with these steps I presume PHP is located in C:\php, make sure that you change any instances of C:\php to be changed to the correct path to where you have php located to.[/b]Ok first open up your Apache configuration file (httpd.conf). Now scroll down and find the following line:[code]#LoadModule ssl_module modules/mod_ssl.so[/code]After that line add the following lines:[code]#PHP 5LoadModule php5_module "C:/php/php5apache2.dll"# Location of the php.ini, PHP's configuration file.PHPIniDir "C:/WINDOWS"[/code]Now find the following line:[code]AddType application/x-gzip .gz .tgz[/code]Now after that line add the following lines:[code]#PHP5# File extensions to be parsed by the PHP intepreter.AddType application/x-httpd-php .php .phtmlAddType application/x-httpd-phps .phps[/code]Now save the httpd.conf file and restart Apache.That should now load PHP5 as an Apache module. You can test that everythink is working correctly by creating a simple hello world script:[code]<?phpecho "Hello world";?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/9545-installing-php5-om-apache-2/#findComment-35246 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.