5 Replies - 776 Views - Last Post: 28 November 2011 - 10:17 AM Rate Topic: -----

#1 CiE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 02-November 09

Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 07:14 AM

Hi everyone i'm pretty much a newb at cakephp. I was able to upload it to fatcow just fine and get the initial page. If you want you can go to it to check.

http://www.passkeyguardian.com

It loads up fine. I am following an ebook and i set everything up correctly, but when i goto: http://www.passkeygu...n.com/users/add i get a Missing Controller error saying it could not be found. Also i added a command that i guess displays the directory at the top. I am not sure if this has to do with the /app/webroot/index.php directories and i don't know exactly what to modify so any help/guidance would be appreciated. thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Issue with cakephp and FatCow Hosting

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 08:05 AM

OK, you have a users_controller.php, because I can go to it without a missing controller error. HOWEVER, you do have an error in that file that is likely the root of the problem:

Quote

Parse error: syntax error, unexpected ':' in /hermes/web03/b1574/moo.ciegate/passkeyguardian/app/Controller/users_controller.php on line 4


Fix that and see if it works.
Was This Post Helpful? 1
  • +
  • -

#3 CiE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 02-November 09

Re: Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 08:26 AM

View PostJackOfAllTrades, on 28 November 2011 - 08:05 AM, said:

OK, you have a users_controller.php, because I can go to it without a missing controller error. HOWEVER, you do have an error in that file that is likely the root of the problem:

Quote

Parse error: syntax error, unexpected ':' in /hermes/web03/b1574/moo.ciegate/passkeyguardian/app/Controller/users_controller.php on line 4


Fix that and see if it works.



i removed that colon, but it still does not work can you check again on your end?
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 08:27 AM

It's still there when I go to http://www.passkeyguardian.com/users

You CAN test that yourself you know.
Was This Post Helpful? 0
  • +
  • -

#5 CiE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 02-November 09

Re: Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 08:55 AM

View PostJackOfAllTrades, on 28 November 2011 - 08:27 AM, said:

It's still there when I go to http://www.passkeyguardian.com/users

You CAN test that yourself you know.



Now i am getting a different error in /users.

Quote

Fatal error: Call to a member function allow() on a non-object in /hermes/web03/b1574/moo.ciegate/passkeyguardian/app/Controller/users_controller.php on line 6


Here is the users_controller.php

<?php
class UsersController extends AppController {
	
		public function beforeFilter() {
			parent::beforeFilter();
			$this->Auth->allow('add');
	}
	public function add() {
			if (!empty($this->data)) {
					$this->User->create();
					if ($this->User->save($this->data)) {
							$this->Session->setFlash('User created!');
							$this->redirect(array('action'=>'login'));
					} else {
							$this->Session->setFlash('Please correct the errors');
					}
			}
	}

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


This post has been edited by CiE: 28 November 2011 - 08:57 AM

Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Issue with cakephp and FatCow Hosting

Posted 28 November 2011 - 10:17 AM

Do you have the Auth component listed in your app_controller?

var $components = array('Auth');

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1