![]() |
Setting up php on apache
Here's what I got:
Installed php on my apache server per instructions. Created a simple php form that opens the same page with - action="<?php $_SERVER['../PHP_SELF'];?>" But instead of opening the page it downloads it. The page works fine on other servers, but not the one that I set up the php.ini on. I'm assuming I messed something up during the configuration process. I did try using phpinfo() on a page and that worked fine. Any thoughts? |
First you need to load the module. That's done like so:
Code:
LoadModule php5_module "/path/to/php/php5apache2_4.dll"Next you need to add the type: Code:
AddType application/x-httpd-php .phpFinally if you want it, you can add a directory index. Search for DirectoryIndex and simply add in index.php. These are separated by spaces. Restart apache for the settings to take affect. For an example, this is what I've done for 5.4 build: Code:
<IfDefine PHP_5_4_0> |
I originally put this at the end of the LoadModule lines:
Code:
LoadModule php5_module "c:/php/php5apache2_2.dll"Code:
AddType application/x-httpd-php .phpCode:
PHPIniDir "c:/php" |
| All times are GMT +1. The time now is 01:43 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.