0

I've got a 64bit server with CentOS 6 and PHP 5.3 installed

php-5.3.2-6.el6_0.1.x86_64

I've installed xapian using RPMs from their website

rpm-eprints-org-xapian-6-1.noarch
xapian-bindings-php-1.2.7-1.x86_64
xapian-core-libs-1.2.7-1.x86_64
xapian-bindings-1.2.7-1.x86_64
xapian-core-1.2.7-1.x86_64

Now when I try to use the xapian library from PHP through Apache, I get this error:

Call to undefined function dl() in /usr/share/php/xapian.php on line 22

After some Googleing I found that dl() is no longer working in PHP 5.3+. I've enabled enable_dl in php.ini, didn't do anything. I've not been able to find any solution to this problem anywhere. I guess there aren't many people using CentOS 6 at the moment?

What can I do?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134

1 Answers1

0

Since the xapian-bindings are a PHP-extension you could just load it by adding the following to your php.ini:

extension = xapian.so

Btw. the dl-manual says that dl is just disabled for certain "SAPIs" (and apparently mod_php is one of them).

One alternative would be to try php-cgi.

vstm
  • 12,407
  • 1
  • 51
  • 47
  • thank you for your answer, i've added that line to the php.ini. however it generated this error PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xapian.so' - /usr/lib64/php/modules/xapian.so: undefined symbol: zend_error_noreturn in Unknown on line 0 –  Nov 30 '11 at 03:31
  • It seems like your extension is built for php 5.1 or 5.2. [This SO-question might give you a clue on how to resolve this](http://stackoverflow.com/questions/2556113/swig-generated-code-fails-to-run-on-php-5-3-2-undefined-symbol-zend-error-noret) although you probably have to compile the extensions manually. – vstm Nov 30 '11 at 10:09