403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2bzend/application/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application//Bootstrap.php
<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initAutoload() {
        #header('Access-Control-Allow-Origin: *');
        #header('Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept, Authorization');
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Travel',
            'basePath' => dirname(__FILE__),
        ));

        Zend_Controller_Action_HelperBroker::addPrefix('Helper');
        Zend_Session::start();
        date_default_timezone_set("Asia/Kolkata");

        /* Get Options from Applicaton.ini */
        $config = $this->getOptions();
    }

    protected function _initControllers() {
        $this->bootstrap('frontController');
        $this->_front = $this->getResource('frontController');
        $this->_front->addControllerDirectory(APPLICATION_PATH . '/admin/controllers', 'admin');
        $this->_front->throwExceptions(true);
    }

    protected function _initView() {
        $view = new Zend_View();
        $view->doctype('XHTML1_STRICT');
        $view->headTitle("");
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
                        'ViewRenderer'
        );
        $view->headMeta()->setIndent(8);
        $view->headLink()->setIndent(8);
        $view->headScript()->setIndent(8);
        $view->setHelperPath(APPLICATION_PATH . "/views/helpers/");
        $viewRenderer->setView($view);
        $this->_view = $view;
        return $this->_view;
    }

    protected function _initCache() {
        Zend_Controller_Front::getInstance()->setParam('disableOutputBuffering', true);
        $frontendOptionsCore = array(
            'automatic_serialization' => true,
            'lifetime' => 3600
        );

        $frontendOptionsPage = array(
            'automatic_serialization' => true,
            'lifetime' => 3600,
            'default_options' => array(
                'cache_with_get_variables' => true,
                'cache_with_session_variables' => true,
                'cache_with_cookie_variables' => true,
                'make_id_with_get_variables' => true,
                'make_id_with_session_variables' => true,
                'make_id_with_cookie_variables' => false
            )
        );

        $backendOptions = array('cache_dir' => APPLICATION_PATH . '/../cache');
        $this->_cache = Zend_Cache::factory('Core', 'File', $frontendOptionsCore, $backendOptions);
        $pageCache = Zend_Cache::factory('Page', 'File', $frontendOptionsPage, $backendOptions);

        // Set global cache objects
        Zend_Registry::set('pageCache', $pageCache);
        Zend_Registry::set('cacheCoreFile', $this->_cache);
    }

    protected function _initConstants() {
        $registry = Zend_Registry::getInstance();
        $config = $this->getOptions();
        if (isset($config['constants'])) {
            $registry->constants = new Zend_Config($this->getApplication()->getOption('constants'));
        }
    }

//    function _initMyErrorHandler() {
//        if (!(error_reporting() & $errno)) {
//            return false;
//        }
//        $errstr = htmlspecialchars($errstr);
//        switch ($errno) {
//            case E_USER_ERROR:
//                echo "<b>My ERROR</b> [$errno] $errstr<br />\n";
//                echo "  Fatal error on line $errline in file $errfile";
//                echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
//                echo "Aborting...<br />\n";
//                exit(1);
//
//            case E_USER_WARNING:
//                echo "<b>My WARNING</b> [$errno] $errstr<br />\n";
//                break;
//            case E_USER_NOTICE:
//                echo "<b>My NOTICE</b> [$errno] $errstr<br />\n";
//                break;
//            default:
//                echo "Unknown error type: [$errno] $errstr<br />\n";
//                break;
//        }
//
//        /* Don't execute PHP internal error handler */
//        return true;
//    }

//    protected function _initLogs() {
//        $dir = $_SERVER["DOCUMENT_ROOT"] . "/data/";
//        if (!is_dir($dir)) {
//            mkdir($dir, 0755);
//        }
//        $file = $dir . '/' . date('Y-m-d') . '.log';
//        $writer = new Zend_Log_Writer_Stream($file);
//        $logger = new Zend_Log($writer);
//        $logger->info(set_error_handler("myErrorHandler"));
//    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit