Re: Fórum sobre CakePHP
Valeu Juan, vou me cadastrar já! Abraços Pessoal, Não sei se vocês conheciam o fórum não oficial do CakePHP (http:// www.cakephpforum.net), mas agora ele conta com um cantinho português lá. Eu participo do fórum e esta semana eu dei a sugestão de criarem áreas separadas por idiomas também. Sendo assim o português está lá no link: http://www.cakephpforum.net/index.php?showforum=20 Não sei quanto a vocês, mas eu prefiro um fórum que um groups de e- mail para esse tipo de coisa, até por ficar mais organizado e fácil procura. Abraços, Juan Basso http://juan.basso.eng.br --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para cake-php-pt- [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~--- -~~~--~~--~--~--- __ NOD32 2688 (20071127) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Tutorial de ACL
Galera, alguém ai sabe indicar um bom (e fácil) tutorial que explique o funcionamento do ACL no cakephp, tanto teórico como prático? Tentei seguir o tutorial da IBM mas apanhei bastante e não entendi mta coisa. Se alguem puder dar uma mão, creio q várias pessoas tem dificuldade nisto. Abraços --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Tutorial de ACL
Boas Bill, Aqui vão alguns links sobre ACL: http://bakery.cakephp.org/articles/view/acl-management-plugin http://www.ogrn.com/andy/2007/06/26/granting-access-using-acl-in-cakephp-12/ http://www.ogrn.com/andy/2007/07/10/auth-changes-in-cakephp-12-and-how-to-use-basic-auth/ http://lemoncake.wordpress.com/2007/07/15/using-aclbehavior-in-cakephp-12/ http://lemoncake.wordpress.com/2007/07/19/acl-with-groups/ http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully-useful-tutorial-for-using-cakephps-auth-component/ http://lemoncake.wordpress.com/2007/10/10/extending-acl-to-per-field/ Espero que ajude On Nov 27, 2007 7:32 PM, Bill [EMAIL PROTECTED] wrote: Galera, alguém ai sabe indicar um bom (e fácil) tutorial que explique o funcionamento do ACL no cakephp, tanto teórico como prático? Tentei seguir o tutorial da IBM mas apanhei bastante e não entendi mta coisa. Se alguem puder dar uma mão, creio q várias pessoas tem dificuldade nisto. Abraços -- Gustavo Carreno --- http://batxman.wordpress.com If you know Red Hat you know Red Hat, If you know Slackware you know Linux --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Tutorial de ACL
Valeu pela ajuda. Uma pena q estes endereços estão fora http://www.ogrn.com/andy/2007/06/26/granting-access-using-acl-in-cakephp-12/ http://www.ogrn.com/andy/2007/07/10/auth-changes-in-cakephp-12-and-how-to-use-basic-auth/ Abraços Boas Bill, Aqui vão alguns links sobre ACL: http://bakery.cakephp.org/articles/view/acl-management-plugin http://www.ogrn.com/andy/2007/06/26/granting-access-using-acl-in- cakephp-12/ http://www.ogrn.com/andy/2007/07/10/auth-changes-in- cakephp-12-and-how-to-use-basic-auth/ http://lemoncake.wordpress.com/2007/07/15/using-aclbehavior-in- cakephp-12/ http://lemoncake.wordpress.com/2007/07/19/acl-with- groups/ http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1- 2-x http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully- useful-tutorial-for-using-cakephps-auth-component/ http://lemoncake.wordpress.com/2007/10/10/extending-acl-to-per- field/ Espero que ajude On Nov 27, 2007 7:32 PM, Bill wrote: Galera, alguém ai sabe indicar um bom (e fácil) tutorial que explique o funcionamento do ACL no cakephp, tanto teórico como prático? Tentei seguir o tutorial da IBM mas apanhei bastante e não entendi mta coisa. Se alguem puder dar uma mão, creio q várias pessoas tem dificuldade nisto. Abraços --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Tutorial de ACL
Galera, eu de novo enchendo o saco. Fiz um form de autenticação simples aqui, usando o cake 1.1.18, seguindo um tutorial do site da IBM. Funcionou perfeito. Fui tentar rodar ele no cake 1.2 pre-beta e nada feito... Criei um arquivo, users_controller.php, e para a função de login fiz o seguinte: function login() { $this-set('error', false); if($this-data) { $results = $this-User-findByUsername($this-data['User']['username']); if($results $results['User']['password'] == md5($this-data['User']['password'])) { $this-Session-write('user', $this-data['User']['username']); $this-Session-write('last_login', $results['User']['last_login']); $results['User']['last_login'] = date(Y-m-d H:i:s); $this-User-save($results); $this-redirect('/users/index'); } else { $this-set('error', true); } } } Alguém sabe o que está errado, pois o mesmo código, rodando no cake 1.1.18 funciona, mas no cake 1.2 não funciona. Valeu galera Valeu pela ajuda. Uma pena q estes endereços estão fora http://www.ogrn.com/andy/2007/06/26/granting-access-using-acl-in- cakephp-12/ http://www.ogrn.com/andy/2007/07/10/auth-changes-in-cakephp-12-and- how-to-use-basic-auth/ Abraços Boas Bill, Aqui vão alguns links sobre ACL: http://bakery.cakephp.org/articles/view/acl-management-plugin http://www.ogrn.com/andy/2007/06/26/granting-access-using-acl-in- cakephp-12/ http://www.ogrn.com/andy/2007/07/10/auth-changes-in- cakephp-12-and-how-to-use-basic-auth/ http://lemoncake.wordpress.com/2007/07/15/using-aclbehavior-in- cakephp-12/ http://lemoncake.wordpress.com/2007/07/19/acl-with- groups/ http://bakery.cakephp.org/articles/view/how-to-use-acl-in- 1- 2-x http://www.littlehart.net/atthekeyboard/2007/09/11/a- hopefully- useful-tutorial-for-using-cakephps-auth-component/ http://lemoncake.wordpress.com/2007/10/10/extending-acl-to-per- field/ Espero que ajude On Nov 27, 2007 7:32 PM, Bill wrote: Galera, alguém ai sabe indicar um bom (e fácil) tutorial que explique o funcionamento do ACL no cakephp, tanto teórico como prático? Tentei seguir o tutorial da IBM mas apanhei bastante e não entendi mta coisa. Se alguem puder dar uma mão, creio q várias pessoas tem dificuldade nisto. Abraços --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para cake-php-pt- [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~-- ~~~~--~~--~--~--- __ NOD32 2689 (20071127) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Display Dynamic Images in Cake??
Hi All, This seems to have come up a number of times before, but I have not found a definitive answer. I am trying to generate a dynamic image (in this case, a barcode from a PHP barcode generation library). I have tried every combination of headers, views, layouts, etc. and still all I get is the raw image string (in view source) and not the image properly rendered. Even when I try to save the image to the filesystem, it is blank. I know the library works, because I paste almost identical code outside of Cake and all is perfect. Does anyone have a definitive way to display image data in Cake? (Version 1.1x please ;) Thanks much, Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Did you set the headers correctly (content type etc)? Do you have a space (or more than one) appearing at the beginning of your image file which would cause these problems? What PHP barcode generation library are you using? Wayne On 11/27/07, jonathan [EMAIL PROTECTED] wrote: Hi All, This seems to have come up a number of times before, but I have not found a definitive answer. I am trying to generate a dynamic image (in this case, a barcode from a PHP barcode generation library). I have tried every combination of headers, views, layouts, etc. and still all I get is the raw image string (in view source) and not the image properly rendered. Even when I try to save the image to the filesystem, it is blank. I know the library works, because I paste almost identical code outside of Cake and all is perfect. Does anyone have a definitive way to display image data in Cake? (Version 1.1x please ;) Thanks much, Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Cake and ThemeView class
i made others tests. var $theme = 'Theme'; in the controller ; call effectivly the ThemeView class. i debug the ThemView class to understand how its working function __construct ($controller) { parent::__construct($controller); $this-theme = $controller-theme; echo premy theme .$this-theme./pre; if (!empty($this-theme)) { if (is_dir(WWW_ROOT . 'themed' . DS . $this-theme)) { $this-themeWeb = 'themed/'. $this-theme .'/'; echo premy themeWeb .$this-themeWeb./pre; } $this-themeElement = 'themed'. DS . $this-theme . DS .'elements'. DS; $this-themeLayout = 'themed'. DS . $this-theme . DS .'layouts'. DS; $this-themePath = 'themed'. DS . $this-theme . DS; echo pre.$this-themeElement . . $this- themeLayout . . $this-themePath . /pre; } } i enter in the __construct method all is well define and set but the files i put in the elements and layouts are not used. do i miss somthing else ? Kind Regards. On 27 nov, 08:54, foxmask [EMAIL PROTECTED] wrote: Hi, i already tried it, and also, as suggest in another thread, copying from cake/view/theme.php in the myapp/view directory that does not solve the issue. may be the theme management is not ready yet . Kind Regards. On 27 nov, 02:48, Gwoo [EMAIL PROTECTED] wrote: try setting var $view = 'Theme'; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Hey Wayne, The image is a PNG so I am using the content-type MIME for PNG. I do not know how any spaces could work their way in there. The same code works outside Cake. It's called rDataMatrix and relies on the bundled GD Library. Again, outside Cake, nothing but joy. Inside Cake, one of my few moments of misery. There must be something with the framework that is altering the image information, or I need to do one more step to keep the image in the proper format? Even when I store to a file, the image is corrupted. On Nov 27, 2:42 am, Wayne Fay [EMAIL PROTECTED] wrote: Did you set the headers correctly (content type etc)? Do you have a space (or more than one) appearing at the beginning of your image file which would cause these problems? What PHP barcode generation library are you using? Wayne On 11/27/07, jonathan [EMAIL PROTECTED] wrote: Hi All, This seems to have come up a number of times before, but I have not found a definitive answer. I am trying to generate a dynamic image (in this case, a barcode from a PHP barcode generation library). I have tried every combination of headers, views, layouts, etc. and still all I get is the raw image string (in view source) and not the image properly rendered. Even when I try to save the image to the filesystem, it is blank. I know the library works, because I paste almost identical code outside of Cake and all is perfect. Does anyone have a definitive way to display image data in Cake? (Version 1.1x please ;) Thanks much, Jonathan- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Just so you know what the code looks like (nothing fancy at all), here is the action within my Orders controller. By commenting out the setFilePath it should output to the browser: function storeBarcode($oid) { $this-layout=NULL; $this-autoRender = false; $bc = new DataMatrix(); $bc-setBGColor(WHITE); $bc-setBarColor(BLACK); $bc-setEncoding(AUTO); $bc-setFormat(8x18); $bc-setQuiteZone(10); $bc-setModuleSize(4); //$bc-setFilePath('img/barcodes/'); $bc-paint($oid); } Here is a link to a working app outside Cake: http://www.intraviewvs.net/barcode/show_barcode.php?code=12345678 Here is a link to the Cake install (use FF to view source): https://www.intraviewvs.net/apps/orders/storeBarcode/12345678 The code in each case is identical, aside from the Cake-isms (turning off render and layout). Any insight at all would be stellar at this point... On Nov 27, 3:01 am, jonathan [EMAIL PROTECTED] wrote: Hey Wayne, The image is a PNG so I am using the content-type MIME for PNG. I do not know how any spaces could work their way in there. The same code works outside Cake. It's called rDataMatrix and relies on the bundled GD Library. Again, outside Cake, nothing but joy. Inside Cake, one of my few moments of misery. There must be something with the framework that is altering the image information, or I need to do one more step to keep the image in the proper format? Even when I store to a file, the image is corrupted. On Nov 27, 2:42 am, Wayne Fay [EMAIL PROTECTED] wrote: Did you set the headers correctly (content type etc)? Do you have a space (or more than one) appearing at the beginning of your image file which would cause these problems? What PHP barcode generation library are you using? Wayne On 11/27/07, jonathan [EMAIL PROTECTED] wrote: Hi All, This seems to have come up a number of times before, but I have not found a definitive answer. I am trying to generate a dynamic image (in this case, a barcode from a PHP barcode generation library). I have tried every combination of headers, views, layouts, etc. and still all I get is the raw image string (in view source) and not the image properly rendered. Even when I try to save the image to the filesystem, it is blank. I know the library works, because I paste almost identical code outside of Cake and all is perfect. Does anyone have a definitive way to display image data in Cake? (Version 1.1x please ;) Thanks much, Jonathan- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Tree behaviour
Hi Guys, I am looking for working with Tree behaviour however i am not finding any Tutorials or article for it. I am having cake1.2 pre beta. pls help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
OK, now I am just talking to myself, but I have had some stellar insight for anyone following along. The problem is apparently not in the display of the image, but in the generation of the image. I remember having some issues with global variables in the framework from time to time, and I think that's the culprit here. I will post the final findings for any interested parties... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Looks like you are messing with it now - there is an obvious print_r and br/ before the file data now. Are you calling exit() after the file data is output, or otherwise ensuring that cake doesn't attempt to render a view? On Nov 27, 7:09 pm, jonathan [EMAIL PROTECTED] wrote: Just so you know what the code looks like (nothing fancy at all), here is the action within my Orders controller. By commenting out the setFilePath it should output to the browser: function storeBarcode($oid) { $this-layout=NULL; $this-autoRender = false; $bc = new DataMatrix(); $bc-setBGColor(WHITE); $bc-setBarColor(BLACK); $bc-setEncoding(AUTO); $bc-setFormat(8x18); $bc-setQuiteZone(10); $bc-setModuleSize(4); //$bc-setFilePath('img/barcodes/'); $bc-paint($oid); } Here is a link to a working app outside Cake:http://www.intraviewvs.net/barcode/show_barcode.php?code=12345678 Here is a link to the Cake install (use FF to view source):https://www.intraviewvs.net/apps/orders/storeBarcode/12345678 The code in each case is identical, aside from the Cake-isms (turning off render and layout). Any insight at all would be stellar at this point... On Nov 27, 3:01 am, jonathan [EMAIL PROTECTED] wrote: Hey Wayne, The image is a PNG so I am using the content-type MIME for PNG. I do not know how any spaces could work their way in there. The same code works outside Cake. It's called rDataMatrix and relies on the bundled GD Library. Again, outside Cake, nothing but joy. Inside Cake, one of my few moments of misery. There must be something with the framework that is altering the image information, or I need to do one more step to keep the image in the proper format? Even when I store to a file, the image is corrupted. On Nov 27, 2:42 am, Wayne Fay [EMAIL PROTECTED] wrote: Did you set the headers correctly (content type etc)? Do you have a space (or more than one) appearing at the beginning of your image file which would cause these problems? What PHP barcode generation library are you using? Wayne On 11/27/07, jonathan [EMAIL PROTECTED] wrote: Hi All, This seems to have come up a number of times before, but I have not found a definitive answer. I am trying to generate a dynamic image (in this case, a barcode from a PHP barcode generation library). I have tried every combination of headers, views, layouts, etc. and still all I get is the raw image string (in view source) and not the image properly rendered. Even when I try to save the image to the filesystem, it is blank. I know the library works, because I paste almost identical code outside of Cake and all is perfect. Does anyone have a definitive way to display image data in Cake? (Version 1.1x please ;) Thanks much, Jonathan- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Indeed the problem was globals not being seen globally. I added some global statements and joy is mine again. On Nov 27, 3:27 am, jonathan [EMAIL PROTECTED] wrote: OK, now I am just talking to myself, but I have had some stellar insight for anyone following along. The problem is apparently not in the display of the image, but in the generation of the image. I remember having some issues with global variables in the framework from time to time, and I think that's the culprit here. I will post the final findings for any interested parties... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
I need your help in cake PHP
Hi, I am very much interested to learn cake PHP. I have downloaded cakePHP in my pc and changed the database settings but in starting page i have seen this message your are able to connect database. How can i create front page. Please help me on this i struggled alot for displaying the page. Thanks, Bhaskar.P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Load balanced web servers with CakePHP
My application is currently running on a load balanced setup but app/ tmp is unique per server. The current problem is that the cache would be stored on a per server basis which means there is no easy way of clearing the cache. I am thinking of mounting the cache folder on the web servers to a common NFS server so multiple web servers share the same cache folder. Possibly could have the whole temp directory shared by all web servers but not sure if it is feasible. Anyone here running CakePHP on a load balanced setup as well? Other than my cache issue, I would like to know about your setup! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: I need your help in cake PHP
Check out the basic blog tutorial on the CakePHP website. That tells you everything you need to know to get up and running. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Load balanced web servers with CakePHP
Have you considered using memcached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Cake and ThemeView class
it seems we also need to have this directory tree app/view/themed/themeA/view1 app/view/themed/themeA/view2 app/view/themed/themeB/view1 app/view/themed/themeB/view2 plus webroot/themed/themeA/ webroot/themed/themeB/ On 27 nov, 10:00, foxmask [EMAIL PROTECTED] wrote: i made others tests. var $theme = 'Theme'; in the controller ; call effectivly the ThemeView class. i debug the ThemView class to understand how its working function __construct ($controller) { parent::__construct($controller); $this-theme = $controller-theme; echo premy theme .$this-theme./pre; if (!empty($this-theme)) { if (is_dir(WWW_ROOT . 'themed' . DS . $this-theme)) { $this-themeWeb = 'themed/'. $this-theme .'/'; echo premy themeWeb .$this-themeWeb./pre; } $this-themeElement = 'themed'. DS . $this-theme . DS .'elements'. DS; $this-themeLayout = 'themed'. DS . $this-theme . DS .'layouts'. DS; $this-themePath = 'themed'. DS . $this-theme . DS; echo pre.$this-themeElement . . $this-themeLayout . . $this-themePath . /pre; } } i enter in the __construct method all is well define and set but the files i put in the elements and layouts are not used. do i miss somthing else ? Kind Regards. On 27 nov, 08:54, foxmask [EMAIL PROTECTED] wrote: Hi, i already tried it, and also, as suggest in another thread, copying from cake/view/theme.php in the myapp/view directory that does not solve the issue. may be the theme management is not ready yet . Kind Regards. On 27 nov, 02:48, Gwoo [EMAIL PROTECTED] wrote: try setting var $view = 'Theme'; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Dynamic language change
Hi, I´m having troubles making a backend app, I need to send different messages to different users, and they can have different languages associated. How can I make a dynamic change to the language, using i18n? With dynamic, I´m reffering to the same HTTP request. Thanks. Martin Bavio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Dynamic language change
Try writing associated language in controller before action and write again your default language after action... BTW, do you have any good way to save one recored in two different languages (with one id)? I cant make it work with new i18n table --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Load balanced web servers with CakePHP
I have read about it but nope, never consider it yet. Seems like a pretty good replacement though since it's meant to be a global cache. How is Cake's support for memcache? You tried it personally? On Nov 27, 7:05 pm, bgmill [EMAIL PROTECTED] wrote: Have you considered using memcached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Expecting ControllerName.htmlController error
Hi guys, I developed a simple controller that shows news... I'm using cake 1.2 ( http://www.atriumnet.com.br/noticias/ler/3 ) And I got this error: Missing controller You are seeing this error because controller Noticias.htmlController could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.ctp Fatal: Create the class below in file: app/controllers/ noticias.html_controller.php ?php class Noticias.htmlController extends AppController { var $name = 'Noticias.html'; } ? Why is cake expecting ControllerName.htmlController as the name of class? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Expecting ControllerName.htmlController error
because you put it in the $name On Nov 27, 2007 6:38 AM, Tulio Faria [EMAIL PROTECTED] wrote: Hi guys, I developed a simple controller that shows news... I'm using cake 1.2 ( http://www.atriumnet.com.br/noticias/ler/3 ) And I got this error: Missing controller You are seeing this error because controller Noticias.htmlController could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.ctp Fatal: Create the class below in file: app/controllers/ noticias.html_controller.php ?php class Noticias.htmlController extends AppController { var $name = 'Noticias.html'; } ? Why is cake expecting ControllerName.htmlController as the name of class? Thanks -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Problems modeling User - Friend HABTM associations
nate, Sam D: thank you for your replies! could be this one http://othy.wordpress.com/2006/06/03/unbind-all-associations-except-s... Sam D Yes, I'm using Oth's method mainly in an effort to optimize my applications as a last phase - to remove unnecessary DB queries. I didn't feel it was worth mentioning. In this particular case I'm using it to cut off the rest of the associated models in order to get a cleaner output arrays. Take the associations out of your UserFriend model. They're implied, as UserFriend is already being used to join User and Friend. Yes, they're implied, but when I remove them I'm not able to fetch anything beyond UserFriend when issuing $this-User-UserFriend- findAll(): Outgoing_requests: Array ( [0] = Array ( [FanFriend] = Array ( [id] = 1 [fan_id] = 1 [friend_id] = 2 [requested] = 2007-11-21 16:23:50 [accepted] = [active] = 0 ) ) [1] = Array ( [FanFriend] = Array ( [id] = 5 [fan_id] = 1 [friend_id] = 3 [requested] = 2007-11-26 18:13:59 [accepted] = [active] = 0 ) ) ) I've been able to find my way through this and these are the steps I've undertaken to achieve it: 1) As users_friends was violating the principle of alphabetically ordered foreign keys of the join table, I've renamed the association model to FanFriend, the corresponding DB table to `fans_friends` and the foreign key `user_id` to `fan_id`. It still holds semantic meaning as the user that initiates the friend request could be considered a fan of the other user, and only after the target user accepts the request they both become friends 2) I noticed that I've erroneously designated the foreign keys of the HABTM association. In models/user.php foreign_key and associationForeignKey should have their places switched. Was: var $hasAndBelongsToMany = array( 'Friend' = array( 'className'= 'User', 'joinTable'= 'users_friends', 'foreignKey' = 'friend_id', 'associationForeignKey'= 'user_id', 'unique' = true, 'with' = 'UserFriend', ), ); Is now: var $hasAndBelongsToMany = array( 'Friend' = array( 'className'= 'Friend', 'joinTable'= 'fans_friends', 'foreignKey' = 'fan_id', 'associationForeignKey'= 'friend_id', 'with' = 'FanFriend', ), ); 3) As can be seen in the latest version of the habtm association, not only the foreign keys have switched places, but I've also changed the className - it's not User anymore, but is 'Friend'. Yes, I've found out that I'm not able to fetch associated model data beyond a model associated via an alias, no matter what the className was. I've come to this conclusion by setting up a minimalistic version of my scenario - User hasAndBelongsToMany Friend (className = 'User') and User hasMany Photo. No matter how high I set the recursive flag of the findAll() method, I'm only getting the associated photos on the User side of the association. The Friend side remained bare - nothing beyond it. So, I figured the only way to get anything beyond Friend was to implement a model for the Friend association and bind the Photo model to it like this: models/friend.php: class Friend extends AppModel { var $name = 'Friend'; var $useTable = 'users'; var $hasMany = array( 'Photo' = array( 'className' = 'Photo', 'foreignKey'= 'user_id', 'order' = 'Photo.primary DESC, Photo.id ASC', 'dependent' = true, ), ); } I first tried to avoid creating a dedicated Friend model, by trying in users_controller.php: $this-User-FanFriend-Friend-bindModel('Photo'), but it didn't work, so as a last resort I implemented the model. This setup now works and here are the definitions in case they might help someone: models/user.php: class User extends AppModel { var $name = 'User'; var $hasMany = array( 'Photo' = array( 'className' = 'Photo', 'foreignKey'= 'user_id', 'order' = 'Photo.primary DESC, Photo.id ASC', 'dependent' = true, ), ); var $hasAndBelongsToMany = array( 'Friend' = array( 'className'= 'Friend', 'joinTable'= 'fans_friends', 'foreignKey' = 'fan_id',
Autocomplete Component produces invalid xhmtl
Hi, i'm using Nate's excellent autocomplete class in Cake 1.2 (http:// cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/) calling it simple in view: echo $ajax-autocomplete('City.name_'.$lang); output: input name=data[City][name_de] type=text id=CityNameDe autocomplete=off value= / But, autocomplete is no valid value in xhtml, and the Site is marked as not Valid. Is that attribute needed? How can i switch this off? Regards, Alexander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: HTTPS
Your question needs a little more information to get any kind of useful answer. Is this css in a separate style sheet, or embedded directly in the view. Did you put the sytel sheet in the webroot/css directory or elsewhere? Are you using a helper? How are you referencing the filename. Etc. etc. On Nov 27, 12:12 am, wowwildcat [EMAIL PROTECTED] wrote: I try to run cake onhttps://localhost/cake/but the css didn't shows up. Any idea? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: CSS Path Problem
I'm running into the same problem, and starting a new app from scratch did not help. Can you offer a little more explanation as to how to fix this problem? I have the standard cake directory structure. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Fatal error: Class 'Post' not found
Would you like to use Sessions? (y/n) [y] Fatal error: Class 'Post' not found in /home/gunabalans/public_html/ website/cake/cake/scripts/bake.php on line 1311 Call Stack: 0.01391120416 1. {main}() /home/gunabalans/public_html/ website/cake/cake/scripts/bake.php:0 0.04222778704 2. Bake-main() /home/gunabalans/public_html/ website/cake/cake/scripts/bake.php:144 51.17862789456 3. Bake-doController() /home/gunabalans/ public_html/website/cake/cake/scripts/bake.php:241 99.10943553616 4. Bake-__bakeActions() /home/gunabalans/ public_html/website/cake/cake/scripts/bake.php:1237 [EMAIL PROTECTED] cake]$ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Load balanced web servers with CakePHP
Cake seems to use the PECL memcache extensions, which I've used elsewhere, and they're solid. I'd look at caching in memcache before NFS mounted disk. Sean On Nov 27, 7:19 am, dericknwq [EMAIL PROTECTED] wrote: I have read about it but nope, never consider it yet. Seems like a pretty good replacement though since it's meant to be a global cache. How is Cake's support for memcache? You tried it personally? On Nov 27, 7:05 pm, bgmill [EMAIL PROTECTED] wrote: Have you considered using memcached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Expecting ControllerName.htmlController error
No, I didnt. I didnt understand because I copied this controller as Noticiass and it works... On 27 nov, 11:05, Samuel DeVore [EMAIL PROTECTED] wrote: because you put it in the $name On Nov 27, 2007 6:38 AM, Tulio Faria [EMAIL PROTECTED] wrote: Hi guys, I developed a simple controller that shows news... I'm using cake 1.2 (http://www.atriumnet.com.br/noticias/ler/3) And I got this error: Missing controller You are seeing this error because controller Noticias.htmlController could not be found. Notice: If you want to customize this error message, create app/views/ errors/missing_controller.ctp Fatal: Create the class below in file: app/controllers/ noticias.html_controller.php ?php class Noticias.htmlController extends AppController { var $name = 'Noticias.html'; } ? Why is cake expecting ControllerName.htmlController as the name of class? Thanks -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Dynamic table
On 26 nov, 19:22, rtconner [EMAIL PROTECTED] wrote: If it was me, I'd have a Model with no table attatched and then add a function to create the tables in it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: email component - smtp auth (SOLVED?)
Afaik this fix is already comitted in the latest nightly builds. What do you mean with they still don't seem to arrive. Is mail delivered correctly to your MTA but does not reach recipient ? Do you have access to MTA logs ? On Nov 26, 7:04 pm, Gorka [EMAIL PROTECTED] wrote: I had this same issue, the server was responding 235 GO AHEAD ans not OK authenticated. This fixed the error on send, though emails still don't seem to arrive. On 29 oct, 21:35, atomic [EMAIL PROTECTED] wrote: I had some problems sending mail using smtp auth. MTA (postfix) always told me lost connection after auth The email component is testing for OK Authenticated which seems not RFC compliant to me, so i changend testing for return value into 235. email.php line 744: if (stristr($response, '235') === false) This should match most common used MTA. Regards, Andreas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Load balanced web servers with CakePHP
Yes I'm using memcache extensively across a large (cake 1.1) app running on 5 web servers and its been rock solid so far. We've recently moved our sessions from the db over to the memcached cluster too and have had a nice speed boost so you might consider that also. On Nov 27, 1:19 pm, dericknwq [EMAIL PROTECTED] wrote: I have read about it but nope, never consider it yet. Seems like a pretty good replacement though since it's meant to be a global cache. How is Cake's support for memcache? You tried it personally? On Nov 27, 7:05 pm, bgmill [EMAIL PROTECTED] wrote: Have you considered using memcached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: CSS Path Problem
I found the problem and fixed it. Here's what happened: I am running XAMPP-lite and cake is just one of my directories in // xampp/htdocs/. By default, apache sets the document root to the htdocs directory, so all of my htmlHelper functions were mapping to htdocs/ instead of htdocs/cake/. Per the manual, I could either change where my cake web-content is located (development setup), or I could change apache to point to the htdocs/cake/webroot/ (production setup). For more information see the manual here : http://manual.cakephp.org/chapter/installing I hope this helps anyone who comes along. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
https and mod_rewrite
I can't seem to get Cake to work over https. I have my project working fine over http so I know that the code is good. But when I try to run it from my https server it can't find /home (The requested URL / home/ was not found on this server.). Additionally when my server starts up it gives me a warning (Loaded DSO libexec/mod_rewrite.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)), but php also gives this warning and it seems to be working fine. Any suggestions greatly appreciated, the client is getting hostile :- Jay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Linking to domain results in blank page
Hi, When I try to link to my domain, I get a blank page. However, when I type in the complete link in my browser, it works. Does anyone know why this is the case? And how to resolve the issue? Thanks in advance, Maurice --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Caching, way to globally disable on HTTPS detect?
Does anyone have a good example or concept of how someone might easily enable/disable caching based on if HTTPS is enabled/disabled? Another option in my mind might be an extension to the Caching mechanism that caches the HTTPS objects seperately from HTTP. The reason I need this is the links/images/includes need to have the properly associated urls. This is harder than normal for me as I use a seperate server instance to handle all of the static content. Thanks, - J -- View this message in context: http://www.nabble.com/Caching%2C-way-to-globally-disable-on-HTTPS-detect--tf4883029.html#a13974891 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: https and mod_rewrite
On Nov 27, 2007 11:45 AM, jaymon [EMAIL PROTECTED] wrote: I can't seem to get Cake to work over https. I have my project working fine over http so I know that the code is good. But when I try to run it from my https server it can't find /home (The requested URL / home/ was not found on this server.). Additionally when my server starts up it gives me a warning (Loaded DSO libexec/mod_rewrite.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)), but php also gives this warning and it seems to be working fine. Any suggestions greatly appreciated, the client is getting hostile :- Well, sounds like it's really an Apache problem, not a Cake one. Warnings are never good, whether or not it's from Apache or PHP itself. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Search box
Hi! I am trying to create a search box for my application, but I have many doubts. Being a common thing, do you know any link or site where it explains this topic and how to do it? Thanks and regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Search box
On Nov 27, 2007 12:14 PM, dandreta [EMAIL PROTECTED] wrote: Hi! I am trying to create a search box for my application, but I have many doubts. Being a common thing, do you know any link or site where it explains this topic and how to do it? Thanks and regards Google wasn't a help? -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Autocomplete Component produces invalid xhmtl
One solution is to add the autocomplete class at runtime at page load. This example uses jQuery as that's what I'm most famliar with: $(document).ready(function() { $(CityNameDe).attr(autocomplete, off); }); You will have to tweak the original code in the autocomplete helper and remove the autocomplete='off' option. On Nov 27, 2:45 pm, cronet [EMAIL PROTECTED] wrote: Hi, i'm using Nate's excellent autocomplete class in Cake 1.2 (http:// cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/) calling it simple in view: echo $ajax-autocomplete('City.name_'.$lang); output: input name=data[City][name_de] type=text id=CityNameDe autocomplete=off value= / But, autocomplete is no valid value in xhtml, and the Site is marked as not Valid. Is that attribute needed? How can i switch this off? Regards, Alexander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: mysql_connect() fails although mySql support is enabled.
Have you managed to get mysql working outside of cake? Try the following: ?php mysql_connect(localhost, username, password) or die(unable to connect: .mysql_error()); mysql_select_db(database_name) or die(unable to select database: .mysql_error()); $s = mysql_query(SELECT * FROM table) or die(unable to select: .mysql_error()); ? If you can't get this script running outside of cake, you will need to check out the php documentation regarding mysql. Note: to get php mysql to work on windows you might need to download some dll's not included in the standard php install. (more details on this on the mysql page of the php manual) The problem is that even though the mysql.so is present, one of its dependant files (dll's) is missing. On Nov 27, 3:07 am, lynch [EMAIL PROTECTED] wrote: I tried to get into ACL-stuff over console commands, but I always got the the following error. Fatal error: Call to undefined function: mysql_connect() in #/cake/cake/libs/model/datasources/dbo/dbo_mysql.php on line 101 After a short search i found the solution to prepare the cli php.ini. I added the extension=mysql.so, but I still got the same errror. Since this i tried a lot, even the phpinfo() said MySql Support Enabled. So it was not the obvious Solution, or? I´m Thankful for every request. PS Sorry for robbish english :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Image Upload Component or Behaviour
Hi, I´m trying to solve an upload problem. I want to upload images, and in the same processe some thumbnails of different sizes have to be done too. I´ve checked some behaviours that seems to do that (AD7six behaviour, ActAs Image behaviour, digitalspaghetti behaviour) and some components (Image Upload Component) but I cant figure out if these behaviours create the images in the file system or directly in the database. Can anyone help me? Thanks. Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Dynamic Controller Actions, or Extended Controller Classes
Hi, I'm looking for some advice on a CakePHP (version 1.1.7) application our company is developing. The main application is a general framework (not to be confused with the CakePHP framework itself) with common JS, CSS, Helpers, Elements, Models, etc. That application is expanded with Plugins acting as mini-apps that use the common application/framework elements, but add specific functionality. The entire application (with Plugins) will be pushed out to for local installations, but we will be continuing to expand and update it (providing files and SQL that those local installations can download and replace). We fully expect each installation to customize the application to fit their needs, and we've coded it to as easily accommodate this as possible. It's multilingual, with text coming from a datatable. Specific datatables (used by the Plugins) can have fields added and/or removed. A Component and Helper set is dynamically generating HTML forms based on datatable information (type of field, options in pulldowns, etc). Validation rules for each model come from a datatable. Etc. We've tried as much as possible to allow the local IT admins to customize the application and/or plugins as they need through SQL. However, we *are* expecting them to need to add or change code. We expect at least some of them will need to add or change Actions within the Plugins' Controllers. We'd like to give them the option to do so, but still allow us to provide a general update (provide a download of the original, standard application and plugins) that will *not* overwrite their changes. The catch is that they should *not* have to open or change ANY file or code we provide them. Our *preferred* solution, which doesn't seem possible in PHP, is a folder structure like this: controller/ ...foo_controller.php ...foo_standard/ ..add.php ..edit.php ..delete.php ..index.php ...foo_custom/ ..add.php ..copy.php And a Controller something like this: ?php class FooController extends AppController { // parse through foo_custom folder IF IT EXISTS and include all files dynamically // parse through foo_standard folder and include all files dynamically UNLESS that file name was loaded from foo_custom } ? And with each file within foo_custom and foo_standard looking like this: ?php function index( $var1, $var2 ) { // do some Action here } ? The idea being we would provide the nearly empty Controller and all the Actions (functions) in the foo_standard folder, and the local IT admins can *add* functions/actions or *replace* by populating the optional foo_custom folder. We can then, at some future date, push any updates we want, replacing the standard functionality and leaving their custom functionality intact (short of major revisions, of course). It's my understanding that the above is not possible; PHP cannot dynamically include/require Functions into a Class like I described above. If I am *mistaken*, and there *is* a PHP way to do the above (or similar), please let me know! We've come up with an alternate solution, however. The file structure looks like this: controller/ ...foo_controller.php ...extensions/ ..foo_controller_extension.php With the foo_controller.php looking normal and the foo_controller_extension.php file looking like this: ?php class FooControllerExtension extends FooController { function add() { // do something... } function copy() { // do something... } ? It required some additions to the base CakePHP files, but the result is that for any Plugin, CakePHP looks for an optional Controller Extension and loads it after loading the called Controller. Any new functions in the Extension gets inherited by the parent Controller, and and functions provided in the Extension *override* the parent's function (so the Extension's add function would be run instead of the Controller's add function). We've tested Method #2, and it works fine, but we would prefer Method #1, or some variation of it. And which ever method we decide on would be used for other CakePHP files (Components, Helpers, Models, etc) to allow for customization there. Can anyone provide any advice on this topic, or suggestions? We want to throw this out there looking for better ways before we commit to something :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: How to hand fileds in Model-read ...
On Nov 27, 2007 1:01 PM, WordPress Guru [EMAIL PROTECTED] wrote: In the view.thtml of parent entity, it generates code to display related children. I do not wish to display all the fields of children, so I have edited the view.thtml to accomadate that. However cake generates the SQL every time using the models I have defined and when I use DEBUG = 2 in core, I can see the dump , and this sql annoys me becasue it gets all the fields from the dbase , no matter which ones I am using. Is there a way to restrict the fields. Now I know that when you use findAll, you can pass fields array, but that is only for listing the parent entity . The children are read as part of internal calls to Model-read(null,$id). When you set $debug to 0 because you're going to be in production, it only reads in all the fields once and caches that list so it doesn't have to do it again. Hope that helps you understand the problem a little better. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: How to hand fileds in Model-read ...
Thanks Chris I did not know to set Debug to 0 for production. Thats is great. Is there any other checklist to do stuff before you go in production ? Also I think I found another solution for my problem . You can define $hasMany =fields with list of desired fileds and it would not affect the actual model [I hope so :) ] On Nov 27, 2:41 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Nov 27, 2007 1:01 PM, WordPress Guru [EMAIL PROTECTED] wrote: In the view.thtml of parent entity, it generates code to display related children. I do not wish to display all the fields of children, so I have edited the view.thtml to accomadate that. However cake generates the SQL every time using the models I have defined and when I use DEBUG = 2 in core, I can see the dump , and this sql annoys me becasue it gets all the fields from the dbase , no matter which ones I am using. Is there a way to restrict the fields. Now I know that when you use findAll, you can pass fields array, but that is only for listing the parent entity . The children are read as part of internal calls to Model-read(null,$id). When you set $debug to 0 because you're going to be in production, it only reads in all the fields once and caches that list so it doesn't have to do it again. Hope that helps you understand the problem a little better. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: https and mod_rewrite
I'vehad that problem when my allow override rule was tied to the port (80) and was not set for the https port (443) it was a funky apache issue for me. I have also had a server where two totally different instances of apache handled http and https and had different configs On Nov 27, 2007 10:05 AM, Chris Hartjes [EMAIL PROTECTED] wrote: On Nov 27, 2007 11:45 AM, jaymon [EMAIL PROTECTED] wrote: I can't seem to get Cake to work over https. I have my project working fine over http so I know that the code is good. But when I try to run it from my https server it can't find /home (The requested URL / home/ was not found on this server.). Additionally when my server starts up it gives me a warning (Loaded DSO libexec/mod_rewrite.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)), but php also gives this warning and it seems to be working fine. Any suggestions greatly appreciated, the client is getting hostile :- Well, sounds like it's really an Apache problem, not a Cake one. Warnings are never good, whether or not it's from Apache or PHP itself. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Search box
On Nov 27, 2007 10:21 AM, Chris Hartjes [EMAIL PROTECTED] wrote: On Nov 27, 2007 12:14 PM, dandreta [EMAIL PROTECTED] wrote: Hi! I am trying to create a search box for my application, but I have many doubts. Being a common thing, do you know any link or site where it explains this topic and how to do it? Thanks and regards Google wasn't a help? oh the irony of that question ;) -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Search box
Using 1.2 In my index view: ?php echo $form-create('formFind', array('url' = 'index')); echo $form-input('find', array('value' = $findUrlNotCleaned, 'label' = 'Buscar', 'type' = 'text', 'id' = 'find', 'class' = 'input', 'size' = '30', 'maxlength' = '100')); echo $form-end('Submit'); ? In my controller: function index() { uses('sanitize'); $sanitize = new Sanitize(); $this-set('findUrlNotCleaned', trim($this-data['formFind'] ['find']) ); $this-cleanData = $sanitize-clean( $this-data ); $findUrl = low( trim($this-cleanData['formFind']['find']) ); if ( $findUrl != '' ) { $this-Benchlink-recursive = 0; $this-set('benchlinks', $this-paginate('Benchlink', array(LOWER(`Benchlink`.`url`) LIKE '% . $findUrl . %'))); } else { $this-Benchlink-recursive = 0; $this-set('benchlinks', $this-paginate()); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: mysql_connect() fails although mySql support is enabled.
Usually that simply means PHP wasn't compiled with MySQL support. I'd suggest you re-compiling PHP if you can. On Nov 26, 7:07 pm, lynch [EMAIL PROTECTED] wrote: I tried to get into ACL-stuff over console commands, but I always got the the following error. Fatal error: Call to undefined function: mysql_connect() in #/cake/cake/libs/model/datasources/dbo/dbo_mysql.php on line 101 After a short search i found the solution to prepare the cli php.ini. I added the extension=mysql.so, but I still got the same errror. Since this i tried a lot, even the phpinfo() said MySql Support Enabled. So it was not the obvious Solution, or? I´m Thankful for every request. PS Sorry for robbish english :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Search box
I clean a little bit the code :) This works for me, but my question is: Where do i have toi clean the data for this search, here in the controller or inside the model? function index() { $this-Benchlink-recursive = 0; uses('sanitize'); $sanitize = new Sanitize(); $this-set('findUrlNotCleaned', trim($this-data['formFind'] ['find']) ); $this-cleanData = $sanitize-clean( $this-data ); $findUrl = low( trim($this-cleanData['formFind']['find']) ); if ( $findUrl != '' ) { $this-set('benchlinks', $this-paginate('Benchlink', array(LOWER(`Benchlink`.`url`) LIKE '% . $findUrl . %'))); } else { $this-set('benchlinks', $this-paginate()); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Big problems with admin routing and Auth/ACL
Hi, 1. Whenever I open an admin URL, such as /admin/videos, I get the following warning: 2007-11-27 23:28:18 Warning: Warning (2): fopen(C:\...\tmp\cache\persistent\cake_core_object_map) [ http://php.net/function.fopen function.fopen ]: failed to open stream: Permission denied in [CORE\cake\libs\file.php, line 144] This doesn't appear to happen with non-admin routes. 2. When accessing my add URL, /admin/videos/add, it seems Auth::isAuthorised() is being called 3 times, twice with an unknown action (admin_img): 2007-11-27 23:34:07 Debug: Group ID: 4 2007-11-27 23:34:07 Debug: ACO alias: Videos/admin_add 2007-11-27 23:34:10 Debug: Group ID: 4 2007-11-27 23:34:10 Debug: ACO alias: Videos/admin_img 2007-11-27 23:34:10 Debug: Group ID: 4 2007-11-27 23:34:10 Debug: ACO alias: Videos/admin_img (Group ID = the ARO) 3. (far less important) Am I supposed to be able to access $this-params['controller'] in beforeFilter() for an admin route? Seems to work for other routes, but with admin routes it can't find the 'controller' array index. Perhaps related to #2 above. Please help. Glen. -- View this message in context: http://www.nabble.com/Big-problems-with-admin-routing-and-Auth-ACL-tf4884616.html#a13980501 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Big problems with admin routing and Auth/ACL
On Nov 27, 2007 4:42 PM, Dodger [EMAIL PROTECTED] wrote: 1. Whenever I open an admin URL, such as /admin/videos, I get the following warning: 2007-11-27 23:28:18 Warning: Warning (2): fopen(C:\...\tmp\cache\persistent\cake_core_object_map) [ http://php.net/function.fopen function.fopen ]: failed to open stream: Permission denied in [CORE\cake\libs\file.php, line 144] Well, it sounds like it's telling you what the exact problem is. Either the file doesn't exist or you haven't set proper permissions for the tmp directory. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Big problems with admin routing and Auth/ACL
Hi Chris, It's a cache file, it should be managed by the framework. I have tried adding this file to the folder, and it just gets deleted by Cake. As for permissions, there are no other issues writing to the /tmp folder. It's on Windows, so I don't think permissions are as often a problem as they are on *nix. Thanks for your reply. Glen. Chris Hartjes-2 wrote: On Nov 27, 2007 4:42 PM, Dodger [EMAIL PROTECTED] wrote: 1. Whenever I open an admin URL, such as /admin/videos, I get the following warning: 2007-11-27 23:28:18 Warning: Warning (2): fopen(C:\...\tmp\cache\persistent\cake_core_object_map) [ http://php.net/function.fopen function.fopen ]: failed to open stream: Permission denied in [CORE\cake\libs\file.php, line 144] Well, it sounds like it's telling you what the exact problem is. Either the file doesn't exist or you haven't set proper permissions for the tmp directory. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard -- View this message in context: http://www.nabble.com/Big-problems-with-admin-routing-and-Auth-ACL-tf4884616.html#a13980914 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Big problems with admin routing and Auth/ACL
On Nov 27, 2007 4:59 PM, Dodger [EMAIL PROTECTED] wrote: Hi Chris, It's a cache file, it should be managed by the framework. I have tried adding this file to the folder, and it just gets deleted by Cake. Have you tried the following: 1) delete the contents of tmp 2) recreate the tmp directory with the proper permissions as indicated in the manual 3) set debug in core/config.php to at least 1 (I usually leave it at 1 unless I want to debug some SQL) 4) run your app. That *should* recreate any cache files it's looking for. Hope that helps. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Big problems with admin routing and Auth/ACL
I tried it now, and I still receive the error. However, it seems to only be happening for actions other than the index action (add edit). Chris Hartjes-2 wrote: On Nov 27, 2007 4:59 PM, Dodger [EMAIL PROTECTED] wrote: Hi Chris, It's a cache file, it should be managed by the framework. I have tried adding this file to the folder, and it just gets deleted by Cake. Have you tried the following: 1) delete the contents of tmp 2) recreate the tmp directory with the proper permissions as indicated in the manual 3) set debug in core/config.php to at least 1 (I usually leave it at 1 unless I want to debug some SQL) 4) run your app. That *should* recreate any cache files it's looking for. Hope that helps. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard - http://www.littlehart.net/atthekeyboard -- View this message in context: http://www.nabble.com/Big-problems-with-admin-routing-and-Auth-ACL-tf4884616.html#a13981865 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: How to hand fileds in Model-read ...
Just to clarify, when setting debug to 0 only the DESCRIBE `your_table` queries are cached - of course a read() does still read in every field. If you want to reduce the fields included, look at using findById() or just find() rather than read(). On Nov 28, 5:44 am, WordPress Guru [EMAIL PROTECTED] wrote: Thanks Chris I did not know to set Debug to 0 for production. Thats is great. Is there any other checklist to do stuff before you go in production ? Also I think I found another solution for my problem . You can define $hasMany =fields with list of desired fileds and it would not affect the actual model [I hope so :) ] On Nov 27, 2:41 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Nov 27, 2007 1:01 PM, WordPress Guru [EMAIL PROTECTED] wrote: In the view.thtml of parent entity, it generates code to display related children. I do not wish to display all the fields of children, so I have edited the view.thtml to accomadate that. However cake generates the SQL every time using the models I have defined and when I use DEBUG = 2 in core, I can see the dump , and this sql annoys me becasue it gets all the fields from the dbase , no matter which ones I am using. Is there a way to restrict the fields. Now I know that when you use findAll, you can pass fields array, but that is only for listing the parent entity . The children are read as part of internal calls to Model-read(null,$id). When you set $debug to 0 because you're going to be in production, it only reads in all the fields once and caches that list so it doesn't have to do it again. Hope that helps you understand the problem a little better. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Autocomplete Component produces invalid xhmtl
Thank you for reply. I rather don't want to modify the sources. The resulting update problems is no worth the trouble... But i think it's a bug. I don't see the sense of such an attribute. Perhaps I should open a ticket for that issue... I commented the line out from the ajax helper. The helper works fine as usual. So i think this attr is not needed... Regards, Alexander On 27 Nov., 18:23, RichardAtHome [EMAIL PROTECTED] wrote: One solution is to add the autocomplete class at runtime at page load. This example uses jQuery as that's what I'm most famliar with: $(document).ready(function() { $(CityNameDe).attr(autocomplete, off); }); You will have to tweak the original code in the autocomplete helper and remove the autocomplete='off' option. On Nov 27, 2:45 pm, cronet [EMAIL PROTECTED] wrote: Hi, i'm using Nate's excellent autocomplete class in Cake 1.2 (http:// cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/) calling it simple in view: echo $ajax-autocomplete('City.name_'.$lang); output: input name=data[City][name_de] type=text id=CityNameDe autocomplete=off value= / But, autocomplete is no valid value in xhtml, and the Site is marked as not Valid. Is that attribute needed? How can i switch this off? Regards, Alexander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Display Dynamic Images in Cake??
Do explain, I'm curious. On Nov 27, 2007 3:34 AM, jonathan [EMAIL PROTECTED] wrote: Indeed the problem was globals not being seen globally. I added some global statements and joy is mine again. On Nov 27, 3:27 am, jonathan [EMAIL PROTECTED] wrote: OK, now I am just talking to myself, but I have had some stellar insight for anyone following along. The problem is apparently not in the display of the image, but in the generation of the image. I remember having some issues with global variables in the framework from time to time, and I think that's the culprit here. I will post the final findings for any interested parties... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
How do you specify a separate/different layout for pages and errors? (CakePHP 1.2)
I want to use an error layout (error.ctp) that's different from the default layout I use for normal static pages (default.ctp). Is this possible? Where can you specify it? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: mysql_connect() fails although mySql support is enabled.
@ RichardAtHome I think mysql is running well. In past, i used it many times outside cakephp. In my phpinfo(), in configure command, there was no line like --with- mysql=/path/to/mysql If i am right the mysql extension is not the same like the normal mysql. For this i need to ./configure php with this -- with-mysql=/path/to/mysq. But as you already realised, i´m really new in this, i just cant find the right directory in wich the ./configure command works. i tried a lot, but nothing. @ quakey do you mean the same with recompile? If yes, could anybody give me a hint how and where? lynch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: model transaction on multiple models
currently there is no chance to call $db-begin... without modification. if model tables are stored on different databases (global rollback) - http://bin.cakephp.org/saved/25650 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: https and mod_rewrite
Would the port mapping for the allow_override rule always live in the .htaccess file or is possible that it is somewhere else? On Nov 27, 1:59 pm, Samuel DeVore [EMAIL PROTECTED] wrote: I'vehad that problem when my allow override rule was tied to the port (80) and was not set for thehttpsport (443) it was a funky apache issue for me. I have also had a server where two totally different instances of apache handled http andhttpsand had different configs On Nov 27, 2007 10:05 AM, Chris Hartjes [EMAIL PROTECTED] wrote: On Nov 27, 2007 11:45 AM, jaymon [EMAIL PROTECTED] wrote: I can't seem to get Cake to work overhttps. I have my project working fine over http so I know that the code is good. But when I try to run it from myhttpsserver it can't find /home (The requested URL / home/ was not found on this server.). Additionally when my server starts up it gives me a warning (Loaded DSO libexec/mod_rewrite.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)), but php also gives this warning and it seems to be working fine. Any suggestions greatly appreciated, the client is getting hostile :- Well, sounds like it's really an Apache problem, not a Cake one. Warnings are never good, whether or not it's from Apache or PHP itself. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheKeyboard -http://www.littlehart.net/atthekeyboard -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: model transaction on multiple models
currently there is no chance to call $db-begin... without modification. if model tables are stored on different databases: class AppController extends Controller { var $__transactions = array(); function __getDbConnections() { $models = ClassRegistry::mapKeys(); $dbConnections = array(); foreach ( $models as $model ) { $modelClass = ClassRegistry::getObject($model); $dbConnections[] = $modelClass-useDbConfig; } return array_unique($dbConnections); } function __call( $funcName, $funcArgs ) { $allowedFuncNames = array('begin', 'commit', 'rollback'); $formattedFuncName = low($funcName); if ( in_array($formattedFuncName, $allowedFuncNames) ) { static $dbConnections = array(); if ( empty($dbConnections[0]) ) $dbConnections = $this-__getDbConnections(); foreach ( $dbConnections as $dbConnection ) { $db = ConnectionManager::getDataSource( $dbConnection ); switch( $formattedFuncName ) { case 'begin': $this-__transactions[$dbConnection] = true; $db-execute('START TRANSACTION'); break; case 'commit': if ( $this-__transactions[$dbConnection] ) { unset($this-__transactions[$dbConnection]); $db-execute('COMMIT'); } break; case 'rollback': if ( $this-__transactions[$dbConnection] ) { unset($this-__transactions[$dbConnection]); $db-execute('ROLLBACK'); } break; } } if ( $db-lastError() !== null ) { $querys = $db-_queriesLog; $this-log('SQL ERROR: ' . env('REMOTE_ADDR') . $db-lastError() . ' - ' . end($querys)); die('please change the transaction sql command'); } } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: How do you specify a separate/different layout for pages and errors? (CakePHP 1.2)
Put the following line in the top of your controller: var $layout = 'error'; --- kiang On 11月28日, 上午8時22分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to use an error layout (error.ctp) that's different from the default layout I use for normal static pages (default.ctp). Is this possible? Where can you specify it? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: Load balanced web servers with CakePHP
@Sean: I would think memcached is faster though both runs through the network. I have got no spare servers at the moment but I could steal 512MB off each of the servers running which should be more than enough for the cache from what I see now. I'm basing on that the current cache folder is just less than 10MB so with memcached I'll probably take like less than double the amount? I have briefly read bout memcached through my usual feeds just lacking the chance to try it out. Do not really have much time so the good thing is memcached seems relatively easy to setup. We've recently moved our sessions from the db over to the memcached cluster too and have had a nice speed boost so you might consider that also. I'm curious about this, did you have to rewrite/extend the session component? What other nifty tricks could you share about your current setup? On Nov 28, 12:06 am, bgmill [EMAIL PROTECTED] wrote: Yes I'm using memcache extensively across a large (cake 1.1) app running on 5 web servers and its been rock solid so far. We've recently moved our sessions from the db over to the memcached cluster too and have had a nice speed boost so you might consider that also. On Nov 27, 1:19 pm, dericknwq [EMAIL PROTECTED] wrote: I have read about it but nope, never consider it yet. Seems like a pretty good replacement though since it's meant to be a global cache. How is Cake's support for memcache? You tried it personally? On Nov 27, 7:05 pm, bgmill [EMAIL PROTECTED] wrote: Have you considered using memcached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: How do you specify a separate/different layout for pages and errors? (CakePHP 1.2)
Or specifically, use a different layout for your pages. You can set $this-layout in the view itself too, if you don't want to copy over the PagesController. On Nov 28, 11:06 am, kiang [EMAIL PROTECTED] wrote: Put the following line in the top of your controller: var $layout = 'error'; --- kiang On 11月28日, 上午8時22分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to use an error layout (error.ctp) that's different from the default layout I use for normal static pages (default.ctp). Is this possible? Where can you specify it? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Does paginate work in 1.2? Going to any other page brings up page one results
So if I pull up the first page, then click to any of the other pages via the next or number links, it just pulls up the first page results (though, it says it is on page 2 displaying results 11 - 20). The URL for page 2 is: /cake/seo_schools/index/page:2 However, if I first sort the table on the first page by clicking a header and THEN paging to the next page, things work as they should. The url then is: /cake/seo_schools/index/page:2/sort:school_id/direction:asc Does this sound familiar to anyone? Ideas? Many thanks! Controller: function index() { $this-SeoSchool-recursive = 0; $this-set('seoSchools', $this-paginate()); } View: div class=paging ?php echo $paginator-prev(' '.__('previous', true), array(), null, array('class'='disabled'));? | ?php echo $paginator-numbers();? ?php echo $paginator-next(__('next', true).' ', array(), null, array('class'='disabled'));? /div -- View this message in context: http://www.nabble.com/Does-paginate-work-in-1.2--Going-to-any-other-page-brings-up-page-one-results-tf4885700.html#a13984134 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: https and mod_rewrite
On Nov 27, 2007 5:35 PM, jaymon [EMAIL PROTECTED] wrote: Would the port mapping for the allow_override rule always live in the .htaccess file or is possible that it is somewhere else? With my problem it was in the httpd.conf files that the ports and allow override issues were taking place. -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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: mysql_connect() fails although mySql support is enabled.
Do you have a dedicated server? If you are on a shared host, I doubt you can compile/install PHP yourself. Let's assume you do have the server to yourself, you need to grab the PHP source file from php.net. Extract the tarball to a directory, say, called 'php': cd php ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/ usr/local/mysql make make test make install The exact location of apxs2 and MySQL on your system might be different from what I have above. Change the path when necessary. On Nov 27, 3:31 pm, lynch [EMAIL PROTECTED] wrote: @ RichardAtHome I think mysql is running well. In past, i used it many times outside cakephp. In my phpinfo(), in configure command, there was no line like --with- mysql=/path/to/mysql If i am right the mysql extension is not the same like the normal mysql. For this i need to ./configure php with this -- with-mysql=/path/to/mysq. But as you already realised, i´m really new in this, i just cant find the right directory in wich the ./configure command works. i tried a lot, but nothing. @ quakey do you mean the same with recompile? If yes, could anybody give me a hint how and where? lynch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
.htaccess problem on shared hosting environment (cakephp - SEO)
My hosting provider stores my add-on domains under /public_html/example.com Now, when i access my main site. Everything, works well. But, when i accesss my add-on domain example.com. It says 500, Internal error. We tried removing the lines for .htaccess IfModule mod_rewrite.c RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule It fixes the problem on my add-on domain, but on my main domain. SEO, just stopped working (off course). Any suggestions? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
firecake and cakephp 1.2
Hi Guys, Firecake has helped me tremendously to debug my cake application and to see what is going on. However when I tried to use it with cake 1.2, it seems to blow up. I get the error message below. In order to get it working again, I had to comment out the following line: $script .= \n.$this-getLogs(); //not working with cake 1.2 I was wondering if anyone else experienced this problem and what they did to fix it. Best Regards error message: fbout['Logs'] = {0:2007-11-25 15:55:57 Warning: Warning (512): span style = \color:Red;text-align:left\bSQL Error:/b 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'error' at line 1/span in [CORE/cake/libs/model/datasources/dbo_source.php, line 440] 13,1:2007-11-25 15:53:44 Warning: Warning (512): span style = \color:Red;text-align:left\bSQL Error:/b 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'error' at line 1/span in [CORE/cake/libs/model/datasources/dbo_source.php, line 440] 14,2:2007-11-24 10:54:24 Warning: Warning (512): (Model::invalidFields) Parameter usage is deprecated, set the $data property instead in [CORE/cake/libs/model/model.php, line 1778] 15,3:2007-11-24 10:54:24 Warning: Warning (512): (Model::validates) Parameter usage is deprecated, set the $data property instead in [CORE/ cake/libs/model/model.php, line 1745] 16,4:2007-11-24 10:48:52 Warning: Warning (512): (Model::invalidFields) Parameter usage is deprecated, set the $data property instead in [CORE/cake/libs/model/model.php, line 1778] 17,5:2007-11-24 10:48:52 Warning: Warning (512): (Model::validates) Parameter usage is deprecated, set the $data property instead in [CORE/ cake/libs/model/model.php, line 1745] 18,6:2007-11-24 10:09:03 Warning: Warning (512): (Model::invalidFields) Parameter usage is deprecated, set the $data property instead in [CORE/cake/libs/model/model.php, line 1778] 19,7:2007-11-24 10:09:03 Warning: Warning (512): (Model::validates) Parameter usage is deprecated, set the $data property instead in [CORE/ cake/libs/model/model.php, line 1745] 20,8:2007-11-24 00:57:43 Warning: Warning (512): Method HtmlHelper::submitTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 21,9:2007-11-24 00:57:43 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 22,10:2007-11-24 00:57:43 Warning: Warning (512): Method HtmlHelper::inputTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 23,11:2007-11-24 00:57:43 Warning: Warning (512): Method HtmlHelper::formTag does not exist in [CORE/cake/libs/view/helper.php, line 148] 24,12:2007-11-24 00:52:19 Warning: Warning (512): Method HtmlHelper::submitTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 25,13:2007-11-24 00:52:19 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 26,14:2007-11-24 00:52:19 Warning: Warning (512): Method HtmlHelper::inputTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 27,15:2007-11-24 00:52:19 Warning: Warning (512): Method HtmlHelper::formTag does not exist in [CORE/cake/libs/view/helper.php, line 148] 28,16:2007-11-24 00:43:06 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 29,17:2007-11-24 00:43:06 Warning: Warning (512): Method HtmlHelper::inputTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 30,18:2007-11-24 00:43:06 Warning: Warning (512): Method HtmlHelper::formTag does not exist in [CORE/cake/libs/view/helper.php, line 148] 31,19:2007-11-20 13:10:34 Warning: Warning (512): Method HtmlHelper::submitTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 32,20:2007-11-20 13:10:34 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 33,21:2007-11-20 13:10:34 Warning: Warning (512): Method HtmlHelper::inputTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 34,22:2007-11-20 13:10:34 Warning: Warning (512): Method HtmlHelper::formTag does not exist in [CORE/cake/libs/view/helper.php, line 148] 35,23:2007-11-19 08:19:24 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 36,24:2007-11-19 08:19:24 Warning: Warning (512): Method HtmlHelper::inputTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 37,25:2007-11-19 08:19:24 Warning: Warning (512): Method HtmlHelper::formTag does not exist in [CORE/cake/libs/view/helper.php, line 148] 38,26:2007-11-19 07:57:59 Warning: Warning (512): Method HtmlHelper::passwordTag does not exist in [CORE/cake/libs/view/ helper.php, line 148] 39,27:2007-11-19 07:57:59 Warning: Warning (512): Method HtmlHelper::inputTag does not exist
Re: HTTPS
I follows the instructions on the manual. Unzipped it and extract it w/ o any changes folder structure. I enabled mod_rewrite too. Then I view it thru browser. Under http it works perfect for the welcome message. I try http://localhost/cake/welcome or http://localhost/cake/index.php/welcome, they work well too. But when I view it using https, the the style of welcome message didn't show. When I try on https://localhost/cake/welcome I get Missing controller error message. It seems like mod_rewrite didn't working in secure connection. Anyone can give me some hint or help here? On Nov 27, 10:53 pm, maschoen [EMAIL PROTECTED] wrote: Your question needs a little more information to get any kind of useful answer. Is this css in a separate style sheet, or embedded directly in the view. Did you put the sytel sheet in the webroot/css directory or elsewhere? Are you using a helper? How are you referencing the filename. Etc. etc. On Nov 27, 12:12 am, wowwildcat [EMAIL PROTECTED] wrote: I try to run cake onhttps://localhost/cake/butthe css didn't shows up. Any idea? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---