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:
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
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: Cakephp, english, weekly summaries