Tonight, my Apache instance (OSX 10.5.5 Apache/2.2.9 (Unix) mod_ssl/
2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.5  CakePHP 1.2.0.7692 RC3) threw a
segmentation fault when I tried to use one of my Models from the
app_controller. In my code, this is how I had this setup:

class AppController extends Controller {
        var $helpers = array('Html', 'Javascript', 'ForLayout', 'Tree');
        var $components = array('Session', 'obAuth', 'Cookie');
        var $uses = array('Contentpage'); /* THIS IS THE OFFENDING LINE */
...
}


I discovered this by systematically commenting out every piece of code
that was implementing my Contentpage model. When I commented out the
$uses variable, the segmentation fault went away.

So now my code reads like this to remind me.

class AppController extends Controller {
        var $helpers = array('Html', 'Javascript', 'ForLayout', 'Tree');
        var $components = array('Session', 'obAuth', 'Cookie');
        /*
         * WARNING!!! THIS CAUSES A SEGMENTATION FAULT!! DO NOT USE!!!
         * var $uses = array('Contentpage');
         *
         */
...
}


I've seen some issues in the CakePHP trac regarding segmentation
faults, but nothing of this exact same nature.

As a side note, I thought I would try to use it from another
controller. Initially this worked fine, but when it ran functions
inside of obAuth, I got very unpredictable results. I'm still not
really sure exactly what the nature of that error was. While I was
debugging this, the segmentation fault started up again.

At any rate, I found a way to work around this so it doesn't hinder my
work by putting a different layout on the controllers and actions that
I originally wanted this functionality to execute on. However, I'm not
sure what I'll do if I need a Model available to the app controller.

Has anyone else had this issue?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to