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 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算