I'd have a look at DboSource::read() as well as _filterResults() and
add some logging in there.
On Mon, May 21, 2012 at 9:00 AM, Michael Salisbury
<michaelsalisbury@gmail.com> wrote:
> Cake Version 2.1
> PHP 5.3.10
> MySQL version 5.0.95 (cpanel server) 5.1.62 (dev server)
> Apache version 2.2.22 (cpanel server) 2.2.20 (dev server)
>
> cpanel server version 11.32.2 (redHat 5.8) (problem child)
> dev server version Ubuntu 11.10 (works perfectly)
>
> My problem is very specific, when I issue find('all') or find('list')
> or any other database retrieve function I get an improperly formed
> array. To troubleshoot this I have created some custom Find types in
> one of my database Models. I then used the Debugger::dump($var)
> command to print to the screen both the $query options that are
> submitted (in the before section )and the $results returned (in the
> after section).
> I have also enabled debug to 2 so I can compare SQL queries at the
> bottom of my web page.
>
> To rule out a problem with the differing MySQL versions I pointed my
> cake database.php config at both the dev server and the cpanel server
> when testing. Yes both MySQL servers have identical copies of the
> database.
>
> Also to deal with the issue of the Debugger::dump($var) command not
> descending more than three levels I have utilized a foreach loop in my
> code.
>
>
> Below you can see that the Dev server $results array has all the
> proper Table names ('College') and it even retrieves data from a
> joined table ('Tickets')
> The Cpanel server strangely injects "(int) 0" were the name 'College'
> should be and does not retrieved the data from the joined table.
>
> Dev server dump($query)...
> array(
> 'conditions' => null,
> 'fields' => null,
> 'joins' => array(),
> 'limit' => (int) 10,
> 'offset' => null,
> 'order' => 'created DESC',
> 'page' => (int) 1,
> 'group' => null,
> 'callbacks' => true
> )
>
> Dev server dunp($results)...
> array(
> 'College' => array(
> 'id' => '14',
> 'name' => 'Rosen College of Hospitality Management',
> 'email' => 'rchm-college@ucf.edu',
> 'created' => '2012-03-21 18:42:05',
> 'modified' => '2012-04-19 11:25:27'
> ),
> 'Ticket' => array()
> )
> array(
> 'College' => array(
> 'id' => '13',
> 'name' => 'Interdisciplinary Studies',
> 'email' => 'is-college@ucf.edu',
> 'created' => '2012-03-21 18:41:47',
> 'modified' => '2012-04-19 11:25:21'
> ),
> 'Ticket' => array(
> (int) 0 => array(
> )
> )
> )
> array(
> 'College' => array(
> 'id' => '12',
> 'name' => 'Florida Interactive Entertainment Academy',
> 'email' => 'fiea-college@ucf.edu',
> 'created' => '2012-03-21 18:41:33',
> 'modified' => '2012-04-19 11:25:13'
> ),
> 'Ticket' => array()
> )
> array(
> 'College' => array(
> 'id' => '11',
> 'name' => 'College of Sciences',
> 'email' => 'cos-college@ucf.edu',
> 'created' => '2012-03-21 18:41:16',
> 'modified' => '2012-04-19 11:25:08'
> ),
> 'Ticket' => array(
> (int) 0 => array(
> ),
> (int) 1 => array(
> )
> )
> )
>
> Cpanel Server dump($query)...
> array(
> 'conditions' => null,
> 'fields' => null,
> 'joins' => array(),
> 'limit' => (int) 10,
> 'offset' => null,
> 'order' => 'created DESC',
> 'page' => (int) 1,
> 'group' => null,
> 'callbacks' => true
> )
>
> Cpanel Server dump($results)...
> array(
> (int) 0 => array(
> 'id' => '14',
> 'name' => 'Rosen College of Hospitality Management',
> 'email' => 'rchm-college@ucf.edu',
> 'created' => '2012-03-21 18:42:05',
> 'modified' => '2012-04-19 11:25:27'
> )
> )
> array(
> (int) 0 => array(
> 'id' => '13',
> 'name' => 'Interdisciplinary Studies',
> 'email' => 'is-college@ucf.edu',
> 'created' => '2012-03-21 18:41:47',
> 'modified' => '2012-04-19 11:25:21'
> )
> )
> array(
> (int) 0 => array(
> 'id' => '12',
> 'name' => 'Florida Interactive Entertainment Academy',
> 'email' => 'fiea-college@ucf.edu',
> 'created' => '2012-03-21 18:41:33',
> 'modified' => '2012-04-19 11:25:13'
> )
> )
> array(
> (int) 0 => array(
> 'id' => '11',
> 'name' => 'College of Sciences',
> 'email' => 'cos-college@ucf.edu',
> 'created' => '2012-03-21 18:41:16',
> 'modified' => '2012-04-19 11:25:08'
> )
> )
> array(
> (int) 0 => array(
> 'id' => '10',
> 'name' => 'College of Optics and Photonics',
> 'email' => 'creol-college@ucf.edu',
> 'created' => '2012-03-21 18:41:10',
> 'modified' => '2012-04-19 11:24:59'
> )
> )
>
>
> Help, ideas, anything! Maybe I need to troubleshoot the afterSave code
> but I'm not sure were that lives or how to manipulate it.
>
> --
> Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Sunday, May 27, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment