2012年8月28日 星期二

2012年7月19日 星期四

[Embedded] "Dynamic Library support not available" in PHP

最近寫PHP extension發現在x86上面跑得很好,但是拿到目標版上就沒反應了,startup_errors也沒有報錯,只好比較一下PHP information(php -i),發現目標版上的phpinfo有一行很詭異
Dynamic Library support not available
.
google了一下才知道原來是dlopen沒找到,因此無法順利載入shared library,解決方法就是

1.修改(增加)PHP的Makefile如下
1 LDFLAGS += -ldl    
2.修改(增加)/path/to/main/php.h如下
 22 #define HAVE_LIBDL 1         
3.修改/path/to/ext/standard/dl.c
 31 #if defined(HAVE_LIBDL)
 32 #include <stdlib.h>
 33 #include <stdio.h>
 34 #ifdef HAVE_STRING_H
to
 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日 星期二

[阿宅專區] iData Forum

最近又開始逛起web development的文章,發現對岸的技術能力和簡報內容與日俱增,比如說我之前看到淘寶技術嘉年華,或是淘寶其他的分享,都是不錯的內容

不過我真正想說的是,由於對岸的用戶規模夠大,因此需要更深入技術才能因應,而反倒是我們常常在追求新技術,卻還沒有基本盤的支撐,而流於僅是技術的交流,少了一些實務經驗,是否我們應該更專注於小而美的應用?

2012年7月16日 星期一

[課外活動] COSCUP 2012

好久沒參加大拜拜了,今天又是一年一度的COSCUP的活動報名,看來報名網站被DDoS打掛了...



好險有報到名 XD

/** update @ 2012-07-16, 20:20 **/
報名結束了 @@a

[阿宅專區] The Linux Programming Interface

The Linux Programming Interface 是我認為繼 Advanced Programming in the UNIX Environment 以來寫的最好的一本Linux programming的書,不過我還沒買實體書... :~

[胡言亂語] 無緣

最近某3C通路商大打廣告,紀念一下無緣的M420SL-TW


2012年7月11日 星期三

[Tips] How to unlock a secured PDF document

If your PDF document could not be printed under Windows environment

1.Start your Ubuntu/Fedora/OpenSUSE
2.Open PDF document by evince/xpdf/kpdf/gv
3.Print the PDF document to another file

The file is not secured and could be printed