First of all , thanks for your help! I am a beginer to the Linux and PHP. All the steps I have done is as follow:
./ext_skel --extname=mymodule --proto=myfunc (here I got a template of module) vi config.m4 ( I just delete three of "dnl") vi mymodule.c ( I just edit my func,that func just return a word) ./buildconf ./configure --enable-mymodule make (no problem here) ./buildconf (to install) ./configure --enable-mymodule --with-apax=/usr/sbin/apxs --with-config-file- path=/etc make make install (till now there is no problem) I writed a file to test. The content is : <?php echo myfunc("hello world"); ?> then I run "./php -f test.php" under the dir of php's source code I got "hello world" at last I visit the "test.php" file by remote pc and I got fatel error: undefined function ......... how should I do now???? my os is redhat 7.2 my pc is P4 1.5G 128M "Rasmus Lerdorf" <[EMAIL PROTECTED]> ??????:[EMAIL PROTECTED] > Is your module under the ext/ directory in the PHP source tree? I would > assume so from your configure flags. In that case, did you run > ./buildconf in the top PHP directory to make sure your configure flag was > added? ie. If you type: ./configure --help is your flag listed? > > And, are you sure your config.m4 file is correct? > > And in your extension, is your module_entry struct correct, do you have an > MINFO function that actually puts something in the phpinfo() output? > > Basically all sorts of stuff could have gone wrong. Your best bet is > probably to put your extension up somewhere and let one of us have a look > at it. > > -Rasmus > > On Wed, 27 Mar 2002, gxlzlu wrote: > > > I have built my extention for php4. There is not any error during compiling. > > PHP4 can work when I use "php -f test.php". So I try to install it to my > > Redhat7.2 system with apache.All my operation is followed: > > (after compile the php4) > > ./killall httpd > > > > ./configure --enable-mymodule --with-apax=/usr/sbin/apxs --with-config-file- > > path=/etc > > > > ./make > > > > ./make install > > > > cp php.ini-dist /etc/php.ini > > > > (start apache again) > > > > The test.php file likes this: > > <?php > > echo my_func() > > ?> > > the func "my_func" only return "hello world". but when I access it by > > IE(another pc),I got "fatel error: undefined func....." > > > > > > And I use "phpinfo()" to test. I found the new version has been installed > > but not support my module. And the configure section show it has "enable" my > > module. Why???? > > Thanx! > > > > > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php