Extension php on windows 10


  • | 273 points

    Good evening, I have a few problems with php extension. For example see this screenshot.

    alt text

    I also checked the .dll extension inside the etc folder in php. Here the screenshot

    alt text

    FYI Im running windows 10 and i need to enable this extension

    • BCMath PHP Extension
    • Ctype PHP Extension
    • Fileinfo PHP Extension
    • JSON PHP Extension
    • Mbstring PHP Extension
    • OpenSSL PHP Extension
    • PDO PHP Extension
    • Tokenizer PHP Extension
    • XML PHP Extension

  • | 1735 points

    I suggest you get rid of the spaces, and check the ""

    0_1627905113320_upload-a13865a4-2ee3-4a53-bce1-bf397d516349


  • | 273 points

    Sorry can you elaborate, i dont quite understand the spaces and check the "" part.

    Inside my bin php i only have 1 file php_pdo_oci.dll, i dont have pdo_oci


  • | 16349 points

    @einnlleinhatt to enable extensions with Laragon you don't need to edit the php.ini manually, you can use the built-in Extensions tool (Menu > PHP > Extensions > tick the required ones)

    0_1627925473569_upload-bb4b7714-9ab8-4600-86d0-c5c136bb417e

    If you have already tried to manually add extensions in your php.ini comment them out using a ;

    Note: If you are using PHP 8 you need to use Laragon 5.


  • | 273 points

    I dont use php8, i use the default php version built in with laragon 5. I think its php ver 7.4 something.

    I tried to enable from that quick extension setting but if you see the screenshot i posted above it said unable to load the pdo_oci something something.


  • | 16349 points

    @einnlleinhatt yes, pdo_oci is corrupt, probably in your php.ini file, it needs to be commented out.

    Alternatively, download the latest version of PHP 7.4 (7.4.22) VC15 x64 Thread Safe (2021-Jul-28 13:25:43). Laragon will auto-generate a clean version of php.ini when you switch to it. See [Tutorial] How to add another PHP version (PHP 7.4 - PHP 8.0) - Updated


  • | 273 points

    @Pen-y-Fan the pdo_oci is still not working.

    alt text

    I alrd changed to PHP 7.4.22 VC15 x64TS


  • | 16349 points

    @einnlleinhatt Ok, that's interesting 🤔.

    I run the same command on my windows 10 laptop and had the same error!

    λ php -r "print_r(get_loaded_extensions());"
    
    Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: C:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/ext\pdo_oci (The specified module could not be found.), C:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/ext\php_pdo_oci.dll (The specified module could not be found.)) in Unknown on line 0
    ....
    

    After a quick google, I found this SO: PHP unable to load dynamic library “php_pdo_oci.dll”, it looks like you need to install additional Oracle software for this extension to work.

    I hope this helps.


  • | 273 points

    @Pen-y-Fan can you help me with a link ? I tried to install Oracle Client Instant or something like that stil got the same error.


  • | 16349 points

    @einnlleinhatt welcome to the joy of development!

    According to the SO answer, you need to follow the instructions:

    The ..._oci.dll is part of the Oracle C Interface. Unless you need to use Oracle, I suggest you go to the relevant line inside the php.ini file and uncomment the loading of this extension...

    Note: After you choose your operational system (Windows as in your answer) in download section you will see the installation guide in foot notes of the next page. For others OSs this process will work the same way.

    If that doesn't work, you need to google your specific problem or post on an Oracle forum, where experts on the client will help. "How do I enable Oracle clients to work with PHP on Windows" or similar searches. Sometimes people post articles, blogs or YouTube videos with step by step guides. It doesn't matter if is for Laragon, XAMPP or WAMP, the Oracle client will be the same.

    Happy searching 😊


Log in to reply
 

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