Loading or identifying extension directory of dll in windows

phpinfo() output for sqlite3 support3
PHP stores all the dlls inside the extension directory in window system. The dlls are loaded from here ( the directory ) based on the setting of php.ini file. Many times one can get the error message saying extension not found. So after installation of PHP the best way to identify the extension directory is to open php info file and check for all the settings.

In the php info display it will be written where the extension file of the system is stored. It is also known as extension_dir . The picture below is the screen shoot of the php info display and the portion explaining the extension directory is shown.
The php.ini file located inside windows folder ( or inside php folder ) can be edited to change the extension directory location. The location of php.ini file also can be collected from php info display. Inside the php.ini file there is a line saying like this.
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php_new\ext"
Change the above line to point to correct extension directory path. After showing the path inside php.ini file below the above line there will be all dlls listing and any dll can be added or removed by commenting or removing the comment before it. Here is some listing examples.

You can see three .dlls are in use. The comments lines are removed. This is the way we add or remove extensions for PHP.

Checking extension loaded or not

We can check the status of the extension by using extension_loaded() function. Here is a sample code to check gd extension.
if (extension_loaded('gd')) {
echo "<br>GD support is  loaded ";
echo "<br>GD support is NOT loaded ";
Note that these all are in window platform.
ini_loaded_file():Path of php.ini file Collect all PHP settings by phpinfo()
Introduction to PHP
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net




    What about Linux systems? I'm using LAMP. Working on linux mint os and apache web server. How to enable gd support in Lamp?

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer