Jason Barnett wrote:
> >
> > Now when I say
> > ../sapi/cli/php -f ext/foo/foo.php
> >
> > I get this error:
> >
> > Warning: dl(): Unable to load dynamic library
>
> Were you actually trying to dl() the library in your PHP code?  If you
> compiled the extension into PHP this shouldn't be necessary.  In fact,
> unless you build an extension to be a DSO you shouldn't be able to use
> dl() with that extension anyways!
>
This is actually my first venture to PHP extensions.  I am trying to
write a simple C function, which prints 'hello world', as a PHP
extension.

I defined a helloworld.proto as:
int helloworld() prints hello, world

executed ext_skel, and followed the remaining steps that it showed
on-screen, including editing config.m4.

> > '/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/foo.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/foo.php on line 8
> > <br>
> > Module foo is not compiled into PHP
> > [EMAIL PROTECTED] php-4.3.10]$
> >

I'm sorry my previous mail appeared twice - I was confused by a
majordomo reply saying 'Commands not understood'.

Thanks,
Deepak

--
N Deepak || http://www.ndeepak.info/

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



Reply via email to