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

hakre
  • 193,403
  • 52
  • 435
  • 836
Reem
  • 1,439
  • 2
  • 18
  • 21

1 Answers1

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

Rudi Visser
  • 21,350
  • 5
  • 71
  • 97
  • 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` :( – Reem Jun 01 '11 at 12:29
  • 4
    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? – Rudi Visser Jun 01 '11 at 12:31
  • 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 :( – Reem Jun 01 '11 at 22:21
  • 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 :) – Reem Jun 02 '11 at 13:05
  • No problem. Sorry btw, I didn't see your first reply 15 hours ago! – Rudi Visser Jun 02 '11 at 14:02