Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Server requirements for PHP version

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?

like image 319
ux.engineer Avatar asked Jan 13 '23 05:01

ux.engineer


2 Answers

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:

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.

If you do use a lower PHP version beware.

If you attempt to use password-compat on an unsupported version, attempts to create or verify hashes will return false. You have been warned!

like image 154
Jason Lewis Avatar answered Jan 16 '23 17:01

Jason Lewis


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.

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.

like image 20
Johnny Avatar answered Jan 16 '23 17:01

Johnny