4

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:

  1. Decompress the php source code and change directory to ext/ext_name
  2. phpize
  3. configure
  4. make
  5. move manually the "ext_name.so" file from "../.lib" directory to "extension_dir" specified in "php.ini" file. (or do make install )
  6. 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..

1 Answer 1

6

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().

Sign up to request clarification or add additional context in comments.

5 Comments

I did that, but the only result I got is a warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/php/modules/xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0 :(
This means that the module you just compiled is dependent on the PHP DOM module, you also need to enable this (before you enable xsl.so). Are you building the module for the right version of PHP?
What do you mean by "the right version of PHP?" I downloaded php source with the same version as the one already installed.. I tried the same steps with DOM but again I saw no changes in phpinfo() so I can't tell if DOM was enabled or not :(
Thank you for your help, I re-did the process again after I deleted all the previous generated files.. FIRST: Do the steps for dom extension including adding extension=dom.so in php.ini file, SECOND: Do the steps for xsl extension and add extension=xsl.so after the previous line.. restart httpd.. phpinfo() says that xsl in enabled.. Thanks again :)
No problem. Sorry btw, I didn't see your first reply 15 hours ago!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.