Forum Moderators: phranque
DirectoryIndex index.html index.html.var index.phtml index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php "/php-exe-location/php.exe"
ScriptAlias /php-exe-location/ "c:/php"
AddType text/plain .txt
AddType application/x-tar .tgz
I've created a folder in htdocs called test and in here I've placed a file called index.php
My problem is when I try to call the index.php file in any browser [localhost:8080...] rather than this file opening I get the following message?you are downloading the file: test from localhost, would you like to open, save,cancel?
If I replace the index.php file with index.html then this opens fine so I think the install has gone OK but there is obviously something wrong with the PHP configuration. I've been trying for days to find an answer to this so that I can get to grips with the difficult stuff. I really hope someone can help.
Thanks
Martin
AddType application/x-httpd-php .php
AddType text/html .php
Jim
However I'm interested in the other replies too. Simon, do I need this line?
PHPIniDir "C:/php5" as it's not in my code and if I do need it where shall I put it? and 'Extras', I'm not qite sure what you mean by "action"? I'm completely new to all this.
Thanks for all your help. No doubt I'll be back here often
Martin
Jim
Thanks
Martin
It's a good practice to look up each of the Apache directives that you use or are told to use. Most of them are 'server configuration directives' and can affect important aspects of your server's operation. So, don't take anybody's word for anything -- dissect their suggested configuration directives or code using the appropriate documentation, and dig until you understand what they're doing. This sometimes takes awhile, but it can prevent disastrous results or side-effects of a pure cut-n-paste approach. (A fair analogy for modifying your server configuration is editing your Windows Registry -- and look at all the warnings you find posted about doing that!)
> It all worked for him.
Possibly because his server was already configured to parse php files and return the correct MIME-type.
Anyway, glad you got it working!
Jim