zdc253212956 发表于 2015-8-19 15:04:24

安装LAMP后,Firefox提示"You have chosen to open..which is a Phtml file.."?

  在Synaptic Package manager安装了LAMP-server (等同于apt-get install apache2 mysql-server mysql-client php5 php5-gdphp5-mysql)

  和
  安装phpmyadmin(等同于sudo apt-get install phpmyadmin)后,

  打开firefox, 输入127.0.0.1正常,显示“It works!”
  可是输入127.0.0.1/phpmyadmin后,无法进入登录页面,弹出窗口,里面的内容如下:

---------------------------------------
  You have chosen to open

(Blank - no file or program name given)

which is a PHTML file
   from http://localhost
  ---------------------------------------
  1遇见这个问题,首先反应是某个部件安装没有安装好,
  可是试验了一下可以显示phpinfo的页面,证明php没有问题

  2是不是phpmyadmin没装好?
  重新装,仍然如此。不能排除。
  3然后想着改配置,就是.conf里关于直接加载的文件类型的设置

  改了之后也没有起作用,还是会弹出上面的窗口。
  事实上,之前直接打开其他的.php文件是可以显示,证明加载类型其实预设值OK,问题不在这。
  4还有些人说是,server的定位设置,貌似在用命令行重启apache的时候是这么提示的,
  但是仍然不是这个。不管127.0.0.1还是127.0.1.1都可已进入“it works”界面和弹出那个窗口。
  5当用chromium浏览器并打开该页的时候,可以显示登录界面,也就是说是浏览器的问题,而不是安装配置的问题,
  后来在网上搜索,原来答案很简单:

  就是清空firefox的cache
  之后,就可以顺利进入phpmyadmin管理了

  
  /**************************************************************/

  好吧,既然说到浏览器的cache,那么就不妨多考察一下相关的信息:
  wiki对于web cache的定义为:

  
  Web caching is the caching of webdocuments (e.g., HTML pages, images)to reduce bandwidth usage, serverload, and perceived lag. A web cache stores copies of documents passingthrough it; subsequent requests may be satisfied from the cache ifcertain conditions are met.
  http://en.wikipedia.org/wiki/Web_cache
  
  web cache分三类:browser cache, proxy cache, gateway cache(cisco分类是前两种)
  
  这个是关于web cache构造的经典文档

  
  http://www.cisco.com/web/about/ac123/ac147/ac174/ac199/about_cisco_ipj_archive_article09186a00800c8903.html
  
  
  这个是关于cache的教程

  http://www.mnot.net/cache_docs/
页: [1]
查看完整版本: 安装LAMP后,Firefox提示"You have chosen to open..which is a Phtml file.."?