NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
debugging xampp and zend framework url redirects on localhos


Joined: 03 Mar 2010
Posts: 4
Reply with quote
This project works fine on a shared web host. When I run it on xampp localhost the controllers and base url's get messed up resulting in 404 out of the gate. I'm a real zend newbie so I'm hoping this is a standard problem that maybe other people have fixed before and can help me out?

The project is in c:/xampp/htdocs/myapp.


The project is setup as:
Code:

Root Directory: C:\xampp\htdocs\myapp
Run Mode: HTTP mode (SRV local WEB server)
Default file to run: C:\xampp\htdocs\myapp\index.php


I can't run the local Apache web server (Web Server Apache or Other)
Wizard gives Error -132 web server failed, page http://localhost/myapp/dbg-wizard.php?version not found: HTTP/1.1 404
When I run http://localhost/ standalone I get a good http://localhost/xampp Xampp for windows page.
Code:

Document Root: c:\xampp\htdocs\
URL: http://localhost/
Root Directory: C:\xampp\htdocs\myapp




The root folder .htaccess has:
Code:

# Rewrite rules for Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
RewriteBase /myapp/
SetEnv APPLICATION_ENV development
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php



application/configs/application.ini says:
Code:

[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.date.timezone = "UTC"
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = root
resources.db.params.password =
resources.db.params.dbname = myapp


resources.frontController.baseUrl ="/"


[staging : production]

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

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

 


application/views/helpers/BaseUrl.php says
Code:

<?php

class Zend_View_Helper_BaseUrl
{
    function baseUrl()
    {
      
        $fc = Zend_Controller_Front::getInstance();
        return $fc->getBaseUrl();
    }
}


The application/controllers directory includes:
AdminController.php
ErrorController.php
IndexController.php

When library/Zend/Controller/Dispatcher/Standard.php gets the controllers:
Code:

        $fileSpec    = $this->classToFilename($className);
        $dispatchDir = $this->getDispatchDirectory();
        $test        = $dispatchDir . DIRECTORY_SEPARATOR . $fileSpec;
        return Zend_Loader::isReadable($test);


$test is set to
Code:

: string = "C:\\xampp\\htdocs\\myapp\\application/controllers\\IndexPhpController.php"


There is an IndexController.php, but not an IndexPhpController.php

If I change configs/application.ini as follows the control resolves correctly to IndexController.php but my css files addresses are malformed.
\\myapp\\/public/css/proffesional.css
Code:

resources.frontController.baseUrl ="\\myapp\\"


If I change baseUrl as follows
Code:

resources.frontController.baseUrl ="http://localhost/myapp/"


the css loads great but every click starts a new debug session and the controller involved is truncated, e.g.
employerlogin becomes
Code:

An error occurred
Page not found
Exception information:

Message: Invalid controller specified (ployerlogin)
Stack trace:

#0 C:\xampp\htdocs\myapp\library\Zend\Controller\Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 C:\xampp\htdocs\myapp\library\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch()
#2 C:\xampp\htdocs\myapp\library\Zend\Application.php(328): Zend_Application_Bootstrap_Bootstrap->run()
#3 C:\xampp\htdocs\myapp\index.php(22): Zend_Application->run()
#4 {main}

Request Parameters:

array(3) {
  ["controller"]=>
  string(11) "ployerlogin"
  ["action"]=>
  string(5) "index"
  ["module"]=>
  string(7) "default"
}


Can anyone tell me how to fix this problem? I am very stumped.
View user's profileFind all posts by digiwebSend private message
debugging xampp and zend framework url redirects on localhos
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic