[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] How can I compile my extension module as a dynamically loadable module manually
From:       <yingyuan () staff ! sina ! com ! cn>
Date:       2004-11-25 6:04:05
Message-ID: 002d01c4d2b4$91e9c760$610ada0a () chengyingyuan
[Download RAW message or body]

I downloaded php-4.3.9.tar.gz and compiled it in FreeBSD 5.2, the steps I
followed as below:
1) tar zxvf php-4.3.9.tar.gz
2) cd php-4.3.9
3) ./configure --with-ftp
4) cd ext
5)
cc -fpic -DCOMPILE_DL=1 -I/usr/local/include -I. -I.. -I../Zend -I../main -I
../TSRM -c -o ftp.o ftp/php_ftp.c
6) cc -shared -L/usr/local/lib -rdynamic -o ftp.so ftp.o
Up to now, no error happened.
Then I made a example file named test.php as following:

<?php
dl("ftp.so");        // Load my manually compiled module ftp.so
?>

When I executed the file test.php(php -f test.php),  error happened:

Warning: dl(): Invalid library (maybe not a PHP library) 'ftp.so'  in
/usr/home/yingyuan/src/php-4.3.9/ext/test.php on line 2

What makes such error? And How can I compile an extension module by this
way?

-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic