Question

I have a strange issue after moving my zend web application to a linux server, when my layout tries to include a javascript file:-

<?php echo $this->headScript()
 ->appendFile('/js/jquery/jquery.jqDock.min.js'); ?>

The code goes through my zend_acl factory:-

if($objAcl->isAllowed($role, $request->getModuleName() .'::'.$request->getControllerName() .'::' .$request->getActionName(), 'view')){
     //carry on with loading....
}

The request object looks like this:-

$request->module = 'ajfit'
$request->controller = 'js'
$request->action = 'jquery'
$request->_baseUri = '/js/jquery/jquery.jqDock.min.js'

When the above code is stepped over the application throws this exception:-

$ex->message = "Resource 'ajfit::js::jquery' not found"

I certainly know that i have not added this resource to my $objAcl zend_acl, and i know that i have not allowed access to it, and i don't want to. Thisis a local resource that exists in /public/js/jquery/ and should be bypassed and treated as a non-mvc resource.

When this application was running in windows it recognised that '/js/jquery/jquery.jqDock.min.js' was a local resource and did not go through zend_acl.

Am i missing something in my configuration, maybe a setting in my .htaccess file?

I'm pulling my hair out with this on.

Thanks.

Andrew

Was it helpful?

Solution

Must be a problem with your .htaccess, do you have those lines?

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

If yes, is your apache configured to allow the usage of htaccess?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top