zend-frameworkzend-framework2zend-formzend-dbzend-studio

Zend framework issue in tranfer from one server to another


I have transfer zend framework from one server to another. its working fine but Auth controller is not working. it got error page not found issue, while a user login. Even it login the user but redirect on page not found. I am not sure where I need to make changes. Is it server issue or configuration issue as it work fine in my other server.

mod_rewrite of apache is enabled, server is pointed to public with .htaccess

.htaccess file

    SetEnv APPLICATION_ENV development      
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

application.ini

        includePaths.library = APPLICATION_PATH "/../library"
        bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
        bootstrap.class = "Bootstrap"
        appnamespace = "Application"
        resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
        resources.frontController.params.displayExceptions = 1
        resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
        resources.layout.layout = "default"

        [staging : production]
        phpSettings.display_startup_errors = 1
        phpSettings.display_errors = 1

        [testing : production]
        phpSettings.display_startup_errors = 1
        phpSettings.display_errors = 1

        [development : production]
        phpSettings.display_startup_errors = 1
        phpSettings.display_errors = 1
        resources.frontController.params.displayExceptions = 1

        database.host = "localhost"
        database.username = "xxx"
        database.password = 'xxxxxx'
        database.dbname = "xxx"

        autoloadernamespaces[] = "Resources_"
        autoloadernamespaces[] = "Plugins"
        resources.frontController.plugins[] = "Plugins_ViewSetup"

index.php in public folder

        defined('BASE_URL')
                    || define('BASE_URL', 'http://11.11.11.11'); // Live

        defined('APPLICATION_PATH')
                || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

        defined('CHARTS_FONT_PATH')
                || define('CHARTS_FONT_PATH', realpath(dirname(__FILE__) . '/../library/Charts/fonts'));

        defined('PUBLIC_FOLDER')
                || define('PUBLIC_FOLDER', 'public');

        defined('DATA_UPLOAD_PATH')
                || define('DATA_UPLOAD_PATH', realpath(dirname(__FILE__) . '/data'));

        // Define application environment
        defined('APPLICATION_ENV')
                || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

        // Ensure library/ is on include_path
        set_include_path(implode(PATH_SEPARATOR, array(
                    realpath(APPLICATION_PATH . '/../library'),
                    get_include_path(),
                )));

        /** Zend_Application */
        require_once 'Zend/Application.php';

        /** Utilities */
        require_once 'Utils.php';

        // Create application, bootstrap, and run
        $application = new Zend_Application(
                        APPLICATION_ENV,
                        APPLICATION_PATH . '/configs/application.ini'
        );


        $application->bootstrap()
                ->run();

Solution

  • There is some issue in database view access issue. I just debug code and check the error. Fixed