Laravel共享托管-在PHP 5.3和更高版本中不建议使用指令'safe_mode' [英] Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater
问题描述
我使用laravel为我的一个客户创建了一个网站,他们使用的是共享主机.
I made a website with laravel for one of my clients, and they are using a shared hosting.
然后我将laravel安装到其home文件夹中,因此public
文件夹成为主机中的public_html
文件夹,并且我在path.php文件中将其更改为public_html
.
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
在PHP 5.3及更高版本中不推荐使用指令"safe_mode"
Directive 'safe_mode' is deprecated in PHP 5.3 and greater
错误.在我搜索完它之后,每个人都说我需要从我的php.ini
文件中注释出safe_mode,但是由于我位于共享主机上,所以我无法更改它.
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.
有什么建议吗?
P.S:我的客户不具备技术知识,在他们花了钱去托管之后,他们不想更改它,并希望我来处理这种情况.
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.
推荐答案
这可能是由于您的错误报告级别所致.尝试忽略E_DEPRECATED
甚至可能忽略E_WARNING
.
This is likely due to your error reporting level. Try ignoring E_DEPRECATED
and possibly E_WARNING
.
如果您正在运行Laravel 3,则应该能够在第16行的application/config/error.php中设置忽略的错误级别.
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),
这篇关于Laravel共享托管-在PHP 5.3和更高版本中不建议使用指令'safe_mode'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!