Wednesday, January 21, 2009

PHP : Getting a PHTML download dialog box on Linux?

Blogging this mostly for notes, as it was a stupid simple solution but no amount of googling gave me what I needed:

You’re setting up a LAMP server, probably on Ubuntu though I suppose it could happen on Windows.  You’re getting this annoying error, when you try to hit your index.php page, that asks you to download or open the PHTML file.   You do some researching, say “Ah, heck, I forgot to apt-get install php5” or libapache2-mod-php5 or whatever, and you get those and you restart apache, but no matter how many times you bang your head against the wall, it doesn’t go away.  Worse!  You create a brand new php file, and that sumbitch works.  But your existing code doesn’t.

With me?  Had that problem?

Yeah, clear your browser cache.  You’ve fixed the problem, and your browser is still serving up the old, broken bits.


You’re welcome. :)   [Credit to coworker Jesse for finally finding the solution…]


nabito said...

Thanks for the solution!

Hit me hard for real!

Student said...

Thank Duane!! Googling this for ages now and didnt find a solution... new to ubuntu and LAMP.. Thanks a thousand!