Reply to Re: Unable to load extension (was Re: PHP to C interface?)

Your name:

Reply:


Posted by N Deepak on 02/22/05 07:29

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
> > [deep@deepak-linux 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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация