PHP can't find it's extensions - which are there!


  • | 459 points

    Hi,

    I have a project which needs the brand newest version of php so I have downloaded and put this version here: /c/laragon/bin/php/php-7.4.5-nts-Win32-vc15-x64

    Now if I run php I get:

    $ php
    PHP Warning: PHP Startup: Failed to load ./php_curl.dll, The system cannot find the file specified.
    in Unknown on line 0
    PHP Warning: PHP Startup: Failed to load ./php_gd2.dll, The system cannot find the file specified.
    in Unknown on line 0
    PHP Warning: PHP Startup: Failed to load ./php_mbstring.dll, The system cannot find the file specified.
    in Unknown on line 0
    PHP Warning: PHP Startup: Failed to load ./php_openssl.dll, The system cannot find the file specified.
    in Unknown on line 0
    PHP Warning: PHP Startup: Failed to load ./php_pdo_mysql.dll, The system cannot find the file specified.
    in Unknown on line 0
    PHP Warning: PHP Startup: Failed to load ./php_pdo_sqlite.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_curl.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_gd2.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_mbstring.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_openssl.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_pdo_mysql.dll, The system cannot find the file specified.
    in Unknown on line 0

    Warning: PHP Startup: Failed to load ./php_pdo_sqlite.dll, The system cannot find the file specified.
    in Unknown on line 0

    And all these extensions are in /ext under the directory where I put php. The path to that is in system path in windows 10,. What am I missing?

    Thanks,

    Ale


  • administrators
    | 123470 points

    @marysmeals : You should run it in Laragon's Terminal: Menu > Laragon > Terminal


  • | 793 points

    If , as suggested you use the Laragon terminal because it will detect the version of PHP that is selected for Laragon, and there is a easy-peasy select list for extensions to enable.

    The reason you are probably getting errors is because you are running the Windows command prompt, and you may have to use composer install and select new version of php during install, make sure your path variables are set, then also go into the php folder and edit your php.ini end enable extensions.
    But this will probably cause more issues, try doing everything for development within the Laragon environment and it should work well.


Log in to reply
 

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