Re: dl(): Invalid library (maybe not a PHP library)
| From: | Anas Mughal | Date: | Sat, 06 Dec 2003 07:43:03 +0000 |
| Subject: | Re: dl(): Invalid library (maybe not a PHP library) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172049@lists.php.net to get a copy of this message | ||
Okay, solved that as well.
SED environment variable was not defined!
How come I had to define it myself?! Shouldn't the build process take care of that?
Anyway, now when I try to load the extension my_ext.la in my PHP as follows:
if(!extension_loaded('my_ext')) {
dl('my_ext.la');
}
I get the following error:
Warning: dl(): Unable to load dynamic library '/usr/local/apache/htdocs/my_ext.la' - /usr/local/apache/htdocs/my_ext.la: invalid ELF header in /usr/local/apache/htdocs/my_ext.php on line 4
It is very strange to see this error. I have done all my development on one Redhat Linux box. I didn't switch OS platforms.
Please advise. Thanks.
Anas Mughal wrote:
I found one problem. I had to add "=shared" after --enable-my_ext. So, this is what I did: ./configure --enable-my_ext=shared Now, the makefile looks much better. (I have attached the Makefile.) However, I get errors in make. Those errors are generated when invoking the libtool command. .......