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

  • Home
  • SEARCH
  • 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 9016545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:01:16+00:00 2026-06-16T04:01:16+00:00

Anyone know how to change the default Module in Zend Framework 2? I am

  • 0

Anyone know how to change the default Module in Zend Framework 2? I am using the Skeleton Application as the home page but I want to make another module that I have the default home page.
I tried two things

I removed the “Skeleton Application” from the application.config.php file this is what it looked like

return array(
'modules' => array(
    'Application',
    'Helloworld'
),
'module_listener_options' => array(
    'config_glob_paths'    => array(
        'config/autoload/{,*.}{global,local}.php',
    ),
    'module_paths' => array(
        './module',
        './vendor',
    ),
  ),
);

this is what it looks like now

    return array(
'modules' => array(
    'Helloworld'
),
'module_listener_options' => array(
    'config_glob_paths'    => array(
        'config/autoload/{,*.}{global,local}.php',
    ),
    'module_paths' => array(
        './module',
        './vendor',
     ),
   ),
);

if you can’t tell I removed the ‘Application’ from the module
then I changed my module.config.php file for the Helloworld module
here’s what it used to look like

return array(
'view_manager' => array(
    'template_path_stack' => array(
        __DIR__ . '/../view',
    ),
),
'router' => array(
    'routes' => array(
        'sayhello' => array(
            'type' => 'Zend\Mvc\Router\Http\Literal',
            'options' => array(
                'route' => '/sayhello',
                'defaults' => array(
                    'controller' => 'Helloworld\Controller\Index',
                    'action' => 'index',
                )
            )
        )
    )
),
'controllers' => array(
    'factories' => array(
        'Helloworld\Controller\Index' => 'Helloworld\Controller\IndexControllerFactory'
    )
),
'service_manager' => array(
    'invokables' => array(
        'greetingService' => 'Helloworld\Service\GreetingService'
     )
   )
);

this is what it looks like now

return array(
'view_manager' => array(
    'template_path_stack' => array(
        __DIR__ . '/../view',
    ),
),
'router' => array(
    'routes' => array(
        'sayhello' => array(
            'type' => 'Zend\Mvc\Router\Http\Literal',
            'options' => array(
                'route' => '/',
                'defaults' => array(
                    'controller' => 'Helloworld\Controller\Index',
                    'action' => 'index',
                )
            )
        )
    )
),
'controllers' => array(
    'factories' => array(
        'Helloworld\Controller\Index' => 'Helloworld\Controller\IndexControllerFactory'
    )
),
'service_manager' => array(
    'invokables' => array(
        'greetingService' => 'Helloworld\Service\GreetingService'
      )
   )
);

the change was made to the ‘router’ array in the options=>route I changed the value to just ‘/’

but it throws a 5000 error
can anyone elaborate on what I am doing wrong?

  • 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-06-16T04:01:17+00:00Added an answer on June 16, 2026 at 4:01 am

    OK so I saw the problem with my application. The routing is actually correct the problem was that I was missing a layout.phtml file I needed to specify all this in the module configuration. I need to add the following to my module.config.php

        'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
            'valaree/index/index' => __DIR__ . '/../view/valaree/index/index.phtml',
            'error/404'               => __DIR__ . '/../view/error/404.phtml',
            'error/index'             => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to change icons in Silverlight outofbrowser application?
anyone know of any issues using a link_to_remote to change the state of the
Does anyone know exactly what happens when you change your Zend site at, say,
Does anyone know how can I make change for existing date value in SQL
Does anyone know how to change the default behavior of the /clr switch to
Does anyone know how to change the width of a uitableviewcontroller? I was thinking
Does anyone know how to change the size of a panel in the gui
Does anyone know how I can change the window state of a form, from
Does anyone know a trick to change all web projects in a Visual Studio
Can anyone let me know how can we change the value of kendo combobox

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.