dqqvravff05370501 2014-02-18 18:48
浏览 38
已采纳

在将php版本从5.3.28更新到5.4.25之后,Apache下载了php文件

I am running php on Debian 6 with mod_fcgid with DotDeb packages.

Once I upgraded php to version 5.4.25, apache downloads the php files as it does not recognize the handlers. I am not updating any config files. Once I revert back to 5.3.28 it works ok. I am not able to track anything in the error logs.

The only difference is that dotdeb don't have a php build with suhosin for 5.4, but should not make a difference because the 5.3 version works even with suhosin disabled.

Any ideas how to debug this?

  • 写回答

2条回答 默认 最新

  • dqvy87517 2014-02-19 12:18
    关注

    It turns out that with the new version Apache needs different configuration:

    In the site configuration in /etc/apache2/sites-available/{mysite}.conf I added:

    <FilesMatch \.php$>
        SetHandler fcgid-script
    </FilesMatch>
    

    And commented out this:

    #AddHandler fcgid-script .php
    #AddHandler fcgid-script .php5
    

    The same thing in /etc/apache2/mods-available/fcgid.conf

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分