Goldensquare
Goldensquare

Reputation: 331

php startup issue in laravel

I'm trying to run php artisan migrate command and it is showing me this error. I have no clue what to do with this. Earlier it was working fine but now this. I also have php 7 installed.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_mysql.dll' - /usr/lib/php/20151012/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Upvotes: 1

Views: 765

Answers (1)

PseudoAj
PseudoAj

Reputation: 5941

It refers to the fact that you need PDO PHP Extension:

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

  1. PHP >= 5.6.4

  2. OpenSSL PHP Extension

  3. PDO PHP Extension

  4. Mbstring PHP Extension

  5. Tokenizer PHP Extension

  6. XML PHP Extension

Run the following to install the required(and additional) PHP modules:

Centos:

yum -y install php70w php70w-bcmath php70w-cli php70w-common php70w-gd php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-odbc php70w-pdo php70w-pear php70w-pear-Benchmark php70w-pecl-apc php70w-pecl-imagick php70w-pecl-memcache php70w-soap php70w-xml php70w-xmlrpc

Debian:

# 1. Enable
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
# 2. Install
sudo apt-get install -y libapache2-mod-php7.0 php7.0-fpm php7.0-common php7.0-cli php-pear php7.0-curl php7.0-gd php7.0-gmp php7.0-intl php7.0-imap php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-ps php7.0-readline php7.0-tidy php7.0-xmlrpc php7.0-xsl

Tested the installation on debian. Additionally look for following references:

  1. Purge and install php7: https://askubuntu.com/a/705893/536547
  2. Laravel Installation: https://laravel.com/docs/5.3/installation.

Upvotes: 1

Related Questions