Phalcon Framework 3.4.5

PDOException: SQLSTATE[HY000] [2002] No route to host

/home/teknoloji/domains/siberteknoloji.com/public_html/config/services.php (105)
#0PDO->__construct(mysql:host=188.132.151.223;dbname=st_xsdbt;charset=utf8, st_xsdbt, H5VifunEqAvigisawALej2mEgu4uN1, Array([3] => 2))
#1Phalcon\Db\Adapter\Pdo->connect(Array([host] => 188.132.151.223, [username] => st_xsdbt, [password] => H5VifunEqAvigisawALej2mEgu4uN1, [dbname] => st_xsdbt, [charset] => utf8))
#2Phalcon\Db\Adapter\Pdo->__construct(Array([host] => 188.132.151.223, [username] => st_xsdbt, [password] => H5VifunEqAvigisawALej2mEgu4uN1, [dbname] => st_xsdbt, [charset] => utf8))
/home/teknoloji/domains/siberteknoloji.com/public_html/config/services.php (105)
<?php
 
use \Phalcon\Db\Adapter\Pdo\Mysql as DbAdapter;
use Phalcon\Mvc\Router\Annotations as Router;
use Phalcon\Mvc\View as View;
use Phalcon\Mvc\View\Engine\Volt as VoltEngine;
use Phalcon\Flash\Direct as DirectMessage;
use Phalcon\Flash\Session as FlashMessage;
use Phalcon\Mvc\Url as UrlResolver;
use Phalcon\DI\FactoryDefault as FactoryDefault;
use Phalcon\Session\Adapter\Files as SessionAdapter;
use Phalcon\Session\Bag as Bag;
use \Phalcon\Mvc\Model\Manager as ModelsManager;
 
use Repositories\Auth\Auth;
/**
 * Bağımlılıkları ekleyebilmek için FactoryDefault sınıfını örnekliyoruz.
 */
$di = new FactoryDefault();
 
/**
 * Session işlemlerini burada yapıyoruz. Önce session tanımlaması, sonra da küme tanımlaması yapıyoruz.
 */
$di['session'] = function(){
    $session = new SessionAdapter();
    $session->start();
    return $session;
};
/* Kullanıcı kümesi */
$di['user_info'] = function(){
    return new Bag('user_info');
};
/* İçerik kümesi */
$di['post_info'] = function(){
    return new Bag('post_info');
};
 
/**
 * Arayüz işlemlerini volt engine üzerinden yapacağımızı belirtiyoruz.
 */
$di['view'] = function(){
    $view = new View();
    $view->registerEngines(array(
        '.volt' => function($view, $di){
            $volt = new VoltEngine($view, $di);
            $volt->setOptions(array(
                'compiledPath' => __DIR__.'/../cache/volt/',
                'compiledSeparator' => '_'
            ));
            $compiler = $volt->getCompiler();
            $compiler->addFunction('dateformat', '\Yazar\Shared\Extras\Helpers::dateformat');
            $compiler->addFunction('tags', '\Yazar\Shared\Extras\Helpers::tags');
            $compiler->addFunction('isset', 'isset');
            $compiler->addFunction('check_file', 'file_exists');
            $compiler->addFunction('in_array', 'in_array');
            $compiler->addFunction('is_null', 'is_null');
            $compiler->addFunction('time', 'time');
            $compiler->addFunction('date', 'date');
            $compiler->addFunction('number_format', 'number_format');
            $compiler->addFunction('excerpt', 'mb_substr');
            $compiler->addFunction('new_line', '\Yazar\Shared\Extras\Helpers::nl2p');
            $compiler->addFunction('filesize', '\Yazar\Shared\Extras\Helpers::filesize');
            $compiler->addFunction('length', 'mb_strlen');
            $compiler->addFunction('print_r', 'print_r');
            $compiler->addFunction('debug', 'var_dump');
            $compiler->addFunction('glob', 'glob');
 
 
            return $volt;
        }
    ));
    return $view;
};
 
$di['router'] = function(){
    $router = new Router(false);
    require __DIR__.'/routes.php';
    return $router;
};
 
$di['flash'] = function(){
    return new FlashMessage(array(
        'error'   => 'alert alert-danger',
        'success' => 'alert alert-success',
        'notice'  => 'alert alert-info',
        'warning' => 'alert alert-warning',
    ));
};
 
$di['flashSession'] = function(){
    return new FlashMessage(array(
        'error'   => 'alert alert-danger',
        'success' => 'alert alert-success',
        'notice'  => 'alert alert-info',
        'warning' => 'alert alert-warning',
    ));
};
 
$di['db'] = function () use ($config){
    $connection = new DbAdapter(array(
        'host' => $config->database->host,
        'username' => $config->database->username,
        'password' => $config->database->password,
        'dbname' => $config->database->dbname,
        'charset' => $config->database->charset
    ));
    return $connection;
};
 
$di['config'] = function() use ($config){
    return $config;
};
 
/**
 * URL tanımlamalarını doğru yapabilmesi için phalcon'a dizin bildirimi yapıyoruz.
 */
$di['url'] = function() use ($config){
    $url = new UrlResolver();
    $url->setBaseUri($config->url->base);
    return $url;
};
 
$di["modelsManager"] = function(){
    return new ModelsManager();
 
};
 
$di['auth'] = function(){
    return new Auth();
};
 
$di['crypt'] = function() use($di) {
    $crypt = new \Phalcon\Crypt();
    $crypt->setMode(MCRYPT_MODE_CFB);
    $crypt->setKey('4ga*/s7d-as*dasd4a6s954fga-sd12%%%&');
    return $crypt;
};
 
$di['cookies'] = function () {
    $cookies = new \Phalcon\Http\Response\Cookies();
    $cookies->useEncryption(false);
    return $cookies;
};
#3Closure->{closure}()
#4Phalcon\Di\Service->resolve(null, Object(Phalcon\Di\FactoryDefault))
#5Phalcon\Di->get(db, null)
#6Phalcon\Di->getShared(db)
#7Phalcon\Mvc\Model\Manager->_getConnection(Object(Yazar\Shared\Models\Champion: 14), null)
#8Phalcon\Mvc\Model\Manager->getReadConnection(Object(Yazar\Shared\Models\Champion: 14))
#9Phalcon\Mvc\Model->getReadConnection()
#10Phalcon\Mvc\Model\MetaData\Strategy\Introspection->getMetaData(Object(Yazar\Shared\Models\Champion: 14), Object(Phalcon\Di\FactoryDefault))
#11Phalcon\Mvc\Model\MetaData->_initialize(Object(Yazar\Shared\Models\Champion: 14), yazar\shared\models\champion-champion, champion, )
#12Phalcon\Mvc\Model\MetaData->readMetaDataIndex(Object(Yazar\Shared\Models\Champion: 14), 4)
#13Phalcon\Mvc\Model\MetaData->getDataTypes(Object(Yazar\Shared\Models\Champion: 14))
#14Phalcon\Mvc\Model::_invokeFinder(findFirstByDate, Array([0] => 2025-10-01))
#15Phalcon\Mvc\Model::__callStatic(findFirstByDate, Array([0] => 2025-10-01))
/home/teknoloji/domains/siberteknoloji.com/public_html/shared/controllers/ControllerBase.php (80)
<?php
 
namespace Yazar\Shared\Controllers;
 
use Phalcon\Db\RawValue;
use Yazar\Shared\Models\Championships;
use Yazar\Shared\Models\Comments;
use Yazar\Shared\Models\LogsPosts;
use Yazar\Shared\Models\Menu;
use Yazar\Shared\Models\Users as Users,
    Yazar\Shared\Models\Posts as Posts,
    Yazar\Shared\Models\Champion as Champion,
    Yazar\Shared\Models\Categories as Categories,
    Yazar\Shared\Models\PrivateMessages as PM;
 
 
use Phalcon\Session\Bag as Oturum;
 
use Repositories\Links\Links;
 
class ControllerBase extends \Phalcon\Mvc\Controller {
 
    public $customJs, $customCss, $profileInfo, $notifications, $page_meta;
    public $sidebar_links, $footer_links;
 
    public function beforeExecuteRoute()
    {
        if($this->auth->hasRememberMe() && is_null($this->user_info->id))
        {
            $this->auth->loginWithRememberMe();
        }
    }
 
    public function category_list($parent)
    {
        $find = Categories::find(array('conditions'=>"ID={$parent} OR parent={$parent}"));
        $return = array();
        if($find){
            foreach($find->toArray() as $arr)
            {
                $return[] = $arr['ID'];
            }
            $return = implode(',', $return);
        }else{
            $return = 0;
        }
 
        return $return;
    }
 
    public function initialize() {
 
        $this->page_meta = array(
            'description'=>'Yazılım, Robotik, Oyun, Araba ve Teknoloji Haberleri üzerine kişisel blog',
            'keywords'=>'teknoloji, teknoloji haberleri, siber teknoloji, teknoloji sitesi'
        );
 
        $this->response->setHeader("X-Powered-By", "fatihemre");
 
        if(!is_array($this->post_info->post_view)){
            $this->post_info->post_view = array();
        }
 
        $users = new Users();
        $this->profileInfo = $users->user_info($this->user_info->nick);
        $this->customJs = $this->assets->collection('custom-js');
        $this->customCss = $this->assets->collection('custom-css');
 
        if($this->profileInfo){
            $this->notifications = (object)$this->notifications($this->profileInfo->ID);
            
            if($this->profileInfo->role != $this->user_info->role)
            {
                $this->response->redirect(['for'=>'blog-logout']);
            }
        }
 
 
        $date =  strtotime("last Month");
        $champion = Champion::findFirstByDate(date("Y-m-01", $date));
        if($champion)
            $this->view->setVar('champion', $champion);
 
        $subjects = Championships::findByPeriod(date("Y-m-01"));
 
        if($subjects->count() > 0)
        {
            $this->view->setVar('subjects', $subjects);
        }
 
        $ipucu = Posts::find(array('conditions'=>"category_id IN({$this->category_list(7)}) AND status='publish' AND deleted='N'", 'order'=>'created_at DESC', 'limit'=>10));
 
        $links = new Links();
        $links->setup('config', true);
        $links->setup('end', date("Y-m-d", time()));
        $links->setup('max', 10);
 
        $this->sidebar_links = $links->get_sidebar_links();
        $this->footer_links = $links->get_links('footer');
 
        //$this->debug($this->menuList('ana-menu')->toArray());
 
        $this->view->setVar('ana_menu', $this->menuList('ana-menu'));
        $this->view->setVar('last_comments', $this->last_comments());
        $this->view->setVar('sidebar_links', $this->sidebar_links);
        $this->view->setVar('footer_links', $this->footer_links);
        $this->view->setVar('notifications', $this->notifications);
        $this->view->setVar('user_info', (isset($this->user_info->id) && $this->user_info->id > 0) ? $this->user_info : false);
        $this->view->setVar('profileInfo', $this->profileInfo);
        $this->view->setVar('check_new_message', $this->checkNewMessage());
        $this->view->setVar('check_friend_request', $this->checkFriendRequest());
        $this->view->setVar('ipucu', $ipucu);
        $this->view->setVar('category_menu', $this->category_menu());
        $this->view->setVar('version', $this->getVersion());
        $this->view->setVar('donate', $this->getDonate());
        $this->view->setVar('active_page', $this->router->getActionName());
        $this->view->setVar('page_title', "SiberTeknoloji | Teknoloji ve Haber Bloğu");
        $this->view->setVar('page_meta', $this->page_meta);
 
        $this->view->setVar('app_config', $this->config->app);
 
    }
 
    protected  function used_subjects()
    {
        $users_posts = Posts::find(["conditions"=>"cs_id > 0 and deleted='N' and status='publish' and user_id=:user_id:", "bind"=>["user_id"=> $this->user_info->id], "columns"=>"cs_id"]);
 
        $hangi_konular = [];
 
        if($users_posts)
        {
 
            foreach($users_posts->toArray() as $p)
            {
                $hangi_konular[] = $p['cs_id'];
            }
 
        }
 
        return $hangi_konular;
    }
 
    private function menuList($whereis=null)
    {
        return $this->list_menu($whereis)->getMenu(array('conditions'=>'parent_id=0', 'order'=>'sort ASC'));
    }
 
    private function list_menu($key=null)
    {
        return Menu::findFirstByKey($key);
    }
 
    private function last_comments()
    {
        return Comments::find(array('conditions'=>'status=:status:', 'bind'=>array('status'=>'publish'), 'order'=>'created_at DESC', 'limit'=>10));
    }
 
    public function post_view($post,$user=false){
        $return = null;
        if($user)
        {
            $log = LogsPosts::findFirst(array('conditions'=>"post_id={$post} and user_id={$user}"));
            if($log){
                $return = $log->view + 1;
                $log->view = $return;
                $log->updated_at = new RawValue('now()');
                $log->save();
            }else{
                $return = 0;
                $log = new LogsPosts();
                $log->post_id = $post;
                $log->user_id = $user;
                $log->view = 1;
                $log->score = 0;
                $log->created_ip = $this->request->getClientAddress();
                $log->created_at = new RawValue('now()');
                $log->updated_at = null;
                $log->save();
                $update = Posts::findFirst($post);
                $update->view = $update->view + 1;
                $update->save();
            }
        }
        else
        {
 
 
            if(!in_array($post, $this->post_info->post_view)){
 
                $update = Posts::findFirst($post);
                $update->view = $update->view + 1;
                $update->save();
 
                $key = $this->post_info->post_view;
                $key[] = $post;
                $this->post_info->post_view = $key;
            }
 
        }
 
        return $return;
 
    }
 
 
    private function category_menu(){
        $category = Categories::find(array('conditions'=>"parent=0 AND ID<>35"));
        return $category->count() > 0 ? $category : false;
    }
 
    private function notifications($userID){
        $notifications = array(
            'draft' => Posts::count(array('conditions'=>"status='draft' and user_id={$userID} and deleted='".Posts::NOT_DELETED."'")),
            'wait' => Posts::count(array('conditions'=>"status='wait' and user_id={$userID} and deleted='".Posts::NOT_DELETED."'")),
            'reject' => Posts::count(array('conditions'=>"status='reject' and user_id={$userID} and deleted='".Posts::NOT_DELETED."'")),
            'new_message'=>$this->checkNewMessage(),
            'new_friend'=>$this->checkFriendRequest()
        );
 
        $notifications['count'] = array_sum($notifications);
 
        return $notifications;
    }
 
    private function checkNewMessage(){
        if(isset($this->user_info->id) && $this->user_info->id > 0){
            $pm = new PM();
            return $pm->check_new_message($this->user_info->id);
        }
    }
 
    private function checkFriendRequest(){
        if(isset($this->user_info->id) && $this->user_info->id > 0){
            $user = new Users();
            return $user->user_friend_request($this->user_info->id);
        }
    }
 
    public function getDonate()
    {
        $file = file_get_contents('../public/donate.json');
        $result = json_decode($file);
        $percent = ( $result->result * 100 ) / $result->total;
        $result->percent = round($percent, 2);
        return $result;
    }
 
    public function getVersion(){
        $file = file_get_contents("../public/version.json");
        $system = json_decode($file);
        return $system->version;
    }
 
    public function debug($message) {
        echo '<pre>';
        is_bool($message) ? var_dump($message) : print_r($message);
        echo '</pre>';
        exit;
    }
    
}
#16Yazar\Shared\Controllers\ControllerBase->initialize()
/home/teknoloji/domains/siberteknoloji.com/public_html/apps/blog/controllers/PostController.php (23)
<?php
 
namespace Yazar\Blog\Controllers;
 
use Yazar\Shared\Extras\Akismet;
use Yazar\Shared\Models\Categories,
    Yazar\Shared\Models\Posts,
    Yazar\Shared\Models\Tags,
    Yazar\Shared\Controllers\ControllerBase,
    Yazar\Shared\Models\Users as Users,
    Yazar\Shared\Models\PrivateMessages as PM,
    \Phalcon\Image\Adapter\GD as GD,
    Yazar\Shared\Extras\Helpers;
use Yazar\Shared\Models\Comments;
use Yazar\Shared\Models\Pages;
use Yazar\Shared\Models\PostsMeta;
 
use \Phalcon\Paginator\Adapter\Model as Pagination;
 
class PostController extends ControllerBase {
 
    public function initialize() {
        parent::initialize();
    }
 
    private function SocialMetaTags($post)
    {
 
        $return = array();
        if($post){
            $description=mb_substr(strip_tags($post->content),0,160,"UTF-8");
            $thumbnail= 'https://siberteknoloji.com/'.$post->thumbnail;
 
            $return[] = '<meta property="og:title" content="'.$post->title.'" />'."\n";
            $return[] = '<meta property="og:site_name" content="SiberTeknoloji | Teknoloji ve Haber Bloğu"/>'."\n";
            $return[] = '<meta property="og:url" content="'.$this->url->get(array('for'=>'blog-post', 'postID'=>$post->ID, 'slug'=>$post->slug)).'" />'."\n";
            $return[] = '<meta property="og:description" content="'.$description.'" />'."\n";
            $return[] = '<meta property="og:image" content="'.$thumbnail.'" />'."\n";
            $return[] = '<meta property="fb:app_id" content="252444522421505" />'."\n";
            $return[] = '<meta property="og:type" content="article" />'."\n";
            $return[] = '<meta property="article:publisher" content="https://www.facebook.com/siberteknolojicom" />'."\n";
 
            $return[] = '<meta name="twitter:card" content="summary_large_image">'."\n";
            $return[] = '<meta name="twitter:site" content="@SiberTeknoloji">'."\n";
            if($post->getUser() && !is_null($post->getUser()->twitter) && strlen(trim($post->getUser()->twitter)) > 0)
            {
                $return[] = '<meta name="twitter:creator" content="@'.$post->getUser()->twitter.'">'."\n";
            }
            $return[] = '<meta name="twitter:title" content="'.$post->title.'">'."\n";
            $return[] = '<meta name="twitter:description" content="'.$description.'">'."\n";
            $return[] = '<meta name="twitter:image:src" content="'.$thumbnail.'">'."\n";
        }
 
        return $return;
 
    }
 
    public function searchAction()
    {
        $search = $this->request->getQuery('q');
 
        $this->view->setVar('search', $search);
    }
 
    public function singleAction($postID, $slug){
 
        $post = Posts::findFirst(array('conditions'=>"ID='{$postID}' AND status='publish' AND deleted='N'"));
 
        $this->assets->addJs('assets/js/social-share-kit.min.js');
        $this->assets->addCss('assets/css/social-share-kit.css');
 
        if($post){
            if($slug != $post->slug)
            {
                $this->response->redirect(array('for'=>'blog-post', 'postID'=>$postID, 'slug'=>$post->slug));
            }
 
            $viewed = $this->post_view($post->ID, $this->profileInfo ? $this->profileInfo->ID : 0);
 
            $post->other_posts = Posts::find(
                array(
                    'conditions'=>"user_id='{$post->user_id}' AND status='publish' AND deleted='N'",
                    'order'=>'published_at DESC',
                    'limit'=>5
                )
            );
 
            $post->content = str_replace('http://siberteknoloji.com/post-images', 'https://siberteknoloji.com/post-images', $post->content);
 
            $this->view->setVar('social_meta_tags', $this->SocialMetaTags($post));
            $this->view->setVar('page_title', $post->title.' | Yazar: '.$post->getUser()->name);
 
            $this->page_meta['description'] = mb_substr(strip_tags($post->content), 0, 160, "UTF-8");
 
            $setTag = "";
            foreach($post->getTags()->toArray() as $key=>$value)
            {
                $setTag .= $value['tag'].", ";
            }
 
            $this->page_meta['keywords'] = $setTag;
 
            $this->view->setVar('page_meta', $this->page_meta);
            $this->view->setVar('viewed', $viewed);
            $this->view->setVar('post', $post);
        }else{
            $this->dispatcher->forward(array('controller'=>'index', 'action'=>'notFound'));
        }
 
    }
    public function pageAction($pageID, $slug){
 
        $page = Pages::findFirst(array('conditions'=>"ID='{$pageID}' AND status='publish' AND deleted='N'"));
 
        if($page){
            if($slug != $page->slug)
            {
                $this->response->redirect(array('for'=>'blog-page', 'pageID'=>$pageID, 'slug'=>$page->slug));
            }
 
            $this->view->setVar('page_title', $page->title);
 
            $this->view->setVar('page', $page);
        }else{
            $this->dispatcher->forward(array('controller'=>'index', 'action'=>'notFound'));
        }
 
    }
 
    public function addCommentAction()
    {
        $this->view->disable();
        $data = $this->request->getPost();
 
 
        $post = Posts::findFirst($data['comment_post']);
 
 
        if($this->security->checkToken()){
            if(trim($data['comment_text']) != '')
            {
 
                if(!$this->profileInfo && !filter_var($data['comment_email'], FILTER_VALIDATE_EMAIL)){
                    $this->flash->error('Email adresinin doğru girilmesi gerekiyor.');
                }else{
 
                    $zort = array('blog' => 'https://siberteknoloji.com',
                        'user_ip' => $_SERVER['HTTP_CF_CONNECTING_IP'],
                        'user_agent' => $this->request->getUserAgent(),
                        'referrer' => $this->request->getHTTPReferer(),
                        'permalink' => $this->url->get(array('for'=>'blog-post', 'postID'=>$post->ID, 'slug'=>$post->slug)),
                        'comment_type' => 'comment',
                        'comment_author' => $data['comment_name'],
                        'comment_author_email' => $data['comment_email'],
                        'comment_author_url' => '',
                        'comment_content'=> $data['comment_text'],
                    );
                    $akismet = new Akismet();
                    $response = $akismet->commentCheck($zort);
 
                    if($response[1] == 'false')
                    {
                        $status = $this->profileInfo ? ($this->profileInfo->role == 'editor' ? 'publish' : ($this->profileInfo->ID == $post->user_id ? 'publish':'wait')) : 'wait';
                    }
                    else
                    {
                        $status = 'spam';
                    }
                    $comment = new Comments();
                    $comment->post_id = $data['comment_post'];
                    $comment->author = $this->profileInfo ? $this->profileInfo->name : $data['comment_name'];
                    $comment->author_email = $this->profileInfo ? $this->profileInfo->email : $data['comment_email'];
                    $comment->author_ip = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR'];
                    $comment->created_at = date('Y-m-d H:i:s');
                    $comment->updated_at = null;
                    $comment->content= htmlspecialchars(trim($data['comment_text']));
                    $comment->status = $status;
                    $comment->reply_to = $data['comment_reply'];
                    $comment->user_id = $this->profileInfo ? $this->profileInfo->ID : 0;
                    $comment->save();
                    $this->flash->success('Harika! Yorumun kaydedildi ve kısa süre içerisinde yayınlanacak.');
 
                    if($this->profileInfo && $status != 'spam')
                    {
                        if($this->profileInfo->role=='editor' || $this->profileInfo->ID == $post->user_id)
                        {
                            $post->comment = ((int)$post->comment)+1;
                            $post->save();
                        }
                    }
 
                }
 
            }else{
                $this->flash->warning('Lütfen yorumunu göndermeden önce formu eksiksiz doldur.');
            }
        }
        else{
            $this->flash->warning('Yorumunuz güvenlik kontrolüne takıldı.');
        }
 
 
        $this->response->redirect(array('for'=>'blog-post-anchor', 'postID'=>$post->ID, 'slug'=>$post->slug, 'anchor'=>'#comment-form'));
 
    }
 
    public function categoryAction($categoryID, $slug, $page=null){
 
        $category = Categories::findFirst($categoryID);
        if($category){
            if($slug != $category->slug){
                $this->response->redirect(array('for'=>'blog-category', 'categoryID'=>$categoryID, 'slug'=>$category->slug));
            }else{
 
                $list = Categories::findFirst(array(
                    'conditions'=>'ID=:id: OR parent=:parent:',
                    'columns'=>'GROUP_CONCAT(ID) as ID',
                    'bind'=>array('id'=>$categoryID, 'parent'=>$categoryID)
 
                ))->toArray();
 
                $paginator = new Pagination(
                    array(
                        "data" => Posts::find(array(
                            'conditions'=>"category_id IN ({$list['ID']}) AND status='publish' AND deleted='N'",
                            "order"=>"published_at DESC"
                        )),
                        "limit"=> 10,
                        "page" => $page
                    )
                );
 
                $this->view->setVar('page_title', $category->name.' Kategorisindeki Yazılar');
                $this->view->setVar('category', $category);
                $this->view->setVar('posts', $paginator->getPaginate());
            }
        }else{
            $this->dispatcher->forward(array('controller'=>'index', 'action'=>'notFound'));
        }
 
    }
 
    public function tagAction($slug, $page=null){
 
        $tags = Tags::find(array('conditions'=>"slug='{$slug}'"));
        if($tags->count() > 0) {
            $arr = array();
            foreach($tags as $tag) {
                $arr[] = $tag->post_id;
            }
            $post_ids = implode(',', $arr);
 
            $paginator = new Pagination(
                array(
                    "data" => Posts::find(array(
                        'conditions'=>"ID IN($post_ids) AND status='publish' AND deleted='N'",
                        "order"=>"published_at DESC"
                    )),
                    "limit"=> 10,
                    "page" => $page
                )
            );
 
            $page_tag = $tags->toArray()[0]['tag'];
 
            $this->view->setVar('page_title', '"'.$page_tag.'" Etiketli Yazılar');
            $this->view->setVar('tag', $page_tag);
            $this->view->setVar('slug', $tags->toArray()[0]['slug']);
            $this->view->setVar('posts', $paginator->getPaginate());
 
        }else{
            $this->dispatcher->forward(array('controller'=>'index', 'action'=>'notFound'));
        }
 
 
    }
 
}
#17Yazar\Blog\Controllers\PostController->initialize()
#18Phalcon\Dispatcher->dispatch()
#19Phalcon\Mvc\Application->handle()
/home/teknoloji/domains/siberteknoloji.com/public_html/public/index.php (50)
<?php
 
/*
$break_maintenance = isset($_COOKIE['break_maintenance']) ? $_COOKIE['break_maintenance'] : false;
 
if($break_maintenance === false)
{
  require 'maintenance.php';
  exit;  
}
*/
 
 
setlocale(LC_TIME, 'tr_TR');
define('__PUBLIC__', __DIR__);
 
use \Phalcon\Mvc\Application as App;
 
 
if(
  $_SERVER['REMOTE_ADDR'] == '176.88.151.153' ||
  $_SERVER['REMOTE_ADDR'] == '::1' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1')
{
  error_reporting(E_ALL);
  ini_set('display_errors', 1);
  $debug = new \Phalcon\Debug;
  $debug->listen();
}
 
error_reporting(E_ALL);
ini_set('display_errors', 1);
$debug = new \Phalcon\Debug;
$debug->listen();
 
 
require __DIR__.'/../vendor/autoload.php';
 
 
 
require __DIR__.'/../config/config.php';
require __DIR__.'/../config/services.php';
require __DIR__.'/../config/loader.php';
 
$app = new App();
 
$app->setDI($di);
 
require __DIR__.'/../config/modules.php';
 
echo $app->handle()->getContent();
KeyValue
_url/13/2020-mart-akaryakit-fiyatlari
KeyValue
USERteknoloji
HOME/home/teknoloji
SCRIPT_NAME/public/index.php
REQUEST_URI/13/2020-mart-akaryakit-fiyatlari
QUERY_STRING_url=/13/2020-mart-akaryakit-fiyatlari
REQUEST_METHODGET
SERVER_PROTOCOLHTTP/2.0
GATEWAY_INTERFACECGI/1.1
REDIRECT_QUERY_STRING_url=/13/2020-mart-akaryakit-fiyatlari
REDIRECT_URL/public/13/2020-mart-akaryakit-fiyatlari
REMOTE_PORT11826
SCRIPT_FILENAME/home/teknoloji/domains/siberteknoloji.com/private_html/public/index.php
SERVER_ADMIN[email protected]
CONTEXT_DOCUMENT_ROOT/home/teknoloji/domains/siberteknoloji.com/private_html
CONTEXT_PREFIX
REQUEST_SCHEMEhttps
DOCUMENT_ROOT/home/teknoloji/domains/siberteknoloji.com/private_html
REMOTE_ADDR216.73.216.60
SERVER_PORT443
SERVER_ADDR188.132.151.24
SERVER_NAMEsiberteknoloji.com
SERVER_SOFTWAREApache/2
SERVER_SIGNATURE
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOSTsiberteknoloji.com
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_CF_IPCOUNTRYUS
HTTP_CF_CONNECTING_IP216.73.216.60
HTTP_CDN_LOOPcloudflare; loops=1
HTTP_CF_RAY999e00bb6c77b1a2-YYZ
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_COOKIEPHPSESSID=8gbngppp1pb6r6ogd1ag5on8nl
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
proxy-nokeepalive1
H2_STREAM_TAG17669-5057-1
H2_STREAM_ID1
H2_PUSHED_ON
H2_PUSHED
H2_PUSHoff
H2PUSHoff
HTTP2on
SSL_TLS_SNIsiberteknoloji.com
HTTPSon
UNIQUE_IDaQuFoRn52z0pC8zNVBC0NwAAJi8
REDIRECT_STATUS200
REDIRECT_H2_STREAM_TAG17669-5057-1
REDIRECT_H2_STREAM_ID1
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSHoff
REDIRECT_H2PUSHoff
REDIRECT_HTTP2on
REDIRECT_SSL_TLS_SNIsiberteknoloji.com
REDIRECT_HTTPSon
REDIRECT_UNIQUE_IDaQuFoRn52z0pC8zNVBC0NwAAJi8
REDIRECT_REDIRECT_STATUS200
REDIRECT_REDIRECT_H2_STREAM_TAG17669-5057-1
REDIRECT_REDIRECT_H2_STREAM_ID1
REDIRECT_REDIRECT_H2_PUSHED_ON
REDIRECT_REDIRECT_H2_PUSHED
REDIRECT_REDIRECT_H2_PUSHoff
REDIRECT_REDIRECT_H2PUSHoff
REDIRECT_REDIRECT_HTTP2on
REDIRECT_REDIRECT_SSL_TLS_SNIsiberteknoloji.com
REDIRECT_REDIRECT_HTTPSon
REDIRECT_REDIRECT_UNIQUE_IDaQuFoRn52z0pC8zNVBC0NwAAJi8
FCGI_ROLERESPONDER
PHP_SELF/public/index.php
REQUEST_TIME_FLOAT1762362785.9696
REQUEST_TIME1762362785
#Path
0/home/teknoloji/domains/siberteknoloji.com/public_html/public/index.php
1/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/autoload.php
2/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/autoload_real.php
3/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/ClassLoader.php
4/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/autoload_namespaces.php
5/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/autoload_psr4.php
6/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/autoload_classmap.php
7/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/composer/autoload_files.php
8/home/teknoloji/domains/siberteknoloji.com/public_html/vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php
9/home/teknoloji/domains/siberteknoloji.com/public_html/config/config.php
10/home/teknoloji/domains/siberteknoloji.com/public_html/config/services.php
11/home/teknoloji/domains/siberteknoloji.com/public_html/config/loader.php
12/home/teknoloji/domains/siberteknoloji.com/public_html/config/modules.php
13/home/teknoloji/domains/siberteknoloji.com/public_html/config/routes.php
14/home/teknoloji/domains/siberteknoloji.com/public_html/apps/ajax/Route.php
15/home/teknoloji/domains/siberteknoloji.com/public_html/apps/blog/Route.php
16/home/teknoloji/domains/siberteknoloji.com/public_html/apps/editor/Route.php
17/home/teknoloji/domains/siberteknoloji.com/public_html/apps/manage/Route.php
18/home/teknoloji/domains/siberteknoloji.com/public_html/apps/services/Route.php
19/home/teknoloji/domains/siberteknoloji.com/public_html/apps/blog/Module.php
20/home/teknoloji/domains/siberteknoloji.com/public_html/apps/blog/plugins/Access.php
21/home/teknoloji/domains/siberteknoloji.com/public_html/apps/blog/controllers/PostController.php
22/home/teknoloji/domains/siberteknoloji.com/public_html/shared/controllers/ControllerBase.php
23/home/teknoloji/domains/siberteknoloji.com/public_html/Repositories/Auth/Auth.php
24/home/teknoloji/domains/siberteknoloji.com/public_html/shared/models/Users.php
25/home/teknoloji/domains/siberteknoloji.com/public_html/shared/models/ModelBase.php
26/home/teknoloji/domains/siberteknoloji.com/public_html/shared/models/Champion.php
Memory
Usage2097152