I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that?
The steps:
- Decompress the php source code and change directory to
ext/ext_name phpizeconfiguremake- move manually the "ext_name.so" file from "../.lib" directory to "extension_dir" specified in "php.ini" file. (or do
make install) - restart web service
Is there something missing? I need to enable a certain extension in php and there's no way to recompile the whole php version..
If the .so is properly compiled etc, and it's in your extension dir, then you need to add the following line also:
extension=NAME.so
This will force the loading. At this point, provided there is actually something to display, it will show in phpinfo().
来源:https://stackoverflow.com/questions/6200994/how-to-enable-php-extension-using-phpize