Wrox Programmer Forums
|
BOOK: Building PHP Applications with Symfony, CakePHP, and Zend Framework
This is the forum to discuss the Wrox book Building PHP Applications with Symfony, CakePHP, and Zend Framework by Bartosz Porebski, Karol Przystalski, Leszek Nowak; ISBN: 978-0-470-88734-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Building PHP Applications with Symfony, CakePHP, and Zend Framework section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2012, 06:02 PM
Registered User
 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Call to a member function find() on a non-object

Error: Call to a member function find() on a non-object
File: C:\wamp\www\cake222\app\Controller\AddressesContro ller.php
Line: 6

I am on page 105 Chapter 4: List of All Addresses in the book and get the above error.

The AddressesController gets to the index function below and gets the error.

<?php
class AddressesController extends AppController {
var $name = 'addresses';

function index($id = null) {
$this->set('address_list', $this->Address->find('all'));
}

I cannot continue. What am I doing wrong?

I am using Cake 2.2.2 and PHP 5.3.8 and Apache 2.2.21 and MySQL 5.5.16.

I have the addresses table in the cake database with 1 record.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal error: Call to undefined function pg_query() Gu3rr1lla BOOK: Professional PHP6 0 August 11th, 2011 07:37 PM
Mimicking function find using object oriented VBA code forest2425 Excel VBA 1 March 26th, 2010 10:36 AM
Call to a member function query() on a non-object Boszky Pro PHP 0 November 15th, 2007 09:37 AM
Fatal error: Call to undefined function mysql_pcon surendran Beginning PHP 2 May 23rd, 2006 10:41 PM
error Call to undefined function: query() gmanon Wrox Book Feedback 1 November 20th, 2003 06:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.