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 7044987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:28:30+00:00 2026-05-28T02:28:30+00:00

I have a modified AppController.php, logins_controller.php, and a few views For knownusers I get

  • 0

I have a modified AppController.php, logins_controller.php, and a few views

For knownusers I get the following error message: Not sure why, as I’m pointing to the correct controller… Any suggestions?

http://my.ip.address/cakephp/logins/knownusers

Authorization adapter "controller" was not found.

Error: An Internal Error Has Occurred.
Stack Trace

#0 /var/www/cakephp/lib/Cake/Controller/Component/AuthComponent.php(376): AuthComponent->constructAuthorize()
#1 /var/www/cakephp/lib/Cake/Controller/Component/AuthComponent.php(330): AuthComponent->isAuthorized(Array)
#2 [internal function]: AuthComponent->startup(Object(LoginsController))
#3 /var/www/cakephp/lib/Cake/Utility/ObjectCollection.php(103): call_user_func_array(Array, Array)
#4 /var/www/cakephp/lib/Cake/Controller/Controller.php(606): ObjectCollection->trigger('startup', Array)
#5 /var/www/cakephp/lib/Cake/Routing/Dispatcher.php(104): Controller->startupProcess()
#6 /var/www/cakephp/lib/Cake/Routing/Dispatcher.php(89): Dispatcher->_invoke(Object(LoginsController), Object(CakeRequest), Object(CakeResponse))
#7 /var/www/cakephp/app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#8 {main}

AppController.php

App::uses('Controller', 'Controller');

/**
 * This is a placeholder class.
 * Create the same file in app/Controller/AppController.php
 *
 * Add your application-wide methods in the class below, your controllers
 * will inherit them.
 *
 * @package       Cake.Controller
 * @link http://book.cakephp.org/view/957/The-App-Controller
 */
class AppController extends Controller {

public $components = array('Auth');

public $helpers = array('Session', 'Html', 'Form', 'Session');

function beforeFilter(){
        $this->Auth->loginAction = array('controller' => 'logins', 'action' => 'login');
        $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', 'home');
        $this->Auth->allow('display');
        $this->Auth->authorize = 'controller';
        $this->set('Auth',$this->Auth);
}

        function isAuthorized() {
                return true;
        }

}

logins_controller.php

<?php
class LoginsController extends AppController {

        public $name = 'Logins';

        function beforeFilter() {
                // tell Auth not to check authentication when doing the 'register' action
                parent::beforeFilter();
                //$this->Auth->allow('register');
        }

        function register() {
                if (!empty($this->data)){
                        if ($this->Login->save($this->params['data'])) {
                               // $this->flash('Your registration information was accepted. Welcome!','/pages/display/home');
                                $this->Auth->login($this->data);
                                $this->redirect('/pages/display/home');
                        } else {
                                $this->flash('There was a problem with your registration', '/logins/register');
                         }
                 }      

        }

function login() {
                if(!empty($this->data)) {
                        $this->Auth->login($this->data);
                        $this->redirect('/pages/display/home');
                }
        }

        function logout() {
                $this->redirect($this->Auth->logout());
        }

} 
?>

login.ctp

<h1>User Login Form</h1>

<?php
echo $this->Form->create('Login', array('action'=>'login'));
echo $this->Form->input('username');
echo $this->Form->input('password', array('type'=>'password'));
echo $this->Form->submit();
echo $this->Form->end();
?>

knownusers.ctp

<table>
<?php
echo $this->Html->tableHeaders(array_keys($knownusers[0]['Login']));

foreach ($knownusers as $thisuser)
{
        echo $this->Html->tableCells($thisuser['Login']);
}

?>
</table>
  • 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-28T02:28:31+00:00Added an answer on May 28, 2026 at 2:28 am

    CakePHP tries to find the class file according to the argument. eg, ‘controller’ means it tries to find controllerAuthorize.php. It finds it on Windows, as files are case-insensitive.

    On Unix/Linux systems, you should use title case:

        'authorize' => array('Controller')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The error is: You have modified your Gemfile in development but did not check
I have modified my PHP web app to add events to a Google Calendar.
At this URL I have modified/hack together the slideshow. Yet the images are not
I have modified the buddypress admin bar by creating the following plugin which adds
I have a gridview and have modified it following this article: http://msdn.microsoft.com/en-us/library/aa992036.aspx#Y3473 to allow
Mercurial 1.7.5 on Windows. I have a few files I have modified, and want
I have php login script that I have modified with htm tables and css.
I have a CakePHP project where I modified app/config/routes.php so that the root points
I have a a controller referral_medium_controller.php with the following content <?php class ReferralMediumsController extends
For my research purposes, I have modified the php sinterpreter and I want to

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.