Thursday, January 24, 2008

PHP Shared Object


We recently purchased the PHP shared object from you guys and are having problems getting it running. We are using PHP 5.2.5 on Red Hat Linux 9, and are getting the following error when we try to dynamically link your library:

Warning: dl(): unable to load dynamic library './' -
undefined symbol: zend_list_find

Any ideas? Let me know if you need more info or if I need to be addressing this question to RTR. Also, if we can't get this to work fairly easily, would we have the option of "trading" this PHP .so for your C callable object?


As I understand it, things are supposed to work like this:

 - you put in a place in your file system that is both
   - readable by your web server
   - not accessible by the world or the world can steal it

 - you use the dl() primative in PHP to load the extension, like so:

    if (!extension_loaded('mhdrg')) {
        if (!dl('')) {  // this should be in a protected directory
When I deliberately move on our test system, I get the following error:

Warning: Unable to load dynamic library './' - ./ cannot open shared object file: No such file or directory in /home/mnh/public_html/PHP/tryit.php on line 5

So I am guessing that wherever you have put is not readable by the user your web server runs as. Have you put in the same document directory as your document? If not, you could trying putting tryit.php and in the same document directory and confirming that tryit.php works on your systems.

That said, we would be happy to exchange your PHP shared object for a C-callable object if that works better for you.