2012年8月28日 星期二
2012年7月19日 星期四
[Embedded] "Dynamic Library support not available" in PHP
最近寫PHP extension發現在x86上面跑得很好,但是拿到目標版上就沒反應了,startup_errors也沒有報錯,只好比較一下PHP information(php -i),發現目標版上的phpinfo有一行很詭異
1.修改(增加)PHP的Makefile如下
重新編譯,再執行一次php -i
Dynamic Library support not availablegoogle了一下才知道原來是dlopen沒找到,因此無法順利載入shared library,解決方法就是
.
1.修改(增加)PHP的Makefile如下
1 LDFLAGS += -ldl2.修改(增加)/path/to/main/php.h如下
22 #define HAVE_LIBDL 13.修改/path/to/ext/standard/dl.c
31 #if defined(HAVE_LIBDL) 32 #include <stdlib.h> 33 #include <stdio.h> 34 #ifdef HAVE_STRING_Hto
31 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H 32 #include <stdlib.h> 33 #include <stdio.h> 34 #include <dlfcn.h> 35 #ifdef HAVE_STRING_H
重新編譯,再執行一次php -i
Dynamic Library Support => enabled搞定!!
2012年7月17日 星期二
2012年7月16日 星期一
[阿宅專區] The Linux Programming Interface
The Linux Programming Interface 是我認為繼 Advanced Programming in the UNIX Environment 以來寫的最好的一本Linux programming的書,不過我還沒買實體書... :~
訂閱:
文章 (Atom)



