Please help. I have moved my website from another hosting company where it worked perfectly and here it works except for any .php file. If I click on a .php file, rather than running it, it displays a dialog asking whether I want to open or save it. If course I don't want to do either - I just want it to run.
Having had these difficulties (and talked at length with support) I created a simple php script (only 3 lines, the key one of which was phpinfo) but it still won't run it.
It's almost as though PHP isn't installed. I've put the correct handler in .htaccess. I have cleared the cache and retried, numerous times but no success.
Please, please help.
@LadyHynarc - I figured that you had probably checked the permissions, but you have to start somewhere.
Are you running a Linux server or Windows IIS? If you can't get even a simple echo script to run, contact tech support again because it's a configuration problem on the server and only they can fix it.
I'm on a Linux server and I think I have made some progress. I copied my php file to my root directory and got rid of my htaccess file and it worked. When I recreated the htaccess file, it didn't work. I can't run without the htaccess because my website exists within a subdirectory and the htaccess directs it there.
How can I get the php to run in the subdirectory?
All of a sudden the community won't let me post...
Trying to post code and I get
You don't have permission to access
Actually, including code into a post seems to cause a repeatable error as @LadyHynarc mentioned. I had the same problem, even when it was formatted as code.
Maybe you could attach a file with the code in it?
Let's see if the file solution works...sort of. Had to attach as a jpg as it wouldn't take a txt file. There is one line missing from the bottom of the image "
RewriteRule ^(/)?$ asm/index.html [L] "
The problem is solved!
Through a process of elimination, the following line was the problem.
"AddHandler application/x-httpd-php .php"
Why? I have no idea but I don't really care.
Now, finally, I can move on. I'm really not impressed with GoDaddy though. Nowhere near what I was expecting.
Thank you to all those who attempted to help.
Glad you were able to solve it!