views:

33

answers:

3

Hi all.

My development environment:

Linux - Linux localhost.localdomain 2.6.9-42.

apache:2.2.4

php:5.2.3

I wrote a php extension hello.

when i make test it show me:

PHP Warning: Module 'hello' already loaded in Unknown on line 0

PHP Warning: Module 'hello' already loaded in Unknown on line 0

I check the php.ini , there is just one line extension=hello.so.

I delete extension=hello.so in php.ini, then make test successfully, but the hello module isn't loaded by webserver process.

What should i do?

A: 

I think to remember the error message is actually misleading, in my case (a while ago) I had a similar message because of a link problem inside the module.

greg
Thanks.yea,I wrote a shared library php_help which linked against thestatic libraries boost_date_time.a and boost_thread.a and linked hello.so against libphp_help.so.when i execute command make for php_help, gcc show me the warning message *** Warning: Linking the shared library libphp_help.la against the*** static library /usr/local/lib/libboost_date_time.a is not portable!*** Warning: Linking the shared library libphp_help.la against the*** static library /usr/local/lib/libboost_thread.a is not portable!What does it mean?
Vector.Lee
I can`t find the file libphp_help.a after command make finished.But libphp_help.a will be created in folder /usr/local/lib when i execute command make install.I think something is wrong.php_help`s makefile.am:AUTOMAKE_OPTIONS=foreignlib_LTLIBRARIES=libphp_help.laINCLUDES=-I/usr/local/include/boost-1_43 -I./includelibphp_help_la_SOURCES=./src/php_help.cpp\ ./src/log.cpplibphp_help_la_LIBADD=/usr/local/lib/libboost_date_time.a /usr/local/lib/libboost_thread.a -lpthread
Vector.Lee
A: 

It's a harmless warning, but I usually see this when people have the same INI file being processed multiple times (for example, if they have it symlinked somewhere under "Scan this dir for additional .ini files")

TML
Thanks. What`s files will include php.ini? I found just one php.ini file in my disk.
Vector.Lee
A: 

It looks like nobody will view this question anymore, so i will say what i think. Make test will start up the php and loaded the make extension file which is not in the dir declared in php.ini. There must be another extension file which in the dir declared in php.ini is already loaded by php. so php loaded two extensions with the same name.

Vector.Lee