skeptic Posted December 9, 2009 Share Posted December 9, 2009 When you visit this page: https://wufotos.com/testcase/index.php you will notice the source code is shown. I assume the PHP interpreter was not invoked. What prompts it to show is a .htaccess file which contains these lines: # Use PHP5 as default AddHandler application/x-httpd-php5 .php RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} The same combination is not a problem with BlueHost or LunarPages. It's only a problem at GoDaddy. What's the problem here? Patrick Quote Link to comment https://forums.phpfreaks.com/topic/184549-why-is-the-php-source-shown/ Share on other sites More sharing options...
premiso Posted December 9, 2009 Share Posted December 9, 2009 Why do you need to add that in the .htaccess in the first place? If the webserver is setup to parse PHP then you should not need that. Perhaps contacting GoDaddy Customer Support might yield some more accurate answers. The best answer is that GoDaddy limits their .htaccess file or does not have php 5 installed. Quote Link to comment https://forums.phpfreaks.com/topic/184549-why-is-the-php-source-shown/#findComment-974290 Share on other sites More sharing options...
skeptic Posted December 9, 2009 Author Share Posted December 9, 2009 It appears this line is causing the source code to show, I am not sure why: AddHandler application/x-httpd-php5 .php The reason for the .htaccess is to force the page into https:// if it came in as http:// GoDaddy has PHP 5.2.8. That line is redundant in 5.2.8, but shouldn't cause it to break. Why do you need to add that in the .htaccess in the first place? Quote Link to comment https://forums.phpfreaks.com/topic/184549-why-is-the-php-source-shown/#findComment-974302 Share on other sites More sharing options...
BK87 Posted December 30, 2009 Share Posted December 30, 2009 did you try.... AddType application/x-httpd-php5 .php ? Quote Link to comment https://forums.phpfreaks.com/topic/184549-why-is-the-php-source-shown/#findComment-986147 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.