Re: Can't load extension (was Re: PHP to C interface?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



N Deepak wrote:
On Mon, Feb 21, 2005 at 02:08:28PM -0800, Richard Lynch wrote:

You have to "make install" your new .so file to get copied over into your
PHP extensions directory, which from the messages seems to be
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ on your system...

I'm betting you have an 'ext/foo.so' file, but it's not installed yet.


No, there's none!

[deep@deepak-linux ext]$ pwd
/home/deep/php-4.3.10/ext
[deep@deepak-linux ext]$ find . -name "*.so"
[deep@deepak-linux ext]$

I gave this find after saying './buildconf --force', './configure
--with-nscli', 'make'.

(Which is what the ext_skel script asked me to do, after editing
config.m4)

I found the problem. One has to run 'phpize' in the extension directory, and then configure/make/make install.

ext_skel doesn't mention it at all, though?

Thanks,
Deepak

To get this error:

[deep@deepak-linux php-4.3.10]$ ./sapi/cli/php -f ext/foo/nscli.php

Warning: dl(): Unable to load dynamic library
'/usr/local/lib/php/extensions/no-debug-non-zts-20020429/foo.so' -
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/foo.so: cannot
open shared object file: No such file or directory in
/home/deep/php-4.3.10/ext/foo/nscli.php on line 3
Functions available in the test extension:<br>

Warning: Invalid argument supplied for foreach() in
/home/deep/php-4.3.10/ext/foo/nscli.php on line 8
<br>
Module foo is not compiled into PHP
[deep@deepak-linux php-4.3.10]$



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux