php artisan migrate error


  • | 1896 points

    I make the database name as test and in php artisan migrate it's give me this errors

    C:\laragon\www\basic>php artisan migrate
    PHP Warning:  PHP Startup: Unable to load dynamic library 'bz2' (tried: C:\xamp\php\ext\bz2 (The specified module could not be found.), C:\xamp\php\ext\php_bz2.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: C:\xamp\php\ext\bz2 (The specified module could not be found.), C:\xamp\php\ext\php_bz2.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: C:\xamp\php\ext\curl (The specified module could not be found.), C:\xamp\php\ext\php_curl.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:\xamp\php\ext\curl (The specified module could not be found.), C:\xamp\php\ext\php_curl.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo' (tried: C:\xamp\php\ext\fileinfo (The specified module could not be found.), C:\xamp\php\ext\php_fileinfo.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'fileinfo' (tried: C:\xamp\php\ext\fileinfo (The specified module could not be found.), C:\xamp\php\ext\php_fileinfo.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'gd2' (tried: C:\xamp\php\ext\gd2 (The specified module could not be found.), C:\xamp\php\ext\php_gd2.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: C:\xamp\php\ext\gd2 (The specified module could not be found.), C:\xamp\php\ext\php_gd2.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'gettext' (tried: C:\xamp\php\ext\gettext (The specified module could not be found.), C:\xamp\php\ext\php_gettext.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'gettext' (tried: C:\xamp\php\ext\gettext (The specified module could not be found.), C:\xamp\php\ext\php_gettext.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring' (tried: C:\xamp\php\ext\mbstring (The specified module could not be found.), C:\xamp\php\ext\php_mbstring.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: C:\xamp\php\ext\mbstring (The specified module could not be found.), C:\xamp\php\ext\php_mbstring.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'exif' (tried: C:\xamp\php\ext\exif (The specified module could not be found.), C:\xamp\php\ext\php_exif.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'exif' (tried: C:\xamp\php\ext\exif (The specified module could not be found.), C:\xamp\php\ext\php_exif.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: C:\xamp\php\ext\mysqli (The specified module could not be found.), C:\xamp\php\ext\php_mysqli.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: C:\xamp\php\ext\mysqli (The specified module could not be found.), C:\xamp\php\ext\php_mysqli.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: C:\xamp\php\ext\pdo_mysql (The specified module could not be found.), C:\xamp\php\ext\php_pdo_mysql.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: C:\xamp\php\ext\pdo_mysql (The specified module could not be found.), C:\xamp\php\ext\php_pdo_mysql.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: C:\xamp\php\ext\pdo_sqlite (The specified module could not be found.), C:\xamp\php\ext\php_pdo_sqlite.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: C:\xamp\php\ext\pdo_sqlite (The specified module could not be found.), C:\xamp\php\ext\php_pdo_sqlite.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'php_openssl.dll' (tried: C:\xamp\php\ext\php_openssl.dll (The specified module could not be found.), C:\xamp\php\ext\php_php_openssl.dll.dll (The specified module could not be found.)) in Unknown on lin
    e 0
    
    Warning: PHP Startup: Unable to load dynamic library 'php_openssl.dll' (tried: C:\xamp\php\ext\php_openssl.dll (The specified module could not be found.), C:\xamp\php\ext\php_php_openssl.dll.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'php_ftp.dll' (tried: C:\xamp\php\ext\php_ftp.dll (The specified module could not be found.), C:\xamp\php\ext\php_php_ftp.dll.dll (The specified module could not be found.)) in Unknown on line 0
    
    Warning: PHP Startup: Unable to load dynamic library 'php_ftp.dll' (tried: C:\xamp\php\ext\php_ftp.dll (The specified module could not be found.), C:\xamp\php\ext\php_php_ftp.dll.dll (The specified module could not be found.)) in Unknown on line 0
    PHP Warning:  Cannot open 'C:\xamp\php\extras\browscap.ini' for reading in Unknown on line 0
    
    Warning: Cannot open 'C:\xamp\php\extras\browscap.ini' for reading in Unknown on line 0
    
       Illuminate\Database\QueryException  : could not find driver (SQL: select * from information_schema.tables where table_schema = test and table_name = migrations)
    
      at C:\laragon\www\basic\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
        660|         // If an exception occurs when attempting to run a query, we'll format the error
        661|         // message to include the bindings with SQL, which will make this exception a
        662|         // lot more helpful to the developer instead of just the database's errors.
        663|         catch (Exception $e) {
      > 664|             throw new QueryException(
        665|                 $query, $this->prepareBindings($bindings), $e
        666|             );
        667|         }
        668|
    
      Exception trace:
    
      1   PDOException::("could not find driver")
          C:\laragon\www\basic\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
    
      2   PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=test", "root", "", [])
          C:\laragon\www\basic\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
    
      Please use the argument -v to see more details.
    
       Whoops\Exception\ErrorException  : Cannot open 'C:\xamp\php\extras\browscap.ini' for reading
    
      at Unknown:0
        1|
    
    

  • | 34 points

    @A-V
    do u create project with laragon ?


  • | 38 points

    enable bz2, curl and other extension on php.ini
    to enable ext, remove semicolon (;)
    dont forget to relaunch php
    0_1534175430845_Screenshot (4).png


  • | 1896 points

    @kudbjl no i have my own project


  • | 1896 points

    @Lycantant i did but didn't work either


  • | 34 points

    1. install laragon then
    2. create project

    as i see ur directory stucture like not from laragon.


  • | 1896 points

    @kudbjl i done that already and it gives me the same error and i don't know why it point at the old xampp directory

    Warning: Cannot open 'C:\xamp\php\extras\browscap.ini' for reading in Unknown on line 0
    

  • | 1896 points

    I just solved by clear installation and edit the PHP Path in windows then worked like a charm thanks guys


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.