I've got a question about implementing Zend project on the server. On localhost I made use of virtual host to create the document root towards the public/index.php folder.
- How must i deploy it now? I've replicated whole my project around the server but it's no longer working as my pathways are wrong (as each one is setup in accordance with the general public folder).
- What must i do? It's easy to set my pathways in accordance with the home path around the server? How do i redirect my application to the controller in cases like this? Or possibly I simply need to create virtual host around the server but I don't have permission to get it done:Or?
I want some advices, thanks
[production] phpSettings.display_startup_errors = phpSettings.display_errors = includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "Application" assets.frontController.controllerDirectory = APPLICATION_PATH "/remotes" assets.frontController.params.displayExceptions = assets.layout.layoutPath = APPLICATION_PATH "/designs/scripts/" assets.view = assets.db.isDefaultTableAdapter = true assets.db.adapter = PDO_MYSQL assets.db.params.charset = "utf8" assets.db.params.host = HOST assets.db.params.username = "p" assets.db.params.password = "***" assets.db.params.dbname = "p" [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 assets.frontController.params.displayExceptions = 1
<?php // Define road to application directory defined('APPLICATION_PATH') define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')) // Define application atmosphere defined('APPLICATION_ENV') define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')) defined('DESTINATION_IMAGES') define('DESTINATION_IMAGES', './usersImages/') defined('TRUE_STORY_EMAIL') define('TRUE_STORY_EMAIL', 'email@example.com') defined('TRUE_STORY_NAME') define('TRUE_STORY_NAME', 'True story team') // 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' // Create application, bootstrap, and run $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ) $application->bootstrap() ->run()
RewriteEngine On RewriteCond % -s [OR] RewriteCond % -l [OR] RewriteCond % -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]
w Loaded Modules I've mod_rewrite so most likely is enabled.
--------EDIT 04.05.2011 -----
I've used the project once more around the server and that i have set RewriteBase /~user2/Project2/public
And today the URL mapping is working (most likely the very first time was a mistake after i used it that's why it wasn't working).
However I still experience the project. After I visit the Auth controller :
public function indexAction() assistant->redirector->gotoRoute( array( 'controller' => 'index', 'action' => 'index' ) ) else assistant->redirector->gotoRoute( array( 'controller' => 'Registration', 'action' => "step", 'idUser' => $idUser ) ) else once more please') catch (Exception $e) $this->view->form = $form
Around the page I can tell only : ï»¿ and I don't understand what this means when i make sure that redirecting in various Controller is working what imply that my project begin to see the zend libraries in order to not realise why it doesn't produce the form within the view ?
<?php $this->headTitle('Login') ?> <h1>Login</h1> <?php echo $this->form->setAction($this->url()) ?>