Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Community
Technology
[PHP] How to install a PHP extension
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="7r1n17y" data-source="post: 412687" data-attributes="member: 76124"><p><strong><span style="font-size: 22px">What are PHP extensions?</span></strong></p><p><span style="font-size: 12px">PHP extensions are compiled libraries that enable certain functions that you can use during your script.</span></p><p><span style="font-size: 12px"></span></p><p><strong><span style="font-size: 22px">How do i install a PHP extension?</span></strong></p><ol> <li data-xf-list-type="ol"><span style="font-size: 12px">Download the application extension file to copy to your php extensions directory. If you can not locate the extensions directory if you go to your php.ini file and search 'extension_dir' and it will show the complete path to the extension directory. If you can not locate you php.ini file just execute this php code [PHP]<?php echo phpinfo(); ?>[/PHP] and look and see what configuration file is being loaded and where it is being loaded. You can download the application extension files from <a href="https://pecl.php.net/" target="_blank">https://pecl.php.net/</a>. Just search the packages you want. <strong>NOTE: If your using Windows the file will be a .dll file. If you are using Unix it will be a .so file.</strong> Also Your extension directory should look similar to mines.<img src="https://image.prntscr.com/image/rsdQEs0UQhSsmw2BwBDq5Q.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></li> <li data-xf-list-type="ol"><span style="font-size: 12px">After you have downloaded the application extension and copied it to your extension directory you are gonna add it to your php.ini file so it can be loaded when your PHP terminal fires up. So you are gonna go to your php.ini file and open it and search 'extension' and keep hitting next until you something similar to `extension=php_gettext.dll`, 'extension=php_mysqli.dll', or 'extension=php_curl.dll' and then your gonna type in a new line below the other ones 'extension={filename}.dll' or 'extension={filename}.so' so php can load the extension on startup. Later on if you what to enable/disable an extension just add the semi-colon in front of it so for example ';extension={filename}.dll' is disabled and 'extension={filename}.dll' is enabled. you should be somewhere on the file that looks like.<img src="https://image.prntscr.com/image/7D-XmnkaRTqAuo_qoQJaIA.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </span></li> <li data-xf-list-type="ol"><span style="font-size: 12px">Next just clear the application pools and restart the server so PHP can reload everything including the new extension. Now if you think an extension is not just execute this php code and see if its installed [PHP]<?php print_r(get_loaded_extensions()); ?>[/PHP] and it will tell you want extensions got loaded.</span></li> </ol><p><span style="font-size: 12px">If you are having trouble installing an extension please message me.</span></p></blockquote><p></p>
[QUOTE="7r1n17y, post: 412687, member: 76124"] [B][SIZE=6]What are PHP extensions?[/SIZE][/B] [SIZE=3]PHP extensions are compiled libraries that enable certain functions that you can use during your script. [/SIZE] [B][SIZE=6]How do i install a PHP extension?[/SIZE][/B] [LIST=1] [*][SIZE=3]Download the application extension file to copy to your php extensions directory. If you can not locate the extensions directory if you go to your php.ini file and search 'extension_dir' and it will show the complete path to the extension directory. If you can not locate you php.ini file just execute this php code [PHP]<?php echo phpinfo(); ?>[/PHP] and look and see what configuration file is being loaded and where it is being loaded. You can download the application extension files from [URL]https://pecl.php.net/[/URL]. Just search the packages you want. [B]NOTE: If your using Windows the file will be a .dll file. If you are using Unix it will be a .so file.[/B] Also Your extension directory should look similar to mines.[IMG]https://image.prntscr.com/image/rsdQEs0UQhSsmw2BwBDq5Q.png[/IMG] [/SIZE] [*][SIZE=3]After you have downloaded the application extension and copied it to your extension directory you are gonna add it to your php.ini file so it can be loaded when your PHP terminal fires up. So you are gonna go to your php.ini file and open it and search 'extension' and keep hitting next until you something similar to `extension=php_gettext.dll`, 'extension=php_mysqli.dll', or 'extension=php_curl.dll' and then your gonna type in a new line below the other ones 'extension={filename}.dll' or 'extension={filename}.so' so php can load the extension on startup. Later on if you what to enable/disable an extension just add the semi-colon in front of it so for example ';extension={filename}.dll' is disabled and 'extension={filename}.dll' is enabled. you should be somewhere on the file that looks like.[IMG]https://image.prntscr.com/image/7D-XmnkaRTqAuo_qoQJaIA.png[/IMG] [/SIZE] [*][SIZE=3]Next just clear the application pools and restart the server so PHP can reload everything including the new extension. Now if you think an extension is not just execute this php code and see if its installed [PHP]<?php print_r(get_loaded_extensions()); ?>[/PHP] and it will tell you want extensions got loaded.[/SIZE] [/LIST] [SIZE=3]If you are having trouble installing an extension please message me.[/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Community
Technology
[PHP] How to install a PHP extension
Top