Do we still able to re-configure php.ini 'on the fly' when we don't allow to access to the file?

StackOverflow https://stackoverflow.com/questions/15767564

  •  31-03-2022
  •  | 
  •  

Question

I'm using Laravel Framework and I have a problem when I put my Laravel application on my shared hosting. When I execute my site url, this message below is appear;

Unhandled Exception

Message:

Directive 'safe_mode' is deprecated in PHP 5.3 and greater
Location:

Unknown on line 0

And I search around with that keyword. I found the message above appear because my php.ini safe_mode is on.

I execute phpinfo() and give me information that php.ini path is /usr/local/lib/php.ini

That's make me disappointed :( because I can't access php.ini. (I am using cPanel & WHM 11 shared hosting.)

Would you please tell me any other solution to this problem?

Était-ce utile?

La solution

But you may also use your custom php.ini in your root folder. If it is also not working you can use .htaccess By adding one of the following :

php_value safe_mode off

php_flag safe_mode off

These are all valid if suPHP is not enabled. If suPHP is enabled, you can check the following article, I hope it helps : http://blog.philipbrown.id.au/2009/08/php-suexec-and-custom-php-ini-files/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top