How can i compile a separate module manually

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

 



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 a extension module by this way?

Thanks.

-- 
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