Re: CakePHP causes 500 error: fixed!

2008-09-12 Thread Mike

On Sep 12, 4:16 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,
 You already covered most suggestion I might have had, but I thought I
 would post what I get when I write the same syntax.
 My installation of php and CakePHP 1.2 rc2 produces this type of
 output for any syntax error:
 Parse error: syntax error, unexpected '}' in /Users/martin/Sites/cake/
 great/config/core.php on line 43

 I am running Apples Apache on a Mac. If I remember correctly the *AMP
 setups often offer accelerators for php. Is one of them active in your
 setup?

 Try to output phpinfo() from inside Cake and compare to a raw
 phpinfo without the framework loaded. That could yield some small
 configuration change.


Thanks for the tip!  Before trying this out, I ran down another hint
that a friend had suggested, and turns out, that lead me to the
answer.

Which means I can now publically say that I goofed :)

What happened is this:  in my core.php file, I had turned off
debugging, using the Configure::write('debug', 0).  Turns out, this
turns off all debugging info, including PHP error reporting (it
executes error_reporting(0); ).  Thinking about it, this is convenient
and good, but not something I realized.

In my controller file, in the method that was going to be invoked, I
put in the Configure::write('debug', 2); to turn debugging back on.  A
little goofy, perhaps, but it seemed reasonable.  Since it had been a
month since I last looked at my code, I'd forgotten about turning off
the debugging at the global level, and since I was seeing the command
to turn the debugging on in that method, it didn't occur to me to
check for the global setting.

So what happened is this: the app starts up, core.php turns off
error_reporting, there's a syntax error in my controller, but never
gets reported because the syntax error causes the page to stop being
executed before it gets to the command to turn the debugging back on.

*sigh*

Anyways, it's fixed, and things are looking better.

Is there a way to request that the 'no error reporting when debugging
is off' this be added to the documentation?  This was definitely my
mistake, but it might help clarify things for others.  Plus, if we
have the error_reporting keyword in there, Google might index it for
future searches, so it might be easier to find later b/c of that.  If
not, that's fine, too.

Thanks!
--Mike
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: CakePHP causes 500 error: fixed!

2008-09-12 Thread Jon Bennett

Hi Mike,

 Is there a way to request that the 'no error reporting when debugging
 is off' this be added to the documentation?

http://book.cakephp.org/view/42/The-Configuration-Class#CakePHP-Core-Configuration-Variables-44

I'm not sure it's clear enough though, perhaps placing it below the
methods of the Configure class, you miss them as being the 'core' set
up variables - could it have it's own page like
http://book.cakephp.org/view/41/Core-Configuration ?

jb

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---