These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
|||||||||||||||||||||||||||||||||||||||||||||||
# /sbin/service spamassassin start spamd を起動中: child process [11039] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588. [失敗]
# sa-update # /sbin/service spamassassin start spamd を起動中: [ OK ] # /sbin/chkconfig spamassassin on/home/yoya は復旧したので設定回りは残ってるはずなんだけど、 機能しない。見直そう。。
PHP_MINIT_FUNCTION(glut) { <略> call_backs = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(call_backs, 0, NULL, ZVAL_PTR_DTOR, 0); menu_callbacks = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(menu_callbacks, 0, NULL, ZVAL_PTR_DTOR, 0); menu_entry_callbacks = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(menu_entry_callbacks, 0, NULL, ZVAL_PTR_DTOR, 0); return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(glut) { zend_hash_destroy(call_backs); efree(call_backs); zend_hash_destroy(menu_callbacks); efree(menu_callbacks); zend_hash_destroy(menu_entry_callbacks); efree(menu_entry_callbacks); return SUCCESS; }いやいや、ありえんてー。対応取れてないやん。
PHP_RINIT_FUNCTION(glut) { call_backs = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(call_backs, 0, NULL, ZVAL_PTR_DTOR, 0); menu_callbacks = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(menu_callbacks, 0, NULL, ZVAL_PTR_DTOR, 0); menu_entry_callbacks = (HashTable*)emalloc(sizeof(HashTable)); zend_hash_init(menu_entry_callbacks, 0, NULL, ZVAL_PTR_DTOR, 0); return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(glut) { zend_hash_destroy(call_backs); efree(call_backs); zend_hash_destroy(menu_callbacks); efree(menu_callbacks); zend_hash_destroy(menu_entry_callbacks); efree(menu_entry_callbacks); return SUCCESS; }修正しました。glut を有効にしてるだけで apache が seg.fault する問題は解決するかな。
PHP_MINIT_FUNCTION(opengl) <略> // initialize other modules glu_init(module_number); #ifdef PHP_OPENGL_OSMESA osmesa_init(module_number); #endif return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(opengl) { if (select_buffer != NULL) efree(select_buffer); if (glget_mask != NULL) efree(glget_mask); // shutdown other modules glu_request_shutdown(); #ifdef PHP_OPENGL_OSMESA osmesa_request_shutdown(); #endif return SUCCESS; }これも同様ですね。
PHP_RINIT_FUNCTION(opengl) { // initialize other modules glu_init(module_number); #ifdef PHP_OPENGL_OSMESA osmesa_init(module_number); #endif return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(opengl) { if (select_buffer != NULL) { efree(select_buffer); select_buffer = NULL; } // shutdown other modules glu_request_shutdown(); #ifdef PHP_OPENGL_OSMESA osmesa_request_shutdown(); #endif return SUCCESS; } PHP_MSHUTDOWN_FUNCTION(opengl) { if (glget_mask != NULL) efree(glget_mask); }修正 done っと。
BYREF_... は PHP4 extension の引数定義に使うもので、 PHP5 では ZEND_BEGIN_ARG_INFO を使うらしい。 とりあえず、全部 NULL に define する。 (リフレクションに問題あるらしいけど、そんなの後あと)PHP は関数の引数を参照で渡す場合、Cスタイルの「呼ぶ(渡す)側で &」でなく、
>|php| $a = array('this' => 'test'); ||<のように記述するが、
>|php| $a = array('this' => 'test'); |<<のように間違えると、その引用を含めその下が表示されなくなる。
PHP_MINIT_FUNCTION(opengl) { <略> glget_mask = (char*)emalloc((glget_max+1) * sizeof(char)); <略> } PHP_MSHUTDOWN_FUNCTION(opengl) { if (glget_mask != NULL) efree(glget_mask); return SUCCESS; }いや。。。それは落ちるってば。
PHP_MINIT_FUNCTION(opengl) { <略> glget_mask = (char*)pemalloc((glget_max+1) * sizeof(char), 1); <略> } PHP_MSHUTDOWN_FUNCTION(opengl) { if (glget_mask != NULL) pefree(glget_mask, 1); return SUCCESS; }
Warning: dbusconnection::sendwithreplyandblock(): dbus_connection_send_with_reply_and_block() failed (The name com.Skype.API was not provided by any .service files) in /home/dev/php-skype-0.1.1/Skype.php on line 106 こんなエラーが出てしまうのですが、原因わかりませんか?com.Skype.APIが何なのか理解できてない感じでしょうか…?このエラーは dbus のシステム自体は機能していて、
env DISPLAY=localhost:1 php skype_bot.php自分は、こんな感じで動かしてます。
$im = imagecreatefromgif($giffile); if ($im === false) { echo "$giffile is not GIF file\n"; exit (1); } $colormap_num = imagecolorstotal($im); $transparent_index = imagecolortransparent($im); $colormap = ''; if ($transparent_index < 0) { for ($i = 0 ; $i < $colormap_num ; $i++) { $rgb = imagecolorsforindex($im, $i); $colormap .= chr($rgb['red']); $colormap .= chr($rgb['green']); $colormap .= chr($rgb['blue']); } } else { for ($i = 0 ; $i < $colormap_num ; $i++) { $rgb = imagecolorsforindex($im, $i); $colormap .= chr($rgb['red']); $colormap .= chr($rgb['green']); $colormap .= chr($rgb['blue']); $colormap .= ($i == $transparent_index)?chr(0):chr(255); } } $indices = ''; $i = 0; $width = imagesx($im); $height = imagesy($im); for ($y = 0 ; $y < $height ; $y++) { for ($x = 0 ; $x < $width ; $x++) { $indices .= chr(imagecolorat($im, $x, $y)); $i++; } while (($i % 4) != 0) { $indices .= chr(0); $i++; } } $format = chr(3); // palett format $content = pack('v', $image_id).$format.pack('v', $width).pack('v', $height); $content .= chr($colormap_num - 1).gzcompress($colormap.$indices); if ($transparent_index < 0) { $tagCode = 20; // DefineBitsLossless } else { $tagCode = 36; // DefineBitsLossless2 }これで、$content に Lossless 形式のデータ(image_id混み))が入ります。
WindowsにViretualBoxを入れ、そこから仮想マシン(Ubuntu)を立ち上げそこから全部操作していました。 ですので同じX Server上で動作していると思うのですが…。Skype を起動したのと同じ terminal で PHP を起動してエラーになるのであれば、僕の予想は外れです。