Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater

此生再无相见时 提交于 2019-12-06 13:45:04

问题


I made a website with laravel for one of my clients, and they are using a shared hosting.

And i installed laravel to its home folder, so public folder became the public_html folder in host, and i changed it to public_html in the paths.php file.

And, after i installed it, i started to get

Directive 'safe_mode' is deprecated in PHP 5.3 and greater

error. And after i googled it, everybody says that i need to comment out safe_mode from my php.ini file, but since i am on a shared hosting, there is no way for me to change that.

Any suggestions?

P.S: My client does not have a technical knowledge, and after they paid the money to hosting, they don't want to change it, and want me to handle this situation.


回答1:


This is likely due to your error reporting level. Try ignoring E_DEPRECATED and possibly E_WARNING.

If you are running Laravel 3, you should be able to set your ignored error levels in application/config/error.php around line 16.

/*
|--------------------------------------------------------------------------
| Ignored Error Levels
|--------------------------------------------------------------------------
|
| Here you simply specify the error levels that should be ignored by the
| Laravel error handler. These levels will still be logged; however, no
| information about them will be displayed.
|
*/

'ignore' => array(E_WARNING, E_NOTICE, E_USER_NOTICE, E_DEPRECATED, E_USER_DEPRECATED),



回答2:


Check your php.ini file and find the safe_mode declaration and comment it out. You might have to restart Apache after that.



来源:https://stackoverflow.com/questions/13959918/laravel-shared-hosting-directive-safe-mode-is-deprecated-in-php-5-3-and-grea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!