Laravel docs says the following is needed
- PHP >= 5.6.4
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
Many packages need curl, so I suggest adding php-curl
and uploading and manipulating images require the gd library, php-gd
First upgrade your system: sudo yum upgrade
Now let's install openssl php (provided by php-common) and php-mbstring (might already be installed) and curl
sudo yum install php-common
sudo yum install php-curl php-mbstring
sudo yum install php-mbstring
You sometimes also need mcrypt
sudo yum install php-mcrypt
Lets install php-json
and php-intl
and php-exif
and php-tokenizer
sudo yum install php-json php-intl php-exif php-tokenizer
Since laravel has sockets support, we might need it, as well as XML
sudo yum php-sockets php-xml
To get it working with apache you'll need mod_php - install it by sudo apt-get install php5-mcrypt libapache2-mod-php
Apache also needs mod_rewrite, so install it by running: a2enmod rewrite
For installing on Centos - this article on www.virtzone.net worked for me
For ubuntu with apache - sudo apt install php libapache2-mod-php7.0 && sudo a2enmod php7.0
Run php -i | grep 'extension name'
(replace extension name with one of the above extensions (remove the php-
)`