简体   繁体   中英

ini_set() has been disabled for security reasons

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?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM