These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
||||||||||||||||||||||||||||||||||||||||||||||
<br /> <b>Fatal error</b>: Cannot use object of type stdClass as array in <b>/var/www/sites/rhythm.kayac.com/lib/classes/MyTwitterOAuth.php</b> on line <b>19</b><br />えーっと…
[PropelException] [wrapped: connect failed [Native Error: Too many connections] [User Info: Array]] stack trace 1.at () in SF_ROOT_DIR/vendor/pear/php/symfony/vendor/propel/Propel.php line 489 ... 486. try { 487. $con = Creole::getConnection($dsn); 1. } catch (SQLException $e) { 1. throw new PropelException($e); 1. } 2. self::$connectionMap[$name] = $con; 1. }1.at Propel::getConnection('propel')in SF_ROOT_DIR/lib/model/om/BaseDataPeer.php line 197 ... public static function doSelectRS(Criteria $criteria, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } if (!$criteria->getSelectColumns()) {1.at BaseDataPeer::doSelectRS(object('Criteria'))in SF_ROOT_DIR/lib/model/DataPeer.php line 125 ... $criteria->setLimit($limit); $criteria->setOffset($from); $resultSet = self::doSelectRS($criteria); $ranking = array(); while($resultSet->next()) {1.at DataPeer::getRanking('', '0', '10')in SF_ROOT_DIR/apps/frontend/modules/top/actions/actions.class.php line 35 ... // // テンプレート // $positiveRanking = DataPeer::getRanking(DataPeer::RANKING_GOOD, 0, sfConfig::get('app_top_limit')); $negativeRanking = DataPeer::getRanking(DataPeer::RANKING_BAD, 0, sfConfig::get('app_top_limit')); $this->oauthUrl = $twitterOAuth->getAuthorizeURL($token['oauth_token']); // 認証用URL1.at topActions->executeIndex()in SF_ROOT_DIR/vendor/pear/php/symfony/action/sfActions.class.php line 53 ... } // run action $ret = $this->$actionToRun(); return $ret; }1.at sfActions->execute()in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfExecutionFilter.class.php line 129 ... // execute the action $actionInstance->preExecute(); $viewName = $actionInstance->execute(); if ($viewName == '') { $viewName = sfView::SUCCESS;1.at sfExecutionFilter->execute(object('sfFilterChain'))in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfFilterChain.class.php line 43 ... } // execute the next filter $this->chain[$this->index]->execute($this); } } 1.at sfFilterChain->execute()in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfFlashFilter.class.php line 50 ... } // execute next filter $filterChain->execute(); // remove flash that are tagged to be removed $names = $userAttributeHolder->getNames('symfony/flash/remove');1.at sfFlashFilter->execute(object('sfFilterChain'))in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfFilterChain.class.php line 43 ... } // execute the next filter $this->chain[$this->index]->execute($this); } } 1.at sfFilterChain->execute()in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfCommonFilter.class.php line 29 ... public function execute($filterChain) { // execute next filter $filterChain->execute(); // execute this filter only once $response = $this->getContext()->getResponse();1.at sfCommonFilter->execute(object('sfFilterChain'))in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfFilterChain.class.php line 43 ... } // execute the next filter $this->chain[$this->index]->execute($this); } } 1.at sfFilterChain->execute()in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfRenderingFilter.class.php line 33 ... public function execute($filterChain) { // execute next filter $filterChain->execute(); if (sfConfig::get('sf_logging_enabled')) {1.at sfRenderingFilter->execute(object('sfFilterChain'))in SF_ROOT_DIR/vendor/pear/php/symfony/filter/sfFilterChain.class.php line 43 ... } // execute the next filter $this->chain[$this->index]->execute($this); } } 1.at sfFilterChain->execute()in SF_ROOT_DIR/vendor/pear/php/symfony/controller/sfController.class.php line 283 ... } // process the filter chain $filterChain->execute(); } else {1.at sfController->forward('top', 'index')in SF_ROOT_DIR/vendor/pear/php/symfony/controller/sfFrontWebController.class.php line 48 ... $actionName = $request->getParameter('action'); // make the first request $this->forward($moduleName, $actionName); } catch (sfException $e) {1.at sfFrontWebController->dispatch()in SF_ROOT_DIR/web/index.php line 10 ... require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'); sfContext::getInstance()->getController()->dispatch(); symfony settings ... --- app_api_count: 200 app_batch_interval: 2 app_batch_reply: message <略>… debug mode (もしくは error display なんちゃら)は 本番サーバではやめた方がよいと思うんだ。うん。
PHP 5.3.0 で使えますかとの質問に対して、
動かした事がないので、まだ未対応って事で。と答え、課題として持ち帰っていたので調査。
./configure --prefix=/home/yoya/tmp/php530 make install cp php.ini-development /home/yoya/tmp/php530/lib/php.iniphp.ini を設定
でもって、以下の3行を追加 extension_dir = "/home/yoya/tmp/php530/lib/php/extensions/no-debug-non-zts-20090626/" enable_dl = On extension=swfed.so
export PATH=/home/yoya/tmp/php530/bin:$PATH phpize ./configure --with-zlib --with-png --with-gif make install
% php -v PHP 5.3.0 (cli) (built: Sep 13 2009 22:25:03) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies % php swfdump.php ~/flash/loveplus/player_01.swf magic=CWS version=9 file_length=175589 rect=(0, 0)-(194, 300) (f_size=14) frame_rate=12.0 frame_count=1 [0] tag=FileAttributes(69) length=4 [1] tag=SetBackgroundColor(9) length=3 [2] tag=Unknown(86) length=15 [3] tag=Unknown(82) length=103941 [4] tag=DefineShape(2) length=33 [5] tag=DefineSprite(39) length=16 [6] tag=DefineBitsLossless2(36) length=1229 image_id=3 format=5 width=45 height=45 argb bitmap exists [7] tag=DefineShape2(22) length=299 [8] tag=DefineSprite(39) length=16 [9] tag=DefineSprite(39) length=62 [10] tag=Unknown(76) length=70 [11] tag=DefineBitsJPEG2(21) length=69689 image_id=7 jpeg_data_size=69687 SOI(0xD8): len=0 APP0(0xE0): len=14 APP12(0xEC): len=15 APP14(0xEE): len=12 DQT(0xDB): len=130 SOF0(0xC0): len=15 DHT(0xC4): len=416 SOS(0xDA): len=69055 EOI(0xD9): len=0 [12] tag=DefineShape2(22) length=84 [13] tag=PlaceObject2(26) length=6 [14] tag=PlaceObject2(26) length=20 [15] tag=ShowFrame(1) [16] tag=End(0)\(^O^)/ 念の為に、JPEG 抽出も
% php swfgetjpegdata.php chara.swf 1 | strings | head -1 JFIF<< \(^O^)/ \(^O^)/ \(^O^)/
<?php if ($argc < 2) { fprintf(STDERR, "Usage: swfimagedump <swf_file>\n"); exit(1); } $swf_filename = $argv[1]; $swfdata = file_get_contents($swf_filename); $obj = new SWFEditor(); if ($obj->input($swfdata) == false) { fprintf(STDERR, "input failed\n"); exit(1); } $tags = $obj->getTagList(); foreach ($tags as $k => $tag) { $tagName = $tag['tagName']; if (strncmp($tagName, 'DefineBitsJPEG', 14) == 0) { $detail = $obj->getTagDetail($k); $imageId = $detail["image_id"]; file_put_contents($imageId.'.jpg', $obj->getJpegData($imageId)); } elseif (strncmp($tagName, 'DefineBitsLossless', 18) == 0) { $detail = $obj->getTagDetail($k); $imageId = $detail["image_id"]; file_put_contents($imageId.'.png', $obj->getPNGData($imageId)); } }Iterator に慣れてない古い人間なので、とりあえず foreach してます。
BitmapPixelData ARGB[image data size] Array of pixel colors. Number of entries is BitmapWidth * BitmapHeight. The RGB data must already be multiplied by the alpha channel value.なんだそうです。割った数をかけても元に戻りません。
次のファイルは互換ではありませんとしてハネられます。
% ls -l -rwxr--r-- 1 yoya devel 24854217 9月 12 01:06 BakeMonogatariOP10.mp4 -rwxr--r-- 1 yoya devel 23947431 7月 25 01:30 BakeMonogatariOP4.mp4こんなファイルがあるとします。※フィクションです
My Documents\CravingExplorer\download\walkman\以下に出来てるので、それを MediaManager for WALKMAN にドロップします。
上記では、ファイルからオープンした jpeg データの先頭に [0xff, 0xd9, 0xff, 0xd8].pack(”C*”) の4Byteの文字列を付加していますが、 これは SWF File Format Specification にも記載されている接頭子(マーカー)になります僕の知る限りでは、
The data in this tag begins with the JPEG SOI marker 0xFF, 0xD8 and ends with the EOI marker 0xFF, 0xD9. Before version 8 of the SWF file format, SWF files could contain an erroneous header of 0xFF, 0xD9, 0xFF, 0xD8 before the JPEG SOI marker.うぁぁ… (´Д`;)
DefineBit2JPEG2のJPEG完取り込みパターンはなぜこんな仕様かー。との声がありましたので、自分なりに推測してみました。 事実と又聞きと憶測が入り混じってます。
google co : definebitslossless format=5 -> /~yoya/?200807 google co : definebitslossless format=5 -> /~yoya/index.cgi?YEAR=2008&MONTH=07&DAY=ALLDefineBitsLossless で検索して僕の日記に来られた方を見つけたので、 まとめを作ってみました。 実は Lossless のフォーマット自体は簡単です。