Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6072207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:08:04+00:00 2026-05-23T10:08:04+00:00

I am having a problem (I think) with the autoloader in Zend Framework. I

  • 0

I am having a problem (I think) with the autoloader in Zend Framework. I believe that this is not necessarily incorrect behavior on the part of the autoloader, but maybe something I am missing.

Currently I have an APPLICATION_PATH as follows:

/home/amurray/NetBeansProjects/MyProject/application

I have a couple of layouts under that path as:

APPLICATION_PATH . /layouts/scripts/layout.phtml
APPLICATION_PATH . /layouts/scripts/layouthome.phtml
etc..

Now when I try to switch the layout in my controller:

$this->_helper->layout->setLayout('/home/amurray/NetBeansProjects/MyProject/application/layouts/scripts/layouthome');
-or-
$this->_helper->layout->setLayout(APPLICATION_PATH . '/layouts/scripts/layouthome');

I get an error can’t find the script, and the error message shows that it is turning my camel case directory names (in both methods used above), to lowercased dashed directory names:

eg: NetBeansProjects = net-beans-projects

Obvious reasons it is not able to find the path. However if I do not try to change the script, the default layout (layout.phtml) is working fine (set in my ini config)

I am thinking the autoloader is causing this problem, but I am not sure why the default works but switching is causing the autoloader to change the directories.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:08:04+00:00Added an answer on May 23, 2026 at 10:08 am

    you just use

    $this->_helper->layout->setLayout('layout.phtml'); //no paths
    

    and set layout paths in application.ini (or bootstrap)

    resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I'm not the only one having this problem. Whenever I try to
I think this is simple, but I am having big problem with this. I
I'm having a problem passing parameters that I think I should be able to
I'm having a problem designing part of my program (not writing it, for once!).
I am trying queue implementation in c++. During that I am having this problem.
I think I'm having a problem with the this element in the code below
I'm having a problem with Fluent NHibernate mappings, I think, and can't quite get
I have been having the following problem, i think it's probably due to the
I think I might be having a stack overflow problem or something similar in
Having problems iterating. Problem has to do with const correctness, I think. I assume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.