I checked man php
and output of php -h
, but I didn't seem to find such thing.
But I remember seeing it somewhere, you could do something like php -Xabc.so script.php
to load an extension temporarily.
Anyone know that?
Go to your php. ini file and add the following line: extension=<extension_name>. dll. To verify that the extension was loaded properly, go to Setup | Extensions and locate the extension from the list.
If your server only has a single PHP version installed, you can run this PHP command anywhere, and it will give you the same list of modules. The general command we will be using is php -m. This command will give you the full list of installed PHP modules/extensions.
php file extension refers to the name of a file with a PHP script or source code that has a ". PHP" extension at the end of it. It's similar to a Word file with a . doc file extension.
Loading a regular extension via CLI is done with:
php -dextension=abc.so myfile.php
If your extension is not in the default path you can provide an absolute path as well:
php -dextension=/path/to/abc.so myfile.php
To load a Zend extension, it'd advisable to always pass an absolute path:
php -dzend_extension=/path/to/abc.so myfile.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With