dongnvwang8591 2015-11-06 05:02
浏览 158
已采纳

出于安全原因,已禁用ini_set()

I am using Laravel 5.1. I uploaded my project on a shared host. Everything was going well but one day when i try to browse the site a warning message appeared

Warning: ini_set() has been disabled for security reasons in /home/zamzamtransport/public_html/root/vendor/vlucas/phpdotenv/src/Dotenv.php on line 45

and

Warning: ini_set() has been disabled for security reasons in /home/zamzamtransport/public_html/root/vendor/vlucas/phpdotenv/src/Dotenv.php on line 47

I googled for the solution everybody suggest me to upload my own php.ini. So, I did the following:

  1. Create a new php.ini file in root directory.
  2. Edit the file and write disable_functions=.
  3. Edit my .htaccess and append this line suPHP_ConfigPath /home/zamzamtransport/public_html/

After doing this I have another error message

Fatal error: Class 'PDO' not found in /home/zamzamtransport/public_html/root/config/database.php on line 16

I realize that the hosting provider can solve it by configuring their server, I just need to contact with them.

But, I want to know is there any way to solve it from my side?

  • 写回答

1条回答 默认 最新

  • douding7189 2015-11-06 05:08
    关注

    The error you are seeing now appears to be related to no PDO extension existing on the host. You will not be able to fix this with ini_set so you need to speak to your ISP (or perhaps change ISP).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发