doulang1945 2010-08-06 00:04
浏览 39

如何在Debian上关闭php中的safe_mode?

I know, it may sound ridiculous, but I can't turn off safe_mode. I'm using wkhtmltopdf (which is best html->pdf converter I've used, and yes, I tried html2ps, fpdf and lots of others). And it needs to be executed with exec() function. I've done

  • find / | grep php.ini,

found all of php.ini's and changed safe_mode to Off. Then added

  • php_flag safe_mode Off

to .htaccess and

  • php_admin_flag safe_mode Off

to httpd.conf. And still I'm getting the following errors:

  • Warning (2): shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode [APP/vendors/wkhtml/wkpdf.php, line 79]

Update: Ok, I've found an answer. Since I had virtualhosts, each virtualhost had it's own httpd.conf inside of it's own directory, and it had "safe_mode off" inside of it.

  • 写回答

3条回答 默认 最新

  • douwen3083 2010-08-06 00:06
    关注

    You have probably forgot to restart your httpd.

    Also, this question belongs on ServerFault.

    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本