CakePHP Weekly Summaries Issue #1

January 4, 2008 – 10:23 pm
Table of Content [Hide]

Welcome to the first issue of CakePHP Weekly Summary. Below you’ll find all sorts of interesting topics that were discussed on the CakePHP mailing list and on SVN.

This week alot happened, but the biggest news is that CakePHP 1.2 have entered BETA phase, and with that – we are close to a feature (API) freeze of the 1.2 branch.

•••••••••••••••••••••••••••••••••••••••••••••••••••••••

CakePHP 1.2 beta

Yes, finally it happened. Please look at my post about the .

Trac changes

Google group topics

How to find referrer url?

A guy called ‘krr’ opened a question how to find referrer url?, and Daniel Hofstetter quickly replied that Controller::referer() would return the referer.

Will CakePHP be able to survive as the Zend Framework matures?

The framework war ignited yet again when “Action” created Will CakePHP be able to survive as the Zend Framework matures?.

Upgrade problems

Following the release of 1.2 beta “Mech7″ Upgrade problems after upgrading his application to the new beta verion. Chris Hartjes quite replied that Mech7 should check his apache and php error logs. Mech7 however, quickly replied that the error was solved (after only 9 minutes), and his solution was to clear the app/tmp/cache folder in this app.
I had however already written a list of steps I follow when my application suffers from the White Screen Of Death:

  • Check that debug > 0
  • Clear app/tmp/cache/persistent/*
  • Check local vhost error log
  • Check global httpd-error log
  • Restart apache, (stop, start), restart cache services (memcached ect.)
  • Enter the world of die(’stop’); from app/webroot/index.php and downward in your application

Table inheritance, multiple schemas, and associations

Brian had a interesting question, well, for us postgresql users at least, table inheritance, multiple schemas, and associations. There we no response to this thread, but after a few hours, he returned with a working solution, very interesting stuff. :)

Depricated ListControllers

Ronald Chaplin asked what the ‘new’ way was in 1.2 to get a list of controllers in your application, since 1.2 had Depricated ListControllers ( listClasses( CONTROLLERS ); ). He had tried Configure::listObjects(‘controller’, ‘/app/controller’);, but without success.
Arno Esterhuizen quickly pointed Ronald in the right direction, the CakePHP 1.2 api

OthAuth looses session – upgrading to new 1.2.0.6311 (2008)

Klaus had a problem, othAuth looses session – upgrading to new 1.2.0.6311 (2008), but so far no replies, might be a local issue on his setup?

Themes management for an app ?

Max asked if anyone had a component/helper for Themes management for an app ?. Tarique shamelessly pointed to his own blog, where there is quick guide on how to make cakephp use ThemeView.

Cakephp with PHP 5 and Mysql 5

One of the too often asked questions on the group was asked yet again, Cakephp with PHP 5 and Mysql 5, and yes. CakePHP works fine with both MySQL5 and PHP5!!. Its rather funny, or sad depending on who you are, that the same questions is asked over and over on the googlegroups…. I’m sure the CakePHP guys chose google for a reason ;)

Bug for find('All'

Another of repeating posts on the mailing list is the “I think I have found a bug” or just bug for find('All' in this case. And as always, people always point directly to Trac bugtracket, as its the one and only place to submit possible bugs..

CakeFest website Launched

Mariano Iglesias announced that the CakeFest website Launched! There was no replies or reactions on the list, I just hope that people did not overlook this little gem :)

Bakery hates me

Adam Royle claimed that “bakery hates me“, because he was not able to comment on a bakery article. Mariano Iglesias was quick to point to tracwebsite, but a Dr. Hannibal Lecter was snappy, and said “I don’t think posting links to Trac solves anything, it is a fact that bakery has many issues (some minor and some..not so minor). Some things should be seriously reconsidered and rewritten. But that’s just my 2c.”.

As much as Chris Hartjes agreed with Dr. Hannibal Lecter, he pointed out the important fact that trac is still the one and only place for bugs on cakephp related projects.
Dr. Hannibal Lecter hoped that someone from the core team was following the group, since it wouldn’t be very (And I quote) “userfriendly community” if they didnt.
Dr. Tarique Sani (Whats up with all those doctors?) replied that it was unfair against the php team to mark the community less userfriendly because users finding bugs wouldn’t bother to create tickets on trac, and just posting the errors on the mailing list.
And FWIW my personal experience is that posting in trac works

Adam Royle said that the reason why he hadn’t posted a bug report on trac yet was because he didn’t like opening tickets without a patch or solid way to reproduce the error.
Dr. Hannibal Lecter returned a apologized that it was not his intention to be unfair against the CakePHP team, and that he really appreciated their efforts. He was however puzzled that the creators of such a great framework as CakePHP would neglect The Bakeryand made a rather good point: If new users use the bakery, and its full of errors, what would they think of the underlying framework as well?
Adam Royle returned to the discussion and tried to get answers on his two original questions

  • He was unhappy wit the quality of this article on the bakery
  • What version of cake is the bakery running on? (1.2 pre-historic afaik)

Chris Hartjes, our favorite grumpy Canadian, closed the thread with a few harsh comments I’m not going to quote here :) Larry E. Masters aka PhpNut posted his announcement on the new 1.2 beta at: New Year, New Beta, that received a few “thanks”, but nothing else of interested.

Require SSL for entire site?

Bryan Encina asked if it was possible to Require SSL for entire site?. His own idea was to check $_SERVER['HTTPS'] in his AppController, and then redirect based on this. Chris Hartjes questioned the safety of $_SERVER['HTTPS'] (its perfectly safe), to his understanding, it was possible to spoof (its not) this variable. His suggestion was to limit access on webserver level instead of application level.

I (Christian Winther) pointed out that mod_rewrite would be a perfect solution for this problem, since the RewriteCond directive could check for both SERVER_PORT (port 80 = non ssl, port 443 = ssl) and SERVER_PROTOCOL (http = non ssl, https = ssl)
. Robby Anderson suggested using the SecurityComponent::requireSecure() method instead, also a possible solution if you wish to let ssl management be up to the application (htaccess will most likely perform alot better if its just for redirect).
Chris Hartjes returned to the thread because he had felt a bit wierd about his earlier reply to the group, and confirmed that $_SERVER['HTTPS'] indeed cannot be spoofed. He suggested using Robby’s solution.

Tags: , ,

  1. 15 Responses to “CakePHP Weekly Summaries Issue #1”

  2. Great post!

    Posts like this are really helpful for us. Keep up your good work!

    By QAD on Jan 5, 2008

  3. Thanks for providing this summary of recent activity – I’ll be definitely coming back to see future posts like this on your blog :)

    By Sliv on Jan 5, 2008

  4. since the RewriteCond directive could check for both SERVER_PORT (port 80 = non ssl, port 443 = ssl) and SERVER_PORT (port 80 = non ssl, port 443 = ssl)
    should be:
    SERVER_PORT (port 80 = non ssl, port 443 = ssl)
    SERVER_PROTOCOL (http = non ssl, https = ssl)
    like you wrote in the newsgroup

    By Marc on Jan 5, 2008

  5. @3 (Marc) You are right ! Thanks, I have fixed it now

    By Christian Winther on Jan 5, 2008

  6. i just found it. and i just want to say that this is a great idea. :)

    happy baking.

    By lobaman on Jan 5, 2008

  7. Christian, you’re the man ;) All I can say is WOW and THANK YOU.

    You’re a definite cake addict.

    By Shane on Jan 5, 2008

  8. Very nice Christian. I’ll definitely be checking here weekly.

    FYI, your English is fine.

    By Robby Anderson on Jan 5, 2008

  9. Great post!

    By Frank on Jan 5, 2008

  10. great work,

    we(the community) need actions like that,
    subscribe the rss blog,

    thanks!

    By lucaspirola on Jan 5, 2008

  11. Yeah! Keep up the good work. I’ll subscribe to this via RSS for sure!

    By Dixon on Jan 6, 2008

  12. Hey – I was wondering what would be the frequency of the *weekly* summaries?

    By Tarique Sani on Jan 16, 2008

  13. Hey Tarique,
    Yeah, the plan was it to be weekly, but this week it has collapsed with me starting a new part time job :) So I have been quite busy trying to make most of the less time I suddently have. I’m 80% done with the second edition, just need a little bit of audit and spellchech and then it should be out. Probably today or early tomorrow

    By Christian Winther on Jan 16, 2008

  1. 3 Trackback(s)

  2. Jan 7, 2008: Internet Explorer Script Error » Blog Archive » CakePHP Weekly Summaries Issue #1
  3. Jan 8, 2008: Cherry on the… » Une semaine dans le monde de cakePHP
  4. Dec 16, 2008: CakePHP Digest Volume #3 :: PseudoCoder.com

Post a Comment