Bonjour, j'essaye de cr�er une extension php. pour se faire, il faut telecharger le code source de php et suivre les indications de cette page: http://www.php.net/manual/fr/zend.build.php donc, ./ext_skel --modulename se passe bien je fait une modif the conf.m4 (il est tout a la fin de ce mail)
voila mon ./configure --help : tout se passe bien [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ ./configure --help | grep -i spider --enable-spider Enable spider support [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ ensuite, make (j'ai pas tout mis mais ilne me semble pas avoir d'erreur : gcc -Iext/spider/ -I/home/pierre/phpsource/php-4.3.9/ext/spider/ -DPHP_ATOM_INC -I/home/pierre/phpsource/php-4.3.9/include -I/home/pierre/phpsource/php-4.3.9/main -I/home/pierre/phpsource/php-4.3.9 -I/home/pierre/phpsource/php-4.3.9/Zend -I/home/pierre/phpsource/php-4.3.9/ext/xml/expat -I/home/pierre/phpsource/php-4.3.9/TSRM -g -O2 -c /home/pierre/phpsource/php-4.3.9/ext/spider/spider.c -o ext/spider/spider.o && echo > ext/spider/spider.lo comme fait dans le tutoriel, je fait tourner le script php qui se trouve dans le dossier de mon extension: [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ php -f ext/spider/spider.php Warning: dl(): Unable to load dynamic library '/usr/lib/php4/20020429/spider.so' - /usr/lib/php4/20020429/spider.so: cannot open shared object file: No such file or directory in /home/pierre/phpsource/php-4.3.9/ext/spider/spider.php on line 3 Functions available in the test extension:<br> Warning: Invalid argument supplied for foreach() in /home/pierre/phpsource/php-4.3.9/ext/spider/spider.php on line 8 <br> Module spider is not compiled into PHP [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ donc, marche pas, je regarde dans le dossier si il y a quand meme spider.so mais non, par contre il y a des traces de compilation puisque spider.o y est.... [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ ls ext/spider/ CREDITS EXPERIMENTAL config.m4 php_spider.h spider.c spider.lo spider.o spider.php tests [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ oubli� qq chose dans config.m4 ??? un truc du tutoriel ?? http://www.php.net/manual/fr/zend.build.php *help* please !! :) merci d'avance et pardon pour le flood mais il me semblait necessaire :) Pierre. ------------------------------------------------------------------------------------------------------------------------------ config.m4 PHP_ARG_ENABLE(spider, whether to enable spider support, [ --enable-spider Enable spider support]) if test "$PHP_SPIDER" != "no"; then dnl Write more examples of tests here... dnlPHP_EXTENSION(spider, $ext_shared) dnl # --with-spider -> check with-path dnl SEARCH_PATH="/usr/local /usr" # you might want to change this dnl SEARCH_FOR="/include/spider.h" # you most likely want to change this if test -r $PHP_SPIDER/; then # path given as parameter SPIDER_DIR=$PHP_SPIDER dnl else # search default path list dnl AC_MSG_CHECKING([for spider files in default path]) dnl for i in $SEARCH_PATH ; do dnl if test -r $i/$SEARCH_FOR; then dnl SPIDER_DIR=$i dnl AC_MSG_RESULT(found in $i) dnl fi dnl done dnl fi dnl if test -z "$SPIDER_DIR"; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([Please reinstall the spider distribution]) fi dnl # --with-spider -> add include path dnl PHP_ADD_INCLUDE($SPIDER_DIR/include) dnl # --with-spider -> check for lib and symbol presence LIBNAME=spider # you may want to change this LIBSYMBOL=spider # you most likely want to change this PHP_NEW_EXTENSION(spider, spider.c, $ext_shared) fi

