I have a live site running fine.

I have an Acquia Desktop Dev Stack running on my Windows desktop machine.

On many previous occasions I have imported the existing live site and run in on the Dev Stack.

I can still get my previous Dev Stack version of the site to open up.

BUT now when I try to go to the latest imported site, it appears to not recognize PHP.
Firefox tries to download the file.
Even when I try opening my "phpinfo.php" file from the latest import directory I get a browser dialog box

"You have chosen to open [blank] which is: application/x-httpd-php (529 bytes) from localhost9:8082
What should Firefox do with this file?"

Really stumped.
Any advice?

Comments

VM’s picture

It's not a firefox issue.

Did you copy the .htaccess file over from the live site?
Does a new Drupal install work correctly?

TWD’s picture

Yes, i zipped everything from the live site and extracted into the dev directory.

Haven't tried a fresh Drupal on the Dev Stack, yet.
But regardless, if i try to execute http://localhost/phpinfo.php it should work, you would think.
After all it's not relying on any database query.

But still get the problem.

VM’s picture

https://www.drupal.org/node/7789 - indicates it could be a browser cache problem and to clear browser cache

other results that are similar to your issue @ https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF...

TWD’s picture

The problem was in the .htaccess file.

I compared the latest version of the .htaccess file with the most recent "working" version of the file.
The latest file contains these additional lines

#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
# Set PHP handler to application/x-httpd-php54s on Fri Nov 13 19:49:35 MST 2015.
AddHandler application/x-httpd-php54s .php

I'm not sure whether the first two are important but I suspect the second two are where the trouble lies.

How did the problem come about? Well the time stamp of Friday evening corresponds to when I was playing around with the performance configurations on the live site. I switched on and switched off the "page caching" and "block caching" settings. Perhaps something was written to the .htaccess file but not reverted?

Anyway it works now. Hope this helps somebody else.

VM’s picture

drupal doesn't write to the .htaccess file. The additonal lines forces the installation to use PHP 5.4 and was likely added by the host or a configuration on the host.

TWD’s picture

Interesting.