laravel PHP 版本的服务器要求
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16870111/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Server requirements for PHP version
提问by ux.engineer
The new documentation mentions 5.3.7 as the php version requirement. Although looking through the current composer.lock file 5.3.3 would do fine?
新文档提到 5.3.7 作为 php 版本要求。虽然查看当前的 composer.lock 文件 5.3.3 可以吗?
回答by Jason Lewis
Laravel requires 5.3.7, so get at least that. I recommend (if possible) you upgrade to 5.4 anyway. Laravel requires the password_compat
package and that package requires at least PHP 5.3.7. The reason:
Laravel 需要 5.3.7,所以至少得到它。无论如何,我建议(如果可能)您升级到 5.4。Laravel 需要该password_compat
包,该包至少需要 PHP 5.3.7。原因:
The reason for this is that PHP prior to 5.3.7 contains a security issue with its BCRYPT implementation. Therefore, it's highly recommended that you upgrade to a newer version of PHP prior to using this layer.
原因是 5.3.7 之前的 PHP 的 BCRYPT 实现存在安全问题。因此,强烈建议您在使用该层之前升级到较新版本的 PHP。
If you do use a lower PHP version beware.
如果您确实使用较低的 PHP 版本,请注意。
If you attempt to use password-compat on an unsupported version, attempts to create or verify hashes will return false. You have been warned!
如果您尝试在不受支持的版本上使用 password-compat,则尝试创建或验证散列将返回 false。你被警告了!
回答by Johnny
There are also a certain amount of PHP extensions required to use some bits of the built in stuff in laravel. For example yesterday I noticed the file upload requires the fileinfo extension to gather information.
还需要一定数量的 PHP 扩展才能使用 Laravel 中的一些内置内容。例如昨天我注意到文件上传需要文件信息扩展来收集信息。
Unsure if that's noted anywhere in the docs. Laravel does give you a 500 error though to let you know if extensions are missing.
不确定文档中是否有注明。Laravel 确实会给你一个 500 错误,让你知道是否缺少扩展。