Notice (1024): Failed to connect to: localhost:27017: Connection refused [APP/Plugin/Mongodb/Model/Datasource/MongodbSource.php, line 218]Code Context} catch(MongoException $e) {
$this->error = $e->getMessage();
trigger_error($this->error);
$host = 'mongodb://localhost:27017' $e = object(MongoConnectionException) { [protected] message => 'Failed to connect to: localhost:27017: Connection refused' [protected] code => (int) 71 [protected] file => '/home/ohta/www/new_bloc_site/app/Plugin/Mongodb/Model/Datasource/MongodbSource.php' [protected] line => (int) 194 }MongodbSource::connect() - APP/Plugin/Mongodb/Model/Datasource/MongodbSource.php, line 218 MongodbSource::isConnected() - APP/Plugin/Mongodb/Model/Datasource/MongodbSource.php, line 302 MongodbSource::listSources() - APP/Plugin/Mongodb/Model/Datasource/MongodbSource.php, line 386 Model::setSource() - CORE/Cake/Model/Model.php, line 1112 Model::getDataSource() - CORE/Cake/Model/Model.php, line 3247 Model::find() - CORE/Cake/Model/Model.php, line 2700 Sponsor::getAllActiveData() - APP/Model/Sponsor.php, line 10 PagesController::beforeFilter() - APP/Controller/PagesController.php, line 112 call_user_func - [internal], line ?? CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 248 Controller::startupProcess() - CORE/Cake/Controller/Controller.php, line 674 Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 184 Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 162 [main] - APP/webroot/index.php, line 110
Warning (2): Invalid argument supplied for foreach() [APP/View/Layouts/default.ctp, line 271]Code Context<table>
<?php $cnt = 1; ?>
<?php foreach ($sponsorList as $data): ?>
$viewFile = '/home/ohta/www/new_bloc_site/app/View/Layouts/default.ctp' $dataForView = array( 'year' => '2013', 'title_for_layout' => 'Photos', 'sponsorList' => false, 'content_for_layout' => '<div class="all_container"> <script> var flickr_api = 'https://api.flickr.com/services/rest/?'; var api_key = '6df8cea19053366871006931a7edda13'; var user_id = '58566627@N03'; $(function(){ // コレクションのリストを取得 var url = flickr_api + "method=flickr.photosets.getList&api_key="+ api_key + "&user_id="+user_id+"&format=json&jsoncallback=?"; $.getJSON(url, function(data) { $.each(data.photosets.photoset, function (i, set) { var link = $("<a/>").attr("farm", set.farm).attr("name", set.id).attr("title", set.title._content).attr("href","#photos").text(set.title._content); if (set.title._content.indexOf('BLoC2013') != -1) { var li = $("<div>").attr("class", "phototitles").append(link).appendTo("#list"); } }); }); }); $(function(){ // コレクションの表示制御 $(document).on('click',"#list a", function(){ var name = $(this).attr("name"); var farm = $(this).attr("farm"); var url = flickr_api + "method=flickr.photosets.getPhotos&api_key="+ api_key + "&photoset_id="+name+"&format=json&nojsoncallback=1"; var slide = $("#images"); slide.empty(); // コレクションの画像を取得 $.getJSON(url, function(data){ $.each(data.photoset.photo, function(i,item){ var image_url = "http://farm"+farm+".staticflickr.com/"+item.server+"/"+item.id+"_"+item.secret; var imagelink = $("<a/>").attr("data-lightview-title",$(this).attr("title")).attr("data-lightview-group","bloc").attr("class","lightview").attr("href", image_url+"_b.jpg").appendTo(slide); $("<img/>").attr({src: image_url+"_q.jpg", alt:""}).appendTo(imagelink); }); }); }); }); </script> <div class="text_small text_bold" style="width:750px; margin: auto;"> <div class="news" id='list'> </div> <a name='photos' /> <div style="clear: both"></div> </div> <div id="main"> <div id="container"> <div id="images" class="flickr_photos"> </div> </div> </div> </div> ', 'scripts_for_layout' => '' ) $year = '2013' $title_for_layout = 'Photos' $sponsorList = false $content_for_layout = '<div class="all_container"> <script> var flickr_api = 'https://api.flickr.com/services/rest/?'; var api_key = '6df8cea19053366871006931a7edda13'; var user_id = '58566627@N03'; $(function(){ // コレクションのリストを取得 var url = flickr_api + "method=flickr.photosets.getList&api_key="+ api_key + "&user_id="+user_id+"&format=json&jsoncallback=?"; $.getJSON(url, function(data) { $.each(data.photosets.photoset, function (i, set) { var link = $("<a/>").attr("farm", set.farm).attr("name", set.id).attr("title", set.title._content).attr("href","#photos").text(set.title._content); if (set.title._content.indexOf('BLoC2013') != -1) { var li = $("<div>").attr("class", "phototitles").append(link).appendTo("#list"); } }); }); }); $(function(){ // コレクションの表示制御 $(document).on('click',"#list a", function(){ var name = $(this).attr("name"); var farm = $(this).attr("farm"); var url = flickr_api + "method=flickr.photosets.getPhotos&api_key="+ api_key + "&photoset_id="+name+"&format=json&nojsoncallback=1"; var slide = $("#images"); slide.empty(); // コレクションの画像を取得 $.getJSON(url, function(data){ $.each(data.photoset.photo, function(i,item){ var image_url = "http://farm"+farm+".staticflickr.com/"+item.server+"/"+item.id+"_"+item.secret; var imagelink = $("<a/>").attr("data-lightview-title",$(this).attr("title")).attr("data-lightview-group","bloc").attr("class","lightview").attr("href", image_url+"_b.jpg").appendTo(slide); $("<img/>").attr({src: image_url+"_q.jpg", alt:""}).appendTo(imagelink); }); }); }); }); </script> <div class="text_small text_bold" style="width:750px; margin: auto;"> <div class="news" id='list'> </div> <a name='photos' /> <div style="clear: both"></div> </div> <div id="main"> <div id="container"> <div id="images" class="flickr_photos"> </div> </div> </div> </div> ' $scripts_for_layout = '' $navClassInverse = 'navbar-inverse' $navClassInner = 'navbar-inner' $resultsImage = 'title/title_results.png' $photosImage = 'title/title_photos_s.png' $moviesImage = 'title/title_movies.png' $cnt = (int) 1include - APP/View/Layouts/default.ctp, line 271 View::_evaluate() - CORE/Cake/View/View.php, line 945 View::_render() - CORE/Cake/View/View.php, line 907 View::renderLayout() - CORE/Cake/View/View.php, line 535 View::render() - CORE/Cake/View/View.php, line 479 Controller::render() - CORE/Cake/Controller/Controller.php, line 952 Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 194 Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 162 [main] - APP/webroot/index.php, line 110