Re: Cake 1.2: Containable problem with model alias
Thank you Don! It seems that containable isn't the right solution for this problem :c( I guess I have to work with unBind instead. Anja Am 17.05.2011 06:28, schrieb dreamingmind: Anja, Spent a bit more time with containable. No answer but if it's any consolation but I can't get any proper result with a HABTM even without an alias. It could be I'm still misunderstanding some detail... The two away table just comes pouring in no matter what I've tried. Don On May 16, 1:31 am, Anja Liebermann wrote: Hi Don, thanks for your reply, but the brackt was set correctly, PostAuthor belongsto LastPost, not to Group directly. What really worries me is that all the members are fetched. They belong via HABTM to the Group, but if I don't mention them in my containment statement they shouln't be fetched. Correct? Anja Am 15.05.2011 04:29, schrieb dreamingmind: Anja, There is a parenthesis misplacement in your sample code. If that exists in your real code it's probably your problem. The array for LastPost doesn't get its closing paren until after PostAuthor. Here's the correction: $containment = array( 'GroupOwner' =>array( 'fields' =>array('GroupOwner.nickname', 'GroupOwner.id') ), 'LastPost' =>array( 'fields' =>array('LastPost.user_id', 'LastPost.created'), ), 'PostAuthor' =>array( 'fields' =>array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname' ) ) ); Regards Don On May 14, 7:05 am, acl68wrote: Hello everybody, I try to use a containable search in a CakePHP legacy project using Cake 1.2. I have often uses containable, but never togeterh with aliases. So no idea if that might be the poblem ore something else. The model relations are as follows: Group__ hasMany Members alias Users belongsTo |__ GroupOwner alias User |__ LastPost alias ForumPost |___belongsTo |__ PostAuthor alias User As you can see we use model aliases. I have the following containment array: $containment = array( 'GroupOwner' =array( 'fields'=array('GroupOwner.nickname', 'GroupOwner.id') ), 'LastPost' =array( 'fields'=array( 'LastPost.user_id', 'LastPost.created'), 'PostAuthor' =array( 'fields' =array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname') ) ) ); The strange behaviour is that I get all model data on the second level e.g. all my GroupMembers which I don't want, but not my PostAuthor which I want. If I add a field condition to my find e.g.: $groups = $this-Group-find('all', array('contain' =$containment, 'fields' =array('GroupOwner.id'), 'limit' =2)); my result looks like following: GroupOwner (Array, 5 elements) id (String, 2 characters ) 14 nickname (String, 11 characters ) Helfenstein avatar (Array, 4 elements) is_online (Integer) 0 name (String, 12 characters ) Helfenstein LastPost (Array, 3 elements) user_id (String, 6 characters ) 878781 created (String, 10 characters ) 1237332851 id (String, 10 characters ) 1009713631 GroupCategory (Array, 0 elements) Member (Array, 0 elements) Tags (Array, 0 elements) so Members are still there, though luckily empty, but still no PostAuthor. My complete Information from the "Group" model is missing, too *sigh* Has anybody an idea what might be the problem? Of course var $actsAs = array('Containable'); is set in the app_model.php I find this a very strange behaviour (no pun intended). Thanks in advance for any help! Anja anja_liebermann.vcf < 1KViewDownload -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php <>
Re: Cake 1.2: Containable problem with model alias
Anja, Spent a bit more time with containable. No answer but if it's any consolation but I can't get any proper result with a HABTM even without an alias. It could be I'm still misunderstanding some detail... The two away table just comes pouring in no matter what I've tried. Don On May 16, 1:31 am, Anja Liebermann wrote: > Hi Don, > > thanks for your reply, but the brackt was set correctly, PostAuthor > belongsto LastPost, not to Group directly. > > What really worries me is that all the members are fetched. They belong > via HABTM to the Group, but if I don't mention them in my containment > statement they shouln't be fetched. Correct? > > Anja > > Am 15.05.2011 04:29, schrieb dreamingmind: > > > > > > > > > Anja, > > > There is a parenthesis misplacement in your sample code. If that > > exists in your real code it's probably your problem. > > > The array for LastPost doesn't get its closing paren until after > > PostAuthor. Here's the correction: > > > $containment = array( > > 'GroupOwner' => array( > > 'fields' => array('GroupOwner.nickname', 'GroupOwner.id') > > ), > > 'LastPost' => array( > > 'fields' => array('LastPost.user_id', 'LastPost.created'), > > ), > > 'PostAuthor' => array( > > 'fields' => array( > > 'PostAuthor.id', > > 'PostAuthor.firstname', > > 'PostAuthor.nickname', > > 'PostAuthor.lastname' > > ) > > ) > > ); > > > Regards > > Don > > > On May 14, 7:05 am, acl68 wrote: > >> Hello everybody, > > >> I try to use a containable search in a CakePHP legacy project using Cake > >> 1.2. I have often uses containable, but never togeterh with aliases. So > >> no idea if that might be the poblem ore something else. > > >> The model relations are as follows: > > >> Group__ > >> hasMany Members alias Users > >> belongsTo > >> |__ GroupOwner alias User > >> |__ LastPost alias ForumPost > >> |___belongsTo > >> |__ PostAuthor alias > >> User > > >> As you can see we use model aliases. > > >> I have the following containment array: > >> $containment = array( > >> 'GroupOwner' =array( > >> 'fields'=array('GroupOwner.nickname', > >> 'GroupOwner.id') > >> ), > >> 'LastPost' =array( > >> 'fields'=array( > >> 'LastPost.user_id', > >> 'LastPost.created'), > >> 'PostAuthor' =array( > >> 'fields' =array( > >> 'PostAuthor.id', > >> 'PostAuthor.firstname', > >> 'PostAuthor.nickname', > >> 'PostAuthor.lastname') > >> ) > >> ) > >> ); > > >> The strange behaviour is that I get all model data on the second level > >> e.g. all my GroupMembers which I don't want, but not my PostAuthor which > >> I want. > > >> If I add a field condition to my find e.g.: > >> $groups = $this-Group-find('all', array('contain' =$containment, > >> 'fields' =array('GroupOwner.id'), 'limit' =2)); > > >> my result looks like following: > >> GroupOwner (Array, 5 elements) > >> id (String, 2 characters ) 14 > >> nickname (String, 11 characters ) Helfenstein > >> avatar (Array, 4 elements) > >> is_online (Integer) 0 > >> name (String, 12 characters ) Helfenstein > >> LastPost (Array, 3 elements) > >> user_id (String, 6 characters ) 878781 > >> created (String, 10 characters ) 1237332851 > >> id (String, 10 characters ) 1009713631 > >> GroupCategory (Array, 0 elements) > >> Member (Array, 0 elements) > >> Tags (Array, 0 elements) > > >> so Members are still there, though luckily empty, but still no PostAuthor. > >> My > >> complete Information from the "Group" model is missing, too > > >> *sigh* > > >> Has anybody an idea what might be the problem? > > >> Of course var $actsAs = array('Containable'); is set in the app_model.php > > >> I find this a very strange behaviour (no pun intended). > > >> Thanks in advance for any help! > > >> Anja > > > > anja_liebermann.vcf > < 1KViewDownload -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2: Containable problem with model alias
Anja, Well that helped me! Your problem remains a mystery though. Don On May 16, 1:31 am, Anja Liebermann wrote: > Hi Don, > > thanks for your reply, but the brackt was set correctly, PostAuthor > belongsto LastPost, not to Group directly. > > What really worries me is that all the members are fetched. They belong > via HABTM to the Group, but if I don't mention them in my containment > statement they shouln't be fetched. Correct? > > Anja > > Am 15.05.2011 04:29, schrieb dreamingmind: > > > > > > > > > Anja, > > > There is a parenthesis misplacement in your sample code. If that > > exists in your real code it's probably your problem. > > > The array for LastPost doesn't get its closing paren until after > > PostAuthor. Here's the correction: > > > $containment = array( > > 'GroupOwner' => array( > > 'fields' => array('GroupOwner.nickname', 'GroupOwner.id') > > ), > > 'LastPost' => array( > > 'fields' => array('LastPost.user_id', 'LastPost.created'), > > ), > > 'PostAuthor' => array( > > 'fields' => array( > > 'PostAuthor.id', > > 'PostAuthor.firstname', > > 'PostAuthor.nickname', > > 'PostAuthor.lastname' > > ) > > ) > > ); > > > Regards > > Don > > > On May 14, 7:05 am, acl68 wrote: > >> Hello everybody, > > >> I try to use a containable search in a CakePHP legacy project using Cake > >> 1.2. I have often uses containable, but never togeterh with aliases. So > >> no idea if that might be the poblem ore something else. > > >> The model relations are as follows: > > >> Group__ > >> hasMany Members alias Users > >> belongsTo > >> |__ GroupOwner alias User > >> |__ LastPost alias ForumPost > >> |___belongsTo > >> |__ PostAuthor alias > >> User > > >> As you can see we use model aliases. > > >> I have the following containment array: > >> $containment = array( > >> 'GroupOwner' =array( > >> 'fields'=array('GroupOwner.nickname', > >> 'GroupOwner.id') > >> ), > >> 'LastPost' =array( > >> 'fields'=array( > >> 'LastPost.user_id', > >> 'LastPost.created'), > >> 'PostAuthor' =array( > >> 'fields' =array( > >> 'PostAuthor.id', > >> 'PostAuthor.firstname', > >> 'PostAuthor.nickname', > >> 'PostAuthor.lastname') > >> ) > >> ) > >> ); > > >> The strange behaviour is that I get all model data on the second level > >> e.g. all my GroupMembers which I don't want, but not my PostAuthor which > >> I want. > > >> If I add a field condition to my find e.g.: > >> $groups = $this-Group-find('all', array('contain' =$containment, > >> 'fields' =array('GroupOwner.id'), 'limit' =2)); > > >> my result looks like following: > >> GroupOwner (Array, 5 elements) > >> id (String, 2 characters ) 14 > >> nickname (String, 11 characters ) Helfenstein > >> avatar (Array, 4 elements) > >> is_online (Integer) 0 > >> name (String, 12 characters ) Helfenstein > >> LastPost (Array, 3 elements) > >> user_id (String, 6 characters ) 878781 > >> created (String, 10 characters ) 1237332851 > >> id (String, 10 characters ) 1009713631 > >> GroupCategory (Array, 0 elements) > >> Member (Array, 0 elements) > >> Tags (Array, 0 elements) > > >> so Members are still there, though luckily empty, but still no PostAuthor. > >> My > >> complete Information from the "Group" model is missing, too > > >> *sigh* > > >> Has anybody an idea what might be the problem? > > >> Of course var $actsAs = array('Containable'); is set in the app_model.php > > >> I find this a very strange behaviour (no pun intended). > > >> Thanks in advance for any help! > > >> Anja > > > > anja_liebermann.vcf > < 1KViewDownload -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2: Containable problem with model alias
Hi Don, thanks for your reply, but the brackt was set correctly, PostAuthor belongsto LastPost, not to Group directly. What really worries me is that all the members are fetched. They belong via HABTM to the Group, but if I don't mention them in my containment statement they shouln't be fetched. Correct? Anja Am 15.05.2011 04:29, schrieb dreamingmind: Anja, There is a parenthesis misplacement in your sample code. If that exists in your real code it's probably your problem. The array for LastPost doesn't get its closing paren until after PostAuthor. Here's the correction: $containment = array( 'GroupOwner' => array( 'fields' => array('GroupOwner.nickname', 'GroupOwner.id') ), 'LastPost' => array( 'fields' => array('LastPost.user_id', 'LastPost.created'), ), 'PostAuthor' => array( 'fields' => array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname' ) ) ); Regards Don On May 14, 7:05 am, acl68 wrote: Hello everybody, I try to use a containable search in a CakePHP legacy project using Cake 1.2. I have often uses containable, but never togeterh with aliases. So no idea if that might be the poblem ore something else. The model relations are as follows: Group__ hasMany Members alias Users belongsTo |__ GroupOwner alias User |__ LastPost alias ForumPost |___belongsTo |__ PostAuthor alias User As you can see we use model aliases. I have the following containment array: $containment = array( 'GroupOwner' =array( 'fields'=array('GroupOwner.nickname', 'GroupOwner.id') ), 'LastPost' =array( 'fields'=array( 'LastPost.user_id', 'LastPost.created'), 'PostAuthor' =array( 'fields' =array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname') ) ) ); The strange behaviour is that I get all model data on the second level e.g. all my GroupMembers which I don't want, but not my PostAuthor which I want. If I add a field condition to my find e.g.: $groups = $this-Group-find('all', array('contain' =$containment, 'fields' =array('GroupOwner.id'), 'limit' =2)); my result looks like following: GroupOwner (Array, 5 elements) id (String, 2 characters ) 14 nickname (String, 11 characters ) Helfenstein avatar (Array, 4 elements) is_online (Integer) 0 name (String, 12 characters ) Helfenstein LastPost (Array, 3 elements) user_id (String, 6 characters ) 878781 created (String, 10 characters ) 1237332851 id (String, 10 characters ) 1009713631 GroupCategory (Array, 0 elements) Member (Array, 0 elements) Tags (Array, 0 elements) so Members are still there, though luckily empty, but still no PostAuthor. My complete Information from the "Group" model is missing, too *sigh* Has anybody an idea what might be the problem? Of course var $actsAs = array('Containable'); is set in the app_model.php I find this a very strange behaviour (no pun intended). Thanks in advance for any help! Anja -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php <>
Re: Cake 1.2: Containable problem with model alias
Anja, There is a parenthesis misplacement in your sample code. If that exists in your real code it's probably your problem. The array for LastPost doesn't get its closing paren until after PostAuthor. Here's the correction: $containment = array( 'GroupOwner' => array( 'fields' => array('GroupOwner.nickname', 'GroupOwner.id') ), 'LastPost' => array( 'fields' => array('LastPost.user_id', 'LastPost.created'), ), 'PostAuthor' => array( 'fields' => array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname' ) ) ); Regards Don On May 14, 7:05 am, acl68 wrote: > Hello everybody, > > I try to use a containable search in a CakePHP legacy project using Cake > 1.2. I have often uses containable, but never togeterh with aliases. So > no idea if that might be the poblem ore something else. > > The model relations are as follows: > > Group__ > hasMany Members alias Users > belongsTo > |__ GroupOwner alias User > |__ LastPost alias ForumPost > |___belongsTo > |__ PostAuthor alias User > > As you can see we use model aliases. > > I have the following containment array: > $containment = array( > 'GroupOwner' =array( > 'fields'=array('GroupOwner.nickname', > 'GroupOwner.id') > ), > 'LastPost' =array( > 'fields'=array( > 'LastPost.user_id', > > 'LastPost.created'), > 'PostAuthor' =array( > 'fields' =array( > 'PostAuthor.id', > 'PostAuthor.firstname', > 'PostAuthor.nickname', > 'PostAuthor.lastname') > ) > ) > ); > > The strange behaviour is that I get all model data on the second level > e.g. all my GroupMembers which I don't want, but not my PostAuthor which > I want. > > If I add a field condition to my find e.g.: > $groups = $this-Group-find('all', array('contain' =$containment, > 'fields' =array('GroupOwner.id'), 'limit' =2)); > > my result looks like following: > GroupOwner (Array, 5 elements) > id (String, 2 characters ) 14 > nickname (String, 11 characters ) Helfenstein > avatar (Array, 4 elements) > is_online (Integer) 0 > name (String, 12 characters ) Helfenstein > LastPost (Array, 3 elements) > user_id (String, 6 characters ) 878781 > created (String, 10 characters ) 1237332851 > id (String, 10 characters ) 1009713631 > GroupCategory (Array, 0 elements) > Member (Array, 0 elements) > Tags (Array, 0 elements) > > so Members are still there, though luckily empty, but still no PostAuthor. My > complete Information from the "Group" model is missing, too > > *sigh* > > Has anybody an idea what might be the problem? > > Of course var $actsAs = array('Containable'); is set in the app_model.php > > I find this a very strange behaviour (no pun intended). > > Thanks in advance for any help! > > Anja -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2: Containable problem with model alias
Forgot to mention: My complete Information from the "Group" model is missing, too Anja Am 13.05.2011 16:11, schrieb Anja Liebermann: Hello everybody, I try to use a containable search in a CakePHP legacy project using Cake 1.2. I have often uses containable, but never togeterh with aliases. So no idea if that might be the poblem ore something else. The model relations are as follows: Group__ hasMany Members alias Users belongsTo |__ GroupOwner alias User |__ LastPost alias ForumPost___belongsTo |__ PostAuthor alias User As you can see we use model aliases. I have the following containment array: $containment = array( 'GroupOwner' => array( 'fields'=> array('GroupOwner.nickname','GroupOwner.id') ), 'LastPost' => array( 'fields'=> array('LastPost.user_id', 'LastPost.created'), 'PostAuthor' => array( 'fields' => array( 'PostAuthor.id', 'PostAuthor.firstname', 'PostAuthor.nickname', 'PostAuthor.lastname') ) ) ); The strange behaviour is that I get all model data on the second level e.g. all my GroupMembers which I don't want, but not my PostAuthor which I want. If I add a field condition to my find e.g.: $groups = $this->Group->find('all', array('contain' => $containment, 'fields' => array('GroupOwner.id'), 'limit' => 2)); my result looks like following: GroupOwner (Array, 5 elements) id (String, 2 characters ) 14 nickname (String, 11 characters ) Helfenstein avatar (Array, 4 elements) is_online (Integer) 0 name (String, 12 characters ) Helfenstein LastPost (Array, 3 elements) user_id (String, 6 characters ) 878781 created (String, 10 characters ) 1237332851 id (String, 10 characters ) 1009713631 GroupCategory (Array, 0 elements) Member (Array, 0 elements) Tags (Array, 0 elements) so Members are still there, though luckily empty, but still no PostAuthor. *sigh* Has anybody an idea what might be the problem? Of course var $actsAs = array('Containable'); is set in the app_model.php I find this a very strange behaviour (no pun intended). Thanks in advance for any help! Anja -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php <>
Re: Cake 1.2 problem with XML files in plugin vendors folder
Hi Levi, Ignore the trolls. They won't survive I'd you don't feed them. :) Unfortunately. in version 1.2 you can only serve plugin img, CSS, and JS files, and only from folders with those names. There's much more freedom in 1.3. Each plugin has its own webroot folder. - Jamie On Apr 29, 7:49 am, lsenft wrote: > There isn't any code. Its just a plain static xml file. When I put > an image, css or js file into vendors folder I can access it with a > url like /plugin_name/img/myimage.jpg. When I try to access files of > other types I get the myfile.extController could not be found error. > > I get the impression that I either need to add some code to handle > different content types, or serve the static xml file from a different > location. > > Levi > > On Apr 28, 1:28 pm, cricket wrote: > > > > > On Thu, Apr 28, 2011 at 12:30 PM, lsenft wrote: > > > I would like to load an XML file from a plugin vendors folder. I get > > > the following error: > > > > Error: myfile.xmlController could not be found. > > > > Is there a way to serve xml files from a plugin's vendors folder? > > > What's the code that leads to the error? > > > Some days, it's like every other person posting to this list assumes > > everyone else can read minds. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2 problem with XML files in plugin vendors folder
On Fri, Apr 29, 2011 at 10:49 AM, lsenft wrote: > There isn't any code. Then I guess you're just imagining this error then. Well, I'm happy this has all been sorted out. Have a nice day. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2 problem with XML files in plugin vendors folder
There isn't any code. Its just a plain static xml file. When I put an image, css or js file into vendors folder I can access it with a url like /plugin_name/img/myimage.jpg. When I try to access files of other types I get the myfile.extController could not be found error. I get the impression that I either need to add some code to handle different content types, or serve the static xml file from a different location. Levi On Apr 28, 1:28 pm, cricket wrote: > On Thu, Apr 28, 2011 at 12:30 PM, lsenft wrote: > > I would like to load an XML file from a plugin vendors folder. I get > > the following error: > > > Error: myfile.xmlController could not be found. > > > Is there a way to serve xml files from a plugin's vendors folder? > > What's the code that leads to the error? > > Some days, it's like every other person posting to this list assumes > everyone else can read minds. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2 problem with XML files in plugin vendors folder
On Thu, Apr 28, 2011 at 12:30 PM, lsenft wrote: > I would like to load an XML file from a plugin vendors folder. I get > the following error: > > Error: myfile.xmlController could not be found. > > Is there a way to serve xml files from a plugin's vendors folder? What's the code that leads to the error? Some days, it's like every other person posting to this list assumes everyone else can read minds. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cake 1.2 / 1.3: how to Instantiate helper with options?
Thanks for your reply, Nick. Nice to see a familiar face here, too :) I could swear the last time I looked through the Book, it wasn't there. But now it is. I solved it with this bit of widom from the 1.3 section: http://book.cakephp.org/view/1616/x1-3-improvements Although I would have liked to set these options in the AppController, and have it filter through site-wide, I suppose once per form ain't so bad. * On Jul 10, 7:38 am, nurvzy wrote: > As far as I know you can't set the default input options at the > constructor level. Although I haven't dug into the code in a while to > make sure of that. If I'm wrong, someone will correct me. > > You can go the MyFormHelper class route, which may be the *best* > option IMHO. Just overwrite the create function calling the > parent::create() with a set an array_merge of default options you > want. > > class MyFormHelper extends FormHelper { > var $defaults = array('inputDefaults' => array('div' => false)); > > function create($model = null, $options = array()){ > parent::create($model, array_merge($this->defaults, $options)); > } > > } > > Simple as that. > > Or you can instead use an element, pass in an array as options to > array_merge with your default options for your form. That is a trick > I like to use often with pagination options and links. > > Another option, could be defining a $default_form_options in your > app_controller than you set and use for every form create (adjusting > as needed). > > Example: > //app_controller beforeFilter > $this->set('default_form_options', array('inputDefaults' => > array('div' => false))); > > //view > $this->Form->create('Model', array_merge($default_form_options, > array('url' => 'some_where'))); > > You get the idea... > > Hope that helps, > Nick Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cake 1.2 / 1.3: how to Instantiate helper with options?
As far as I know you can't set the default input options at the constructor level. Although I haven't dug into the code in a while to make sure of that. If I'm wrong, someone will correct me. You can go the MyFormHelper class route, which may be the *best* option IMHO. Just overwrite the create function calling the parent::create() with a set an array_merge of default options you want. class MyFormHelper extends FormHelper { var $defaults = array('inputDefaults' => array('div' => false)); function create($model = null, $options = array()){ parent::create($model, array_merge($this->defaults, $options)); } } Simple as that. Or you can instead use an element, pass in an array as options to array_merge with your default options for your form. That is a trick I like to use often with pagination options and links. Another option, could be defining a $default_form_options in your app_controller than you set and use for every form create (adjusting as needed). Example: //app_controller beforeFilter $this->set('default_form_options', array('inputDefaults' => array('div' => false))); //view $this->Form->create('Model', array_merge($default_form_options, array('url' => 'some_where'))); You get the idea... Hope that helps, Nick On Jul 9, 6:48 am, BlueAngel wrote: > Hi there everyone, > > I would like to know if it's possible to instantiate a helper in a > controller with configuration options (like one can with components, > or with model behaviors). > > What I'd like to do is pre-set certain options for the Form helper > (div => false) for example, instead of having to do it each and every > time I add a form field in the view. I've done a bit of a search in > the Book, and also on the web, but I've not found anything that lead > me to an answer. > > What I thought, as an alternative, is to write a wrapper helper class > (e.g. MyForm) that uses the Form helper with wrapper functions around > each of the Form helper's functions; this approach should work but it > seems like a long way around solving the problem. I'd like to avoid > this if possible. > > I am in the process of refactoring a site I did about 2 years ago in > Cake 1.1; I've upgraded to 1.2.7 and plan to upgrade even further to > 1.3.2 before deploying the updated version of the site. I'm also using > this as an exercise in improving my own Cake skills, trying to keep > the code as "cake-like" as possible. > > Any pointers in this regard would be much appreciated. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: cake 1.2 problem with cache
None of these solutions worked for me, but you can disable caching all together by adding the line Configure::write('Cache.disable', true); to your core.php file. tiadev wrote: > > > hello, i updated the nightly last release cakephp 1.2 bêta but i have > a problem with cache when i separate the cake lib and the apps : > > wamp / cakephp / > / cake > / apps / >app_my_test_app/ > / config > / > controllers > ... > / docs > / vendors > ... > > wamp / webroot_of_test / > / css > / files > > i configure the paths variables in index.php of webroot. > But when i launch the test application i have this messages : > > Warning (512): Cache not configured properly. Please check > Cache::config(); in APP/config/core.php [C:\wamp\www\cakephp\cake\libs > \configure.php, line 631] > > Warning (2): array_merge() [function.array-merge]: Argument #1 is not > an array [C:\wamp\www\cakephp\cake\libs\configure.php, line 638] > > Your tmp directory is writable. > > Your cache is NOT working. Please check the settings in APP/config/ > core.php > > Your database configuration file is present. > > Cake is able to connect to the database. > > I don't understand the cache problem, i have see the others > discussions about this but i don't found the solution, anyone can help > 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 > cake-php-unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -~--~~~~--~~--~--~--- > > > -- View this message in context: http://old.nabble.com/cake-1.2-problem-with-cache-tp15150433p28626228.html Sent from the CakePHP mailing list archive at Nabble.com. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Cake 1.2 Start Session Errors after install
Seems like you don't have permission to write on /var directory of the server, as PHP tries to write the session file to that directory. This is something you need to check with your sysadmin. -- Edmundo. On Sat, Apr 11, 2009 at 12:24 PM, P. Phunky wrote: > > Hey all, > > installed Cake on an ipower.com server. File Structure is > > / > public_html/ > _Dev > _Cake_1_2 > ___app > ___cake > ___ ... > ___vendors > > I get the following error when loading the default start page. > > session_start() [function.session-start]: open(/var/php_sessions/ > sess_55725da39073051a9529a124c99b54df, O_RDWR) failed: No such file or > directory (2) [CORE/cake/libs/session.php, line 539] > > I've tried moving the tmp folder to the root level but still got error > > any help would be greatly apperciated > > thanks in advance > > s > > > > -- -- Edmundo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 Auth component not logging in
Here you go: http://www.milesj.me/blog/read/3/debugging-the-cakephp-auth-component http://www.milesj.me/blog/read/5/using-cakephps-auth-component --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 Auth component not logging in
Are you inserting the first user by hand? Try setting the password to the SH1 of the concatenation of the salt and the password you want: $cipher_password = SHA1( $salt . $plain_password ) 2009/3/3 aka > > Thing is that it does seem to work when my salt is empty... As > mentioned before this is a new installation of both cake and the db. > Really maddening!! > > > On 27 feb, 17:00, Xoubaman wrote: > > User table got username and password? > > > > Beforefilter ir correct? > > > > Do you allow the public actions in your controller? > > > > Auth is tricky, but following the tutorial step by step should work. > > > > On Feb 27, 4:40 pm, aka wrote: > > > > > I keep running in to this problem over and over again. > > > > > Whenever I implement the cakephp 1.2 Auth component I can'tlogin(and > > > yes, I'm sure thelogincredentials are right). The password is saved > > > with the sha1 algorithm and the salt value has been changed. New cake > > > installation + a new database (workflow: setting up the db + tables, > > > using the cake console to bake the necessary m/c/v's ) But when ever I > > > try to log in I get the 'Loginfailed. Invalid username or password.' > > > message. > > > > > Really hope someone can help me out here! > > > Thanx > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 Auth component not logging in
Thing is that it does seem to work when my salt is empty... As mentioned before this is a new installation of both cake and the db. Really maddening!! On 27 feb, 17:00, Xoubaman wrote: > User table got username and password? > > Beforefilter ir correct? > > Do you allow the public actions in your controller? > > Auth is tricky, but following the tutorial step by step should work. > > On Feb 27, 4:40 pm, aka wrote: > > > I keep running in to this problem over and over again. > > > Whenever I implement the cakephp 1.2 Auth component I can'tlogin(and > > yes, I'm sure thelogincredentials are right). The password is saved > > with the sha1 algorithm and the salt value has been changed. New cake > > installation + a new database (workflow: setting up the db + tables, > > using the cake console to bake the necessary m/c/v's ) But when ever I > > try to log in I get the 'Loginfailed. Invalid username or password.' > > message. > > > Really hope someone can help me out here! > > Thanx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 Auth component not logging in
User table got username and password? Beforefilter ir correct? Do you allow the public actions in your controller? Auth is tricky, but following the tutorial step by step should work. On Feb 27, 4:40 pm, aka wrote: > I keep running in to this problem over and over again. > > Whenever I implement the cakephp 1.2 Auth component I can't login (and > yes, I'm sure the login credentials are right). The password is saved > with the sha1 algorithm and the salt value has been changed. New cake > installation + a new database (workflow: setting up the db + tables, > using the cake console to bake the necessary m/c/v's ) But when ever I > try to log in I get the 'Login failed. Invalid username or password.' > message. > > Really hope someone can help me out here! > Thanx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 forms: date fields left empty => null in database?
Hi, thanks for your reply. The data field was set to null before. If I update a dataset and assigning the null value to a the birthday field (SET birthday=null) it works fine. So I added the following code to my controller: if(empty($this->data['Employee']['birthday'])) $this->data['Employee']['birthday'] = null; This works fine, but I'm not sure if this is the proper way to do it? Regards, Sebastian On 16 Dez., 15:13, Alexandru Ciobanu wrote: > Sebastian Göttschkes wrote: > > Hi, > > > i got the following problem using cakePHP 1.2 RC3: > > > My Model 'Employee' has a attribute called 'birthday' (datatype: > > DATE). In the add-view, I have the following code: > > input('birthday',array('type'=>'text'));?> > > If i left this field blank when adding an employee, this employee has > > the birthday '-00-00' saved in the database. I would rather like > > the birthday having the null-value, because -00-00 is no valid > > birthday. > > Set the date field to NULL > |ALTER TABLE `employees` CHANGE `birthday` `birthday` DATE NULL; > > IIRC > > HTH > | --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 forms: date fields left empty => null in database?
On 16 dic, 11:44, Sebastian Göttschkes wrote: > Additionally, if I add a valid birthday, it is saved correctly. When > editing the employee, I would like to get the birthday viewed in the > format dd.mm.. How can I tell cake to view the birthday like this? Ok, here's what I've done: in the Obras edit / add view: echo $html->div('input select', $form->label('fecha_creacion', 'Fecha de Creación') . $form->day('fecha_creacion', null, array(), '---') . ' - ' . $form->month('fecha_creacion', null, array(), '---') . ' - ' . $form->year('fecha_creacion', 1600, date('Y'), null, array(), false) ); This shows the div, a label and three select fields for day, month, year, separated by ' - ', with the year between 1600 and the current year, and day and month optional (these are the dates in which works of art were made, and sometimes the date is not exact). On the Obras controller, before saving: $tmp = $this->data['Obra']['fecha_creacion']; $this->data['Obra']['fecha_creacion'] = $tmp['year']; // year is mandatory if ($tmp['month']) { $this->data['Obra']['fecha_creacion'] .= '-' . $tmp['month']; if ($tmp['day']) { // only if they selected a month $this->data['Obra']['fecha_creacion'] .= '-' . $tmp['day']; } } HTH -- Saludos Adriano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 forms: date fields left empty => null in database?
I am in the process of editing my views to get a similar effect. If you can wait a couple hours, I'll be back with an explanation. But, to whet your appetite: controlling for '-00-00' is not that different from controlling for null, seems to me. '-00-00' is the 'null value' for a date field. I have the problem of dates that can be full, or just years, or just years and months, so I can't use a date field at all, and have to validate my dates otherwise. Basically, to edit the date fields as you like, you have to process them before saving in the edit method, filling up the $this->data ['yourdatefield'] with a valid date from what you got. For example: in the view, you have three inputs type='text' name='dateday', name='datemonth', name='dateyear' in the action, get the date fields and process them saving each value to your $this->data['yourdatefield'] as a full '-mm-dd' string. Plus, you should also set the variable at the end of the edit action doing the opposite action, so the dates to be modified should be exploded and set to 'dateday', etc. I hope I'm not making any mistaeks. Cheers, On 16 dic, 11:44, Sebastian Göttschkes wrote: > Hi, > > i got the following problem using cakePHP 1.2 RC3: > > My Model 'Employee' has a attribute called 'birthday' (datatype: > DATE). In the add-view, I have the following code: > input('birthday',array('type'=>'text'));?> > If i left this field blank when adding an employee, this employee has > the birthday '-00-00' saved in the database. I would rather like > the birthday having the null-value, because -00-00 is no valid > birthday. > > Additionally, if I add a valid birthday, it is saved correctly. When > editing the employee, I would like to get the birthday viewed in the > format dd.mm.. How can I tell cake to view the birthday like this? > > I hope you guys can help me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 forms: date fields left empty => null in database?
Sebastian Göttschkes wrote: > Hi, > > i got the following problem using cakePHP 1.2 RC3: > > My Model 'Employee' has a attribute called 'birthday' (datatype: > DATE). In the add-view, I have the following code: > input('birthday',array('type'=>'text'));?> > If i left this field blank when adding an employee, this employee has > the birthday '-00-00' saved in the database. I would rather like > the birthday having the null-value, because -00-00 is no valid > birthday. > > Set the date field to NULL |ALTER TABLE `employees` CHANGE `birthday` `birthday` DATE NULL; IIRC HTH | --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 paginator of two models toghether
there is no difference b/w pagination of one or two models use it as u are using for a single model. On Nov 17, 12:14 am, Alessio <[EMAIL PROTECTED]> wrote: > I have two models, news and articles. > > I need to show them togheter, and paginate togheter because I want to > show in the same page. > > How Can I get this using the paginator? > > Is it possible to pass to paginator an array? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 paginator of two models toghether
I confirm the best solution is not using paginator. I call a stored procedures passing current page and number of page to show in a page. it is too much long and not natural to ovveride paginate and paginatecount.. you need to make a lot of conditions according to where was called the method.. Another possibily is hack the paginator helper, but it is too long... I suggest a little hack to paginator...i made this in 1.1 The possibility for paginator not using a model... If i pass number of page, and the number of total result...the paginator could aniway show his stuff... The paginator limit is the fact that it searches always a model... If I want to paginate others..I cannot...I have a lot of limit... So a little suggestion to programmer, it is a internal property to IsModelLinked...and from this continue... On Nov 17, 4:11 am, Sergei <[EMAIL PROTECTED]> wrote: > What's the problem? Do it without paginator component, with > appropriate find conditions. I did such task in version 1.1. > > On 17 нояб, 03:14, Alessio <[EMAIL PROTECTED]> wrote: > > > > > I have two models, news and articles. > > > I need to show them togheter, and paginate togheter because I want to > > show in the same page. > > > How Can I get this using the paginator? > > > Is it possible to pass to paginator an array? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 paginator of two models toghether
What's the problem? Do it without paginator component, with appropriate find conditions. I did such task in version 1.1. On 17 нояб, 03:14, Alessio <[EMAIL PROTECTED]> wrote: > I have two models, news and articles. > > I need to show them togheter, and paginate togheter because I want to > show in the same page. > > How Can I get this using the paginator? > > Is it possible to pass to paginator an array? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 paginator of two models toghether
Never nothing is not possible... I am thinking ...in my chair ;) I will post a solution... I need to show contents, news and article, with a particular tag. I find the news with that tag... and I find the articles with that tag... But I need to show them in only a page, and this page must be paginate... In the old cakephp, was possible pass an array...to paginator... So someone has a solution? On Nov 16, 8:20 pm, "Sayed Raianul Kabir" <[EMAIL PROTECTED]> wrote: > I have faced this type problem. but I can't. > > > > On Sun, Nov 16, 2008 at 11:14 AM, Alessio <[EMAIL PROTECTED]> wrote: > > > I have two models, news and articles. > > > I need to show them togheter, and paginate togheter because I want to > > show in the same page. > > > How Can I get this using the paginator? > > > Is it possible to pass to paginator an array? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 paginator of two models toghether
I have faced this type problem. but I can't. On Sun, Nov 16, 2008 at 11:14 AM, Alessio <[EMAIL PROTECTED]> wrote: > > I have two models, news and articles. > > I need to show them togheter, and paginate togheter because I want to > show in the same page. > > How Can I get this using the paginator? > > Is it possible to pass to paginator an array? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
what should I learn first? still confuse with Cake.. btw anyone has try this code? http://bin.cakephp.org/saved/38536 I want to know if it working thx On Nov 7, 8:27 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > If you are starting, you are better starting with CakePHP 1.2 ... lots > more docs and blogs posts exits for CakePHP 1.2, also many books... > > On Fri, Nov 7, 2008 at 10:18 AM, nightcrawler13 <[EMAIL PROTECTED]> wrote: > > > I just added on my controllers > > /* > > var $name = 'Video'; > > */ > > > and got another error > > > Missing view > > > You are seeing this error because the view for > > VideoController::index() could not be found. > > > If you want to customize this error message, create app\views/errors/ > > missing_view.thtml. > > > Fatal: Confirm you have created the file : C:\xampp\htdocs\stream\app > > \views\video\index.thtml > > > sorry bother you, I'm new with CakePHP :( > > > On Nov 7, 6:50 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > >> Have you tried change AppHelper to Helper. The snippet works for 1.2RC3 > > >> El 07/11/2008, a las 12:41, nightcrawler13 escribió: > > >> > thx for your reply but it still had same error > > >> >> or simply change the snippet code fromm extends AppHelper to extends > >> >> Helper... > > >> -- > >> Fran Iglesias > >> [EMAIL PROTECTED] > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
thx for correction.. On Nov 7, 8:16 pm, "Liebermann, Anja Carolin" <[EMAIL PROTECTED]> wrote: > Looks like /views/videos/index.ctp is missing > > But the name of your controller videos_controller.php should be "Videos". > > Have a look here:http://manual.cakephp.org/view/22/CakePHP-Conventions > > Anja > > -Ursprüngliche Nachricht- > Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von > nightcrawler13 > Gesendet: Freitag, 7. November 2008 13:19 > An: CakePHP > Betreff: Re: Cake 1.2 and JW FLV Media Player > > I just added on my controllers > /* > var $name = 'Video'; > */ > > and got another error > > Missing view > > You are seeing this error because the view for > VideoController::index() could not be found. > > If you want to customize this error message, create app\views/errors/ > missing_view.thtml. > > Fatal: Confirm you have created the file : C:\xampp\htdocs\stream\app > \views\video\index.thtml > > sorry bother you, I'm new with CakePHP :( > > On Nov 7, 6:50 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > > > Have you tried change AppHelper to Helper. The snippet works for > > 1.2RC3 > > > El 07/11/2008, a las 12:41, nightcrawler13 escribió: > > > > thx for your reply but it still had same error > > > >> or simply change the snippet code fromm extends AppHelper to > > >> extends Helper... > > > -- > > Fran Iglesias > > [EMAIL PROTECTED] > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
If you are starting, you are better starting with CakePHP 1.2 ... lots more docs and blogs posts exits for CakePHP 1.2, also many books... On Fri, Nov 7, 2008 at 10:18 AM, nightcrawler13 <[EMAIL PROTECTED]> wrote: > > I just added on my controllers > /* > var $name = 'Video'; > */ > > and got another error > > Missing view > > You are seeing this error because the view for > VideoController::index() could not be found. > > If you want to customize this error message, create app\views/errors/ > missing_view.thtml. > > Fatal: Confirm you have created the file : C:\xampp\htdocs\stream\app > \views\video\index.thtml > > sorry bother you, I'm new with CakePHP :( > > On Nov 7, 6:50 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: >> Have you tried change AppHelper to Helper. The snippet works for 1.2RC3 >> >> El 07/11/2008, a las 12:41, nightcrawler13 escribió: >> >> > thx for your reply but it still had same error >> >> >> or simply change the snippet code fromm extends AppHelper to extends >> >> Helper... >> >> -- >> Fran Iglesias >> [EMAIL PROTECTED] > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
I just added on my controllers /* var $name = 'Video'; */ and got another error Missing view You are seeing this error because the view for VideoController::index() could not be found. If you want to customize this error message, create app\views/errors/ missing_view.thtml. Fatal: Confirm you have created the file : C:\xampp\htdocs\stream\app \views\video\index.thtml sorry bother you, I'm new with CakePHP :( On Nov 7, 6:50 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > Have you tried change AppHelper to Helper. The snippet works for 1.2RC3 > > El 07/11/2008, a las 12:41, nightcrawler13 escribió: > > > thx for your reply but it still had same error > > >> or simply change the snippet code fromm extends AppHelper to extends > >> Helper... > > -- > Fran Iglesias > [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
Have you tried change AppHelper to Helper. The snippet works for 1.2RC3 El 07/11/2008, a las 12:41, nightcrawler13 escribió: > thx for your reply but it still had same error > >> or simply change the snippet code fromm extends AppHelper to extends >> Helper... >> -- Fran Iglesias [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
thx for your reply but it still had same error On Nov 7, 2:54 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > HI, > > El 07/11/2008, a las 7:39, nightcrawler13 escribió: > > > but after I followed then I got this error message "Fatal error: Class > > 'AppHelper' not found in C:\xampp\htdocs\stream\app\views\helpers > > \media_player.php on line 106" > > You could add the file app_helper.php in > > C:\xampp\htdocs\stream\app\ > > with this code > > > class AppHelper extends Helper { > > } > > ?> > > or simply change the snippet code fromm extends AppHelper to extends > Helper... > > I guess some builds of Cake 1.2 haven't cake/libs/view/helpers/ > app_helper.php > -- > Fran Iglesias > [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Well, many thanks to Martin for useful information. Yes, you right saying that I am running CakePHP on the xampp. But in Linux server, website works many times faster than on *amps. Well I think you also right saying that memory usage is not problem here. So thanks for really good answer ;] On Nov 7, 11:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Remigijus: > Memory usage is not something you should be overly concerned with on a > development machine. (which I guess is what you are testing) If you > are using WAMP or XAMPP or something like them then you are basically > faking a *nix environment for php to run in. This is probably not the > most memory efficient setup for CakePHP on Windows. Have you tried > running Cake on a more "native" Windows installation? It is a pain to > install (or it was last time I gave it a go) but should run both > faster and more efficient than the *AMPs. > > I tried pasting your memory-snipped into my layout and got back > results between 1.3 and 1.5 MB on two different apps. But if I look at > the apache processes, each on is between 12 and 20 MB of system > memory. My point is that 5MB measured may vary with the type of php > installation. I am not knowledgeable about how php measures memory but > I can imagine that as a apache module it measures only "itself" but as > a cgi or fcgi process it may include the overhead of the "cgi- > wrapper". Apache also has a different "worker" setup for Windows that > may affect memory usage. > > /Martin > > On Nov 7, 9:09 am, Remigijus <[EMAIL PROTECTED]> wrote: > > > Well, I found my problem. It's windows. I have put source code on > > Linux, and results are > > > Memory used with debug set to 1: 4.8 MB > > Load time: 0.4s, 3-4 sec, 1 sec. > > > To Martin and Teknoid: > > > Can you tell me the memory usage of you sites? I am watching it on > > layout page inserted line: > > memory_get_usage() / 1024 / 1024 > > > And by the way, why on windows cakephp uses 5.5 MB memory, same source > > on the Linux uses 4.8 MB? > > > On Nov 6, 9:40 pm, teknoid <[EMAIL PROTECTED]> wrote: > > > > Just did a simple look up on a random page of my app (1.2 RC3, recent > > > nightly build) > > > There are three models paginated on the page limit=15 rows. > > > Total of 18 queries required to get all data, 2 for pagination of the > > > main Model (with some conditions), 16 for related models... > > > yes they are little selects on hasMany. > > > There are a couple of CSS includes from the view and a few jquery > > > scripts as well. > > > Debug = 2. > > > > Total render time: 0.4857s > > > > Simple windows XP PC: 2.33GHz Core Duo, ~ 2GB RAM > > > > On Nov 6, 1:50 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > > > Ziobe: > > > > It sounds like you are having some odd problem with that computer. I > > > > am sorry to say I have no idea of what could be the cause. If 1.2 > > > > works fine on another computer, then the oldest support answer in the > > > > world might be the only way: reinstall. > > > > > On Nov 6, 12:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > > > > Just to say that my cakephp project is blank. > > > > > And even if i try to change the debug, the problem is still here > > > > > Remigijus: > > > > CakePHP 1.2 IS a bit slower than 1.1 in the "real-app" tests I have > > > > done on my own (roughly 10-30%). But since the difference is more > > > > pronounced in more complex requests, a lot of that may be that my code > > > > is not optimised enough for 1.2 yet. I have one benchmark that > > > > disturbs me but that is best left to it's own thread. > > > > > But I am not experiencing anything like what you describe. A simple > > > > blog-like app I built by taking a chainsaw to the code for the bakery > > > > is online (http://pensive.eimermusic.com/) with debug @ 1 and it is > > > > usually rendering in less than 0.05 sec. And that is still on RC2 (= > > > > the reportedly slow version) and not RC3. > > > > > FYI: It is on a single server (core duo2 2.33GHz, 2GB RAM sata > > > > raid10... nothing special) running mysql5, apache2 and php5 from > > > > Ubuntu's standard packages. eAccelerator is active but I have not done > > > > much else to optimize apache/php. > > > > > I am only detailing this to give you something to compare to. That > > > > server is a home-built garage-server that should be comparable to any > > > > normal computer. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Remigijus: Memory usage is not something you should be overly concerned with on a development machine. (which I guess is what you are testing) If you are using WAMP or XAMPP or something like them then you are basically faking a *nix environment for php to run in. This is probably not the most memory efficient setup for CakePHP on Windows. Have you tried running Cake on a more "native" Windows installation? It is a pain to install (or it was last time I gave it a go) but should run both faster and more efficient than the *AMPs. I tried pasting your memory-snipped into my layout and got back results between 1.3 and 1.5 MB on two different apps. But if I look at the apache processes, each on is between 12 and 20 MB of system memory. My point is that 5MB measured may vary with the type of php installation. I am not knowledgeable about how php measures memory but I can imagine that as a apache module it measures only "itself" but as a cgi or fcgi process it may include the overhead of the "cgi- wrapper". Apache also has a different "worker" setup for Windows that may affect memory usage. /Martin On Nov 7, 9:09 am, Remigijus <[EMAIL PROTECTED]> wrote: > Well, I found my problem. It's windows. I have put source code on > Linux, and results are > > Memory used with debug set to 1: 4.8 MB > Load time: 0.4s, 3-4 sec, 1 sec. > > To Martin and Teknoid: > > Can you tell me the memory usage of you sites? I am watching it on > layout page inserted line: > memory_get_usage() / 1024 / 1024 > > And by the way, why on windows cakephp uses 5.5 MB memory, same source > on the Linux uses 4.8 MB? > > On Nov 6, 9:40 pm, teknoid <[EMAIL PROTECTED]> wrote: > > > Just did a simple look up on a random page of my app (1.2 RC3, recent > > nightly build) > > There are three models paginated on the page limit=15 rows. > > Total of 18 queries required to get all data, 2 for pagination of the > > main Model (with some conditions), 16 for related models... > > yes they are little selects on hasMany. > > There are a couple of CSS includes from the view and a few jquery > > scripts as well. > > Debug = 2. > > > Total render time: 0.4857s > > > Simple windows XP PC: 2.33GHz Core Duo, ~ 2GB RAM > > > On Nov 6, 1:50 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Ziobe: > > > It sounds like you are having some odd problem with that computer. I > > > am sorry to say I have no idea of what could be the cause. If 1.2 > > > works fine on another computer, then the oldest support answer in the > > > world might be the only way: reinstall. > > > > On Nov 6, 12:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > > > Just to say that my cakephp project is blank. > > > > And even if i try to change the debug, the problem is still here > > > > Remigijus: > > > CakePHP 1.2 IS a bit slower than 1.1 in the "real-app" tests I have > > > done on my own (roughly 10-30%). But since the difference is more > > > pronounced in more complex requests, a lot of that may be that my code > > > is not optimised enough for 1.2 yet. I have one benchmark that > > > disturbs me but that is best left to it's own thread. > > > > But I am not experiencing anything like what you describe. A simple > > > blog-like app I built by taking a chainsaw to the code for the bakery > > > is online (http://pensive.eimermusic.com/) with debug @ 1 and it is > > > usually rendering in less than 0.05 sec. And that is still on RC2 (= > > > the reportedly slow version) and not RC3. > > > > FYI: It is on a single server (core duo2 2.33GHz, 2GB RAM sata > > > raid10... nothing special) running mysql5, apache2 and php5 from > > > Ubuntu's standard packages. eAccelerator is active but I have not done > > > much else to optimize apache/php. > > > > I am only detailing this to give you something to compare to. That > > > server is a home-built garage-server that should be comparable to any > > > normal computer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Well, I found my problem. It's windows. I have put source code on Linux, and results are Memory used with debug set to 1: 4.8 MB Load time: 0.4s, 3-4 sec, 1 sec. To Martin and Teknoid: Can you tell me the memory usage of you sites? I am watching it on layout page inserted line: memory_get_usage() / 1024 / 1024 And by the way, why on windows cakephp uses 5.5 MB memory, same source on the Linux uses 4.8 MB? On Nov 6, 9:40 pm, teknoid <[EMAIL PROTECTED]> wrote: > Just did a simple look up on a random page of my app (1.2 RC3, recent > nightly build) > There are three models paginated on the page limit=15 rows. > Total of 18 queries required to get all data, 2 for pagination of the > main Model (with some conditions), 16 for related models... > yes they are little selects on hasMany. > There are a couple of CSS includes from the view and a few jquery > scripts as well. > Debug = 2. > > Total render time: 0.4857s > > Simple windows XP PC: 2.33GHz Core Duo, ~ 2GB RAM > > On Nov 6, 1:50 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Ziobe: > > It sounds like you are having some odd problem with that computer. I > > am sorry to say I have no idea of what could be the cause. If 1.2 > > works fine on another computer, then the oldest support answer in the > > world might be the only way: reinstall. > > > On Nov 6, 12:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > > Just to say that my cakephp project is blank. > > > And even if i try to change the debug, the problem is still here > > > Remigijus: > > CakePHP 1.2 IS a bit slower than 1.1 in the "real-app" tests I have > > done on my own (roughly 10-30%). But since the difference is more > > pronounced in more complex requests, a lot of that may be that my code > > is not optimised enough for 1.2 yet. I have one benchmark that > > disturbs me but that is best left to it's own thread. > > > But I am not experiencing anything like what you describe. A simple > > blog-like app I built by taking a chainsaw to the code for the bakery > > is online (http://pensive.eimermusic.com/) with debug @ 1 and it is > > usually rendering in less than 0.05 sec. And that is still on RC2 (= > > the reportedly slow version) and not RC3. > > > FYI: It is on a single server (core duo2 2.33GHz, 2GB RAM sata > > raid10... nothing special) running mysql5, apache2 and php5 from > > Ubuntu's standard packages. eAccelerator is active but I have not done > > much else to optimize apache/php. > > > I am only detailing this to give you something to compare to. That > > server is a home-built garage-server that should be comparable to any > > normal computer. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 and JW FLV Media Player
HI, El 07/11/2008, a las 7:39, nightcrawler13 escribió: > but after I followed then I got this error message "Fatal error: Class > 'AppHelper' not found in C:\xampp\htdocs\stream\app\views\helpers > \media_player.php on line 106" You could add the file app_helper.php in C:\xampp\htdocs\stream\app\ with this code or simply change the snippet code fromm extends AppHelper to extends Helper... I guess some builds of Cake 1.2 haven't cake/libs/view/helpers/ app_helper.php -- Fran Iglesias [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Just did a simple look up on a random page of my app (1.2 RC3, recent nightly build) There are three models paginated on the page limit=15 rows. Total of 18 queries required to get all data, 2 for pagination of the main Model (with some conditions), 16 for related models... yes they are little selects on hasMany. There are a couple of CSS includes from the view and a few jquery scripts as well. Debug = 2. Total render time: 0.4857s Simple windows XP PC: 2.33GHz Core Duo, ~ 2GB RAM On Nov 6, 1:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Ziobe: > It sounds like you are having some odd problem with that computer. I > am sorry to say I have no idea of what could be the cause. If 1.2 > works fine on another computer, then the oldest support answer in the > world might be the only way: reinstall. > > On Nov 6, 12:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > Just to say that my cakephp project is blank. > > And even if i try to change the debug, the problem is still here > > Remigijus: > CakePHP 1.2 IS a bit slower than 1.1 in the "real-app" tests I have > done on my own (roughly 10-30%). But since the difference is more > pronounced in more complex requests, a lot of that may be that my code > is not optimised enough for 1.2 yet. I have one benchmark that > disturbs me but that is best left to it's own thread. > > But I am not experiencing anything like what you describe. A simple > blog-like app I built by taking a chainsaw to the code for the bakery > is online (http://pensive.eimermusic.com/) with debug @ 1 and it is > usually rendering in less than 0.05 sec. And that is still on RC2 (= > the reportedly slow version) and not RC3. > > FYI: It is on a single server (core duo2 2.33GHz, 2GB RAM sata > raid10... nothing special) running mysql5, apache2 and php5 from > Ubuntu's standard packages. eAccelerator is active but I have not done > much else to optimize apache/php. > > I am only detailing this to give you something to compare to. That > server is a home-built garage-server that should be comparable to any > normal computer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Ziobe: It sounds like you are having some odd problem with that computer. I am sorry to say I have no idea of what could be the cause. If 1.2 works fine on another computer, then the oldest support answer in the world might be the only way: reinstall. On Nov 6, 12:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > Just to say that my cakephp project is blank. > And even if i try to change the debug, the problem is still here Remigijus: CakePHP 1.2 IS a bit slower than 1.1 in the "real-app" tests I have done on my own (roughly 10-30%). But since the difference is more pronounced in more complex requests, a lot of that may be that my code is not optimised enough for 1.2 yet. I have one benchmark that disturbs me but that is best left to it's own thread. But I am not experiencing anything like what you describe. A simple blog-like app I built by taking a chainsaw to the code for the bakery is online (http://pensive.eimermusic.com/) with debug @ 1 and it is usually rendering in less than 0.05 sec. And that is still on RC2 (= the reportedly slow version) and not RC3. FYI: It is on a single server (core duo2 2.33GHz, 2GB RAM sata raid10... nothing special) running mysql5, apache2 and php5 from Ubuntu's standard packages. eAccelerator is active but I have not done much else to optimize apache/php. I am only detailing this to give you something to compare to. That server is a home-built garage-server that should be comparable to any normal computer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Dave J: I have very (very!) small page that using postgresql database with 20 rows at all. In the config file I have found this line: Cache::config('default', array('engine' => 'File')); How cache can affect website memory usage and speed? By the way, is anyone using website made by CakePHP version 1.2? Have you any problems with speed or memory usage? On Nov 6, 2:38 pm, Dave J <[EMAIL PROTECTED]> wrote: > Are you using any op-code caches (APC, eAccelerator or XCache) ? > > On Nov 6, 11:53 am, Remigijus <[EMAIL PROTECTED]> wrote: > > > I have set debug mode to zero. But still framework uses > > > Memory used: 5.42 MB > > > And loads about 1 sec. I have done some benchmarks, and without models > > loaded, site uses 2.6MB memory, with empty model (and set param > > useTable to null, and recursion to -1) it uses 5.42. Where is the > > problem, please help me ;( > > > On Nov 6, 1:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > > Just to say that my cakephp project is blank. > > > And even if i try to change the debug, the problem is still here > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Are you using any op-code caches (APC, eAccelerator or XCache) ? On Nov 6, 11:53 am, Remigijus <[EMAIL PROTECTED]> wrote: > I have set debug mode to zero. But still framework uses > > Memory used: 5.42 MB > > And loads about 1 sec. I have done some benchmarks, and without models > loaded, site uses 2.6MB memory, with empty model (and set param > useTable to null, and recursion to -1) it uses 5.42. Where is the > problem, please help me ;( > > On Nov 6, 1:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > > > Just to say that my cakephp project is blank. > > And even if i try to change the debug, the problem is still here --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
I have set debug mode to zero. But still framework uses Memory used: 5.42 MB And loads about 1 sec. I have done some benchmarks, and without models loaded, site uses 2.6MB memory, with empty model (and set param useTable to null, and recursion to -1) it uses 5.42. Where is the problem, please help me ;( On Nov 6, 1:12 pm, Ziobe <[EMAIL PROTECTED]> wrote: > Just to say that my cakephp project is blank. > And even if i try to change the debug, the problem is still here --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Just to say that my cakephp project is blank. And even if i try to change the debug, the problem is still here --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
I don't get it, even in debug mode I always get response times in ms, even in modest laptops/desktop machines... always in linux ;) - Dardo Sordi. On Thu, Nov 6, 2008 at 8:30 AM, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Nov 6, 11:24 am, Remigijus <[EMAIL PROTECTED]> wrote: >> Latest CakePHP framework 10x times faster? >> >> I have upgraded to latest version, and my empty page before: >> used 5.5 MB of memory >> loaded in 1.2s >> >> After upgraded: >> used 5.6 of memory >> loaded in 2.3s >> >> Where is that 'faster'? >> >> I have tested in 3 apache servers. Tested with both 1.2 stable and 1.2 >> latest release. So where is the problem? > > In you testing load times with any or all of the typical causes > (search the group) applying - most notable: having debug enabled. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
On Nov 6, 11:24 am, Remigijus <[EMAIL PROTECTED]> wrote: > Latest CakePHP framework 10x times faster? > > I have upgraded to latest version, and my empty page before: > used 5.5 MB of memory > loaded in 1.2s > > After upgraded: > used 5.6 of memory > loaded in 2.3s > > Where is that 'faster'? > > I have tested in 3 apache servers. Tested with both 1.2 stable and 1.2 > latest release. So where is the problem? In you testing load times with any or all of the typical causes (search the group) applying - most notable: having debug enabled. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 is slow (4s...)
Latest CakePHP framework 10x times faster? I have upgraded to latest version, and my empty page before: used 5.5 MB of memory loaded in 1.2s After upgraded: used 5.6 of memory loaded in 2.3s Where is that 'faster'? I have tested in 3 apache servers. Tested with both 1.2 stable and 1.2 latest release. So where is the problem? On Nov 6, 12:04 pm, Ziobe <[EMAIL PROTECTED]> wrote: > Hello, i want to use Cake 1.2 but for render a page it takes more than > 4sec > > I try Cake 1.1, CodeIgniter, Drupal and all of that things are fully > working on my computer. > But cake 1.2 don't want. I Also tried on another computer and it's > works. > I don't know what to do can you help me ? > I'm on windows i use the latest Wamp package (also tried with XAMPP > same problem) > (sorry for my bad english) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 custom route
Please consult the documentation: http://book.cakephp.org/view/542/Defining-Routes On Sep 3, 3:36 pm, aka <[EMAIL PROTECTED]> wrote: > Hey thats great, thanx works like a charm! > > Can someone also tell me what is happening here...?! > > On 3 sep, 20:39, Nate <[EMAIL PROTECTED]> wrote: > > > Router::connect( > > "/view/:id", > > array("controller" => "posts", "action" => "view"), > > array('id' => '[0-9]+', 'pass' => array('id')) > > ); > > > On Sep 3, 1:37 pm, aka <[EMAIL PROTECTED]> wrote: > > > > Ok, i've been breaking my head over this. > > > > I'm trying to change the routing of my app so that (for my base > > > controller, lets say 'posts') it will be hidden in the url. That is to > > > say that i can use url's > > > likewww.mysite.com/view/1insteadofwww.mysite.com/posts/view/1. > > > Effectively just hiding (or re-routing) > > > the controller. Now I know this is possible since this method is used > > > on the cakephp website itself > > > (i.e.http://book.cakephp.org/view/542). > > > > Any ideas how the routes for this situation should be set up? > > > > Thanx! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 custom route
Router::connect( "/view/:id", array("controller" => "posts", "action" => "view"), array('id' => '[0-9]+', 'pass' => array('id')) ); On Sep 3, 1:37 pm, aka <[EMAIL PROTECTED]> wrote: > Ok, i've been breaking my head over this. > > I'm trying to change the routing of my app so that (for my base > controller, lets say 'posts') it will be hidden in the url. That is to > say that i can use url's likewww.mysite.com/view/1instead > ofwww.mysite.com/posts/view/1. Effectively just hiding (or re-routing) > the controller. Now I know this is possible since this method is used > on the cakephp website itself > (i.e.http://book.cakephp.org/view/542). > > Any ideas how the routes for this situation should be set up? > > Thanx! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 custom route
Hey thats great, thanx works like a charm! Can someone also tell me what is happening here...?! On 3 sep, 20:39, Nate <[EMAIL PROTECTED]> wrote: > Router::connect( > "/view/:id", > array("controller" => "posts", "action" => "view"), > array('id' => '[0-9]+', 'pass' => array('id')) > ); > > On Sep 3, 1:37 pm, aka <[EMAIL PROTECTED]> wrote: > > > Ok, i've been breaking my head over this. > > > I'm trying to change the routing of my app so that (for my base > > controller, lets say 'posts') it will be hidden in the url. That is to > > say that i can use url's > > likewww.mysite.com/view/1insteadofwww.mysite.com/posts/view/1. Effectively > > just hiding (or re-routing) > > the controller. Now I know this is possible since this method is used > > on the cakephp website itself > > (i.e.http://book.cakephp.org/view/542). > > > Any ideas how the routes for this situation should be set up? > > > Thanx! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Auth - Is someone logged in?
Little hint: You can add a $this->set into the AppController::beforeRender to always read $this->Auth->user() and thus make its content available in all views. function beforeRender() { $this->set('auth', $this->Auth->user()); } You can also do the same for your controllers, so you have that info in all actions too function beforeFilter() { $this->currentUser = $this->Auth->user(); $this->isAuthed = !empty($this->currentUser); } And of course you could then use $this->currentUser for your $this->set call instead of calling $this->Auth->user() again. function beforeRender() { $this->set('auth', $this->currentUser); $this->set('isAuthed', $this->isAuthed); } In your views you can benefit from all that like so: Happy baking :) On Wed, Aug 27, 2008 at 9:23 PM, ar2oor <[EMAIL PROTECTED]> wrote: > > It's working on functions with $this->Auth->deny(); > > but its not working on functions with $this->Auth->allow(); > > ;/ > > any ideas ? > > On 17 Sie, 12:36, francky06l <[EMAIL PROTECTED]> wrote: >> The Auth login stores the user information in the Session (with Auth >> key). >> The Auth->user() is actually a wrapper function to the session >> Auth.User key. >> The Auth logout function delete the informations from the session. >> >> Knowing this, you can use the Session component in controllers and the >> session helper in views to detect the login status. >> >> in controllers: >> >> $this->Session->check('Auth.User.id') will return true if the user is >> logged, you can also use $this->Auth->user('id'). >> >> in views >> >> $session->check('Auth.User.id') will tell you if a user is logged, and >> you can user $session->read('Auth.User') to retrieve the user's >> information. >> >> hth >> >> On Aug 17, 2:31 am, "Bill Brisky" <[EMAIL PROTECTED]> wrote: >> >> > I'm starting off with Cake and enjoying it. As confusing as the entire ACL >> > world seems, I think I'm getting a grip on it. >> >> > One small current problem: How do you determine if someone is currently >> > logged in? >> >> > Here is the situation: I have a simple home page (pages/home.ctp) that >> > simply that should display a "login" link (users/login) and if no one is >> > currently logged in, a "logout" link (users/logout). It seems simple >> > enough >> > however, I can't seem to find a way to determine whether or not someone is >> > logged in. >> >> > $loggedIn (Auth public variable as stated in docs) seems to always be false >> > outside of actual Auth code. >> >> > $this->Auth->user() : After an initial login, this always seems to return a >> > User object properly filled out, with the exception that person had >> > actually >> > logged out. >> >> > So between an always false condition, and an always true condition, what >> > does one do? I have a feeling I'm missing something fundamental and will >> > be >> > smacking my head on my desk after reading the solution. >> >> > More detail: >> >> > App_controller.php >> >> > Acl & Auth components in $components >> >> > Auth variables set in beforeFilter >> >> > Pages/Home.ctp >> >> > Typical Cake home page >> >> > Due to the lack of a controller (and thus a lack of access to data), I made >> > a copy of the cake core pages_controller.php and moved it into my >> > app/controllers directory. >> >> > Controllers/pages_controller.php >> >> > This is where I hope to set a variable (inside of display()) with login >> > status and pass it to home.ctp. >> >> > Changes to this file are minimal: Added Auth & Session to $components. >> >> > Users_controller.php >> >> > Typical Auth login (no code) and logout (taken from examples). >> >> > Versions: >> >> > - Windows XP >> >> > - Xampp v1.6.7 >> >> > - PHP v.5.2.6 >> >> > - Cake v1.2.0.7296rc2 >> >> > Any and all help will be greatly appreciated. >> >> > B. >> >> > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Auth - Is someone logged in?
It's working on functions with $this->Auth->deny(); but its not working on functions with $this->Auth->allow(); ;/ any ideas ? On 17 Sie, 12:36, francky06l <[EMAIL PROTECTED]> wrote: > The Auth login stores the user information in the Session (with Auth > key). > The Auth->user() is actually a wrapper function to the session > Auth.User key. > The Auth logout function delete the informations from the session. > > Knowing this, you can use the Session component in controllers and the > session helper in views to detect the login status. > > in controllers: > > $this->Session->check('Auth.User.id') will return true if the user is > logged, you can also use $this->Auth->user('id'). > > in views > > $session->check('Auth.User.id') will tell you if a user is logged, and > you can user $session->read('Auth.User') to retrieve the user's > information. > > hth > > On Aug 17, 2:31 am, "Bill Brisky" <[EMAIL PROTECTED]> wrote: > > > I'm starting off with Cake and enjoying it. As confusing as the entire ACL > > world seems, I think I'm getting a grip on it. > > > One small current problem: How do you determine if someone is currently > > logged in? > > > Here is the situation: I have a simple home page (pages/home.ctp) that > > simply that should display a "login" link (users/login) and if no one is > > currently logged in, a "logout" link (users/logout). It seems simple enough > > however, I can't seem to find a way to determine whether or not someone is > > logged in. > > > $loggedIn (Auth public variable as stated in docs) seems to always be false > > outside of actual Auth code. > > > $this->Auth->user() : After an initial login, this always seems to return a > > User object properly filled out, with the exception that person had actually > > logged out. > > > So between an always false condition, and an always true condition, what > > does one do? I have a feeling I'm missing something fundamental and will be > > smacking my head on my desk after reading the solution. > > > More detail: > > > App_controller.php > > > Acl & Auth components in $components > > > Auth variables set in beforeFilter > > > Pages/Home.ctp > > > Typical Cake home page > > > Due to the lack of a controller (and thus a lack of access to data), I made > > a copy of the cake core pages_controller.php and moved it into my > > app/controllers directory. > > > Controllers/pages_controller.php > > > This is where I hope to set a variable (inside of display()) with login > > status and pass it to home.ctp. > > > Changes to this file are minimal: Added Auth & Session to $components. > > > Users_controller.php > > > Typical Auth login (no code) and logout (taken from examples). > > > Versions: > > > - Windows XP > > > - Xampp v1.6.7 > > > - PHP v.5.2.6 > > > - Cake v1.2.0.7296rc2 > > > Any and all help will be greatly appreciated. > > > B. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Auth - Is someone logged in?
Thank You! As with everything, this all seems impossible (at least daunting), until you know how. Of course, once you know how you slap your forehead and say: "Duh.". Now on to figuring out the ACL! Thanks again, B. On Aug 17, 3:36 am, francky06l <[EMAIL PROTECTED]> wrote: > TheAuthloginstores the user information in the Session (withAuth > key). > TheAuth->user() is actually a wrapper function to the sessionAuth.User key. > TheAuthlogout function delete the informations from the session. > > Knowing this, you can use the Session component in controllers and the > session helper in views to detect theloginstatus. > > in controllers: > > $this->Session->check('Auth.User.id') will return true if the user is > logged, you can also use $this->Auth->user('id'). > > in views > > $session->check('Auth.User.id') will tell you if a user is logged, and > you can user $session->read('Auth.User') to retrieve the user's > information. > > hth > > On Aug 17, 2:31 am, "Bill Brisky" <[EMAIL PROTECTED]> wrote: > > > I'm starting off with Cake and enjoying it. As confusing as the entire ACL > > world seems, I think I'm getting a grip on it. > > > One small current problem: How do you determine if someone is currently > > logged in? > > > Here is the situation: I have a simple home page (pages/home.ctp) that > > simply that should display a "login" link (users/login) and if no one is > > currently logged in, a "logout" link (users/logout). It seems simple enough > > however, I can't seem to find a way to determine whether or not someone is > > logged in. > > > $loggedIn (Authpublic variable as stated in docs) seems to always be false > > outside of actualAuthcode. > > > $this->Auth->user() : After an initiallogin, this always seems to return a > > User object properly filled out, with the exception that person had actually > > logged out. > > > So between an always false condition, and an always true condition, what > > does one do? I have a feeling I'm missing something fundamental and will be > > smacking my head on my desk after reading the solution. > > > More detail: > > > App_controller.php > > > Acl &Authcomponents in $components > > >Authvariables set in beforeFilter > > > Pages/Home.ctp > > > Typical Cake home page > > > Due to the lack of a controller (and thus a lack of access to data), I made > > a copy of the cake core pages_controller.php and moved it into my > > app/controllers directory. > > > Controllers/pages_controller.php > > > This is where I hope to set a variable (inside of display()) withlogin > > status and pass it to home.ctp. > > > Changes to this file are minimal: AddedAuth& Session to $components. > > > Users_controller.php > > > TypicalAuthlogin(no code) and logout (taken from examples). > > > Versions: > > > - Windows XP > > > - Xampp v1.6.7 > > > - PHP v.5.2.6 > > > - Cake v1.2.0.7296rc2 > > > Any and all help will be greatly appreciated. > > > B. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 manual and api
We have internet here in Spain. Sounds like you'll be using a laptop. Wifi is widespread (not near my house, sadly) and I know that in Barcelona, there is free access via wifi in the markets. I suspect that it is much more widespread, for instance my local (village) library has public wifi. I don't have a laptop and enjoy the freedom from work! Find the manual-in-a-page @ http://book.cakephp.org/complete/3/the-manual. Just save the page to a local device - I have it on a stick. There is a pre-beta API available for download @ http://cakeforge.org/frs/?group_id=53&release_id=140 or you might try this (I haven't looked at it) http://www.internetguru.com.au/uploads/CakePHP.zip Enjoy your stay. The summer has been quite mild so far. Leo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
On Jul 11, 11:07 am, NOSLOW <[EMAIL PROTECTED]> wrote: > I think the second paramter, "PHPBB_Login", should be all lower case > just to get the file to load. Then when instantiating the class > "PHPBB_Login", keep the case as it's defined inside the file. > > Based on the examples here:http://book.cakephp.org/view/499/the-app-class, > it looks that as soon as you introduce capital letters into that > second parameter, it's expected a Cake "well named" file (i.e. > "WellNamed" expects "well.named.php"). I'd imagine in your case, it's > expecting a file named "p.h.p.b.b_.login.php", Keeping it all lower > case should solve this. > > But then again, if you read > here:http://book.cakephp.org/view/411/migrating-from-cakephp-1-1-to-, > it suggests that the second parameter is just a unique identifier so > long as you supply the path and file name: > > App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ > relative/to/vendor/file.php')); > > which is the same as what is not working: > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > Have you tried using sub folders for each vendors (a good practice): > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb/ > phpbb.php")); > > As far as that parameter being 'aUniqueIdentifier', I have found that > to be true - you cannot load 2 different files using the same > identifier: > > App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ > relative/to/vendor/file_one.php')); // loads file_one.php > App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ > relative/to/vendor/file_two.php')); // does NOT load file_two.php > because Cake thinks it's already loaded based on it using the same > identifier of the previous call. > > After checking out the unit tests in the Cake core, I found this > interesting way of loading multiple vendor files: > App::import('Vendor', array('simpletest'.DS.'unit_tester', > 'simpletest'.DS.'mock_objects', 'simpletest'.DS.'web_tester')); > > If anyone has some definitive answers on this stuff, let's try to get > the Cookbook updated. I recently updated the cookbook section related to App::import() inclusive of Vendor loading most cases are covered now I think.. -Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
I think the second paramter, "PHPBB_Login", should be all lower case just to get the file to load. Then when instantiating the class "PHPBB_Login", keep the case as it's defined inside the file. Based on the examples here: http://book.cakephp.org/view/499/the-app-class, it looks that as soon as you introduce capital letters into that second parameter, it's expected a Cake "well named" file (i.e. "WellNamed" expects "well.named.php"). I'd imagine in your case, it's expecting a file named "p.h.p.b.b_.login.php", Keeping it all lower case should solve this. But then again, if you read here: http://book.cakephp.org/view/411/migrating-from-cakephp-1-1-to-, it suggests that the second parameter is just a unique identifier so long as you supply the path and file name: App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ relative/to/vendor/file.php')); which is the same as what is not working: App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); Have you tried using sub folders for each vendors (a good practice): App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb/ phpbb.php")); As far as that parameter being 'aUniqueIdentifier', I have found that to be true - you cannot load 2 different files using the same identifier: App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ relative/to/vendor/file_one.php')); // loads file_one.php App::import('vendor', 'aUniqueIdentifier', array('file' =>'path/ relative/to/vendor/file_two.php')); // does NOT load file_two.php because Cake thinks it's already loaded based on it using the same identifier of the previous call. After checking out the unit tests in the Cake core, I found this interesting way of loading multiple vendor files: App::import('Vendor', array('simpletest'.DS.'unit_tester', 'simpletest'.DS.'mock_objects', 'simpletest'.DS.'web_tester')); If anyone has some definitive answers on this stuff, let's try to get the Cookbook updated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
Got it working. First I tried deprecated way of vendor('lastrss') and it worked fine. So I tried App::import('vendor', 'lastrss') and it also worked fine. Did not think it would be case sensitive, but in my case (and maybe yours) it is. On Jul 11, 9:31 am, clrockwell <[EMAIL PROTECTED]> wrote: > If forgot to mention that I am importing a different class, > lastrss.php > > Code: App::import('Vendor','lastrss'); > > On Jul 11, 9:29 am, clrockwell <[EMAIL PROTECTED]> wrote: > > > If you happen to come by a solution, please post it here. I am having > > the same issue. Using RC2, build 7296 > > > On Jul 11, 4:47 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > > Just tried: > > > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > > > And I'm still getting the same error: > > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > > \archimbolo\app\controllers\users_controller.php on line 42 > > > > On Jul 10, 9:15 pm, "b logica" <[EMAIL PROTECTED]> wrote: > > > > > try > > > > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > > > > On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Hi all > > > > > > I have a vendor class I've put in \root\vendors\phpbb.php > > > > > > Which contains the class: > > > > > > class PHPBB_Login { > > > > > } > > > > > > And am referencing it in my code with the following: > > > > > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > > > > > (which I think is right) > > > > > > But when I try an instance the class with: > > > > > > $phpBB = new PHPBB_Login(); > > > > > > I get the following error: > > > > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > > > > \archimbolo\app\controllers\users_controller.php on line 41 > > > > > > CakePHP isn't finding the vendor file, it also doesn't find it if I > > > > > put it in app\vendors either. > > > > > > Where do I put the file? Or, what does App::Import need to look like > > > > > for it to be able to find the vendor file? > > > > > > Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
If forgot to mention that I am importing a different class, lastrss.php Code: App::import('Vendor','lastrss'); On Jul 11, 9:29 am, clrockwell <[EMAIL PROTECTED]> wrote: > If you happen to come by a solution, please post it here. I am having > the same issue. Using RC2, build 7296 > > On Jul 11, 4:47 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > Just tried: > > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > > And I'm still getting the same error: > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > \archimbolo\app\controllers\users_controller.php on line 42 > > > On Jul 10, 9:15 pm, "b logica" <[EMAIL PROTECTED]> wrote: > > > > try > > > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > > > On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > > > Hi all > > > > > I have a vendor class I've put in \root\vendors\phpbb.php > > > > > Which contains the class: > > > > > class PHPBB_Login { > > > > } > > > > > And am referencing it in my code with the following: > > > > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > > > > (which I think is right) > > > > > But when I try an instance the class with: > > > > > $phpBB = new PHPBB_Login(); > > > > > I get the following error: > > > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > > > \archimbolo\app\controllers\users_controller.php on line 41 > > > > > CakePHP isn't finding the vendor file, it also doesn't find it if I > > > > put it in app\vendors either. > > > > > Where do I put the file? Or, what does App::Import need to look like > > > > for it to be able to find the vendor file? > > > > > Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
If you happen to come by a solution, please post it here. I am having the same issue. Using RC2, build 7296 On Jul 11, 4:47 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > Just tried: > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > And I'm still getting the same error: > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > \archimbolo\app\controllers\users_controller.php on line 42 > > On Jul 10, 9:15 pm, "b logica" <[EMAIL PROTECTED]> wrote: > > > try > > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > > On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > > Hi all > > > > I have a vendor class I've put in \root\vendors\phpbb.php > > > > Which contains the class: > > > > class PHPBB_Login { > > > } > > > > And am referencing it in my code with the following: > > > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > > > (which I think is right) > > > > But when I try an instance the class with: > > > > $phpBB = new PHPBB_Login(); > > > > I get the following error: > > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > > \archimbolo\app\controllers\users_controller.php on line 41 > > > > CakePHP isn't finding the vendor file, it also doesn't find it if I > > > put it in app\vendors either. > > > > Where do I put the file? Or, what does App::Import need to look like > > > for it to be able to find the vendor file? > > > > Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
Just tried: App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); And I'm still getting the same error: Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects \archimbolo\app\controllers\users_controller.php on line 42 On Jul 10, 9:15 pm, "b logica" <[EMAIL PROTECTED]> wrote: > try > > App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); > > On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > Hi all > > > I have a vendor class I've put in \root\vendors\phpbb.php > > > Which contains the class: > > > class PHPBB_Login { > > } > > > And am referencing it in my code with the following: > > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > > (which I think is right) > > > But when I try an instance the class with: > > > $phpBB = new PHPBB_Login(); > > > I get the following error: > > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > > \archimbolo\app\controllers\users_controller.php on line 41 > > > CakePHP isn't finding the vendor file, it also doesn't find it if I > > put it in app\vendors either. > > > Where do I put the file? Or, what does App::Import need to look like > > for it to be able to find the vendor file? > > > Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
> I did it the other way round - Auth the user in cake and set the cookies as > expected by PHPBB - seemed like much less work That was the direction I was veering towards too (if the phpBB class doesn't work...) Will definitely post my results when (if?) I get it to work... On Jul 11, 5:27 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On Fri, Jul 11, 2008 at 12:12 AM, Jonathan Snook <[EMAIL PROTECTED]> > wrote: > > > > > btw: if you're doing what I think you're doing, I'd love to see the > > final result. To get login working for a PHPBB integration, I ended up > > just using curl to do a post request and then pass the session cookies > > onto the end user. A little hackish but it worked. > > I did it the other way round - Auth the user in cake and set the cookies as > expected by PHPBB - seemed like much less work > > Tarique > > -- > = > Cheesecake-Photoblog:http://cheesecake-photoblog.org > PHP for E-Biz:http://sanisoft.com > = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
On Fri, Jul 11, 2008 at 12:12 AM, Jonathan Snook <[EMAIL PROTECTED]> wrote: > > btw: if you're doing what I think you're doing, I'd love to see the > final result. To get login working for a PHPBB integration, I ended up > just using curl to do a post request and then pass the session cookies > onto the end user. A little hackish but it worked. I did it the other way round - Auth the user in cake and set the cookies as expected by PHPBB - seemed like much less work Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
try App::import("Vendor", "PHPBB_Login", false, null, 'phpbb.php'); On Thu, Jul 10, 2008 at 1:21 PM, RichardAtHome <[EMAIL PROTECTED]> wrote: > > Hi all > > I have a vendor class I've put in \root\vendors\phpbb.php > > Which contains the class: > > class PHPBB_Login { > } > > And am referencing it in my code with the following: > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > (which I think is right) > > But when I try an instance the class with: > > $phpBB = new PHPBB_Login(); > > I get the following error: > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > \archimbolo\app\controllers\users_controller.php on line 41 > > CakePHP isn't finding the vendor file, it also doesn't find it if I > put it in app\vendors either. > > Where do I put the file? Or, what does App::Import need to look like > for it to be able to find the vendor file? > > Thanks in advance. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 App::import("vendor") isn't finding the file
btw: if you're doing what I think you're doing, I'd love to see the final result. To get login working for a PHPBB integration, I ended up just using curl to do a post request and then pass the session cookies onto the end user. A little hackish but it worked. On 7/10/08, RichardAtHome <[EMAIL PROTECTED]> wrote: > > Hi all > > I have a vendor class I've put in \root\vendors\phpbb.php > > Which contains the class: > > class PHPBB_Login { > } > > And am referencing it in my code with the following: > > App::import("Vendor", "PHPBB_Login", array("file"=>"phpbb.php")); > > (which I think is right) > > But when I try an instance the class with: > > $phpBB = new PHPBB_Login(); > > I get the following error: > > Fatal error: Class 'PHPBB_Login' not found in C:\htdocs\projects > \archimbolo\app\controllers\users_controller.php on line 41 > > CakePHP isn't finding the vendor file, it also doesn't find it if I > put it in app\vendors either. > > Where do I put the file? Or, what does App::Import need to look like > for it to be able to find the vendor file? > > Thanks in advance. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 RC2: syntax for BETWEEN operator changed?
$paginatorScope['Advert.status BETWEEN ? AND ?'] = array($value1, $value2); On Jun 28, 8:13 am, Mike52 <[EMAIL PROTECTED]> wrote: > I am having trouble specifying a paginator condition with the BETWEEN > operator after upgrading to RC2. > > In 1.2.0.6311 beta: > $paginatorScope["Advert.status BETWEEN"] = "A AND B"; > > generates corresponding SQL: > `Advert`.`status` BETWEEN 'A' AND 'B' > > In 1.2.0.7296 RC2 the same condition generates: > `Advert`.`status` = 'BETWEEN A AND B' > > If I change the condition to: > $paginatorScope["Advert.status BETWEEN"] = "A AND B"; > > this generates: > `Advert`.`status` BETWEEN 'A AND B' > > Looks slightly better, but still not valid SQL. What is the correct > way to specify the BETWEEN syntax in RC2 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 RC1 and MySQL 4.0 are not able to delete a record
I would submit a bug on this. I ran across another MySQL 4.1 incompatibility last week and they fixed it. But first update to the latest SVN version, because maybe this has already been fixed. I came across another MySQL 4.1 issue that luckily wasn't causing me any problems, so I didn't dig deeper, so I know there are multiple incompatibilities between the current version of Cake and MySQL 4.x -Aran On Jun 24, 11:56 am, wholewheat <[EMAIL PROTECTED]> wrote: > I am having a problem ever since moving to a sever that is limted to > MySQL 4.0. > Delete no longer works, and after some research in to why, it seems > that MySQL 4.0 does not like a table alias in a DELETE statement. So, > what Cake (1.2 RC1) is generating is: > DELETE `MyTable` FROM `cake_my_table` AS `MyTable` WHERE > `MyTable`.`id` IN (7) > but it only works when simplified down to... > DELETE FROM `cake_my_table` WHERE `id` IN (7) > > Does anyone have a work around that will save me from over-riding > delete (or del) for every model in the application. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: [Cake 1.2. RC1] - Problem with Ajax and encoding
database default collation is just a little part, and doesn't matter as much as you may think. database connection is far more important (you can change it in config/database.php), the file you are editing is, i'm almost for sure, wrongly encoded. Try To change it in Aptana or Eclipse (under the 'edit' menu, there's a 'set encoding' option. It's the most common mistake when dealing with utf8. Another sensitive part is the *server* configurations for sending text/html. Some of very old or badly configured servers lack the possibility to send it in utf8, therefore, breaking the path between cake and the browser. This is *the* article to read. It helped me a thousand times when dealing with 'i dont need to know this' programmers: http://www.joelonsoftware.com/articles/Unicode.html Spark On Sun, Jun 15, 2008 at 6:33 AM, Webrickco <[EMAIL PROTECTED]> wrote: > > Hi, I have a problem figuring out why the result of an Ajax execution > is not in the correct encoding under cake. > > You can see the result at http://webrickco.com/caketest. Using the > user/password david/test and clicking on the first link: "Alterar a > configuração dos menus". At this point the result of the consultation > to the database is correctly displayed as well as all other > accentuated text in the page, but if I click on a tick button (calls > an Ajax function to copy the values to the edit fields and refreshes > the item list), the refresh of the DIV is compromised. How do i do to > keep the correct encoding after I fire an Ajax function? > > Some data on the site: > Default.ctp: $html->charset('ISO-8859-1'); > > Ajax function triggered as follow: > echo "".$ajax->submit('tick.png', array('update' => 'tabela', > 'loaded' => Effect.BlindDown(\'tabela\')', 'url' => '/menus/update/'. > $menu['Menu']['id']."/".$menu['Menu']['description']."/".$menu['Menu'] > ['link'])).""; > > Database fields and tables are kept in utf8_general_ci encoding by > default > > Thx for your help. > > > > -- [livesets] http://djspark.com.br/ [web] http://sydi.net [filmes] http://melhoresfilmes.com.br --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2. RC1 - Problem with Ajax and encoding
On Jun 15, 12:13 pm, Webrickco <[EMAIL PROTECTED]> wrote: > Hi, > > I have a test page made with cake 1.2 RC1 and everything is fine > despite the lack of documentation on the matter. book.cakephp.org > I have however a > little problem on my production site that doesn't happen on local. The > problem is with encoding. Everything looks fine until i fire an event > calling Ajax and returning a result refreshing a DIV. At that point, > the DIV gets a bad encoding. Why is that? No double posting please. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 losing auth/session under load
Holy crap, you people possibly saved my life and/or sanity with this. I signed up at nabble just so I could tell you that. I use cake actions to generate images for image galleries, and since those requests are within the completely arbitrary 2-second time frame for session renews, that's what's been killing our "logged in" sessions. I would be angrier with the cakephp creators, but setting security to "medium" is such a simple fix [EMAIL PROTECTED] wrote: > > > Baz, it changed a few months ago for the high setting if I recall > correctly. It bit a few people in the butt at the time. > > See: > https://trac.cakephp.org/changeset/5982 > https://trac.cakephp.org/browser/branches/1.1.x.x/cake/libs/session.php#L536 > ( 1.1 ) > https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/session.php#L562 > ( 1.2 ) > > > On Mar 13, 6:42 am, Baz <[EMAIL PROTECTED]> wrote: >> Correct me if I'm wrong, but doesn't the security level just extend the >> time >> the session is active? >> >> On Thu, Mar 13, 2008 at 4:00 AM, DerManoMann <[EMAIL PROTECTED]> wrote: >> >> > Hi all, >> >> > and thanks for your time and input. >> > I tried all three suggestions and the winner is >> > Adam and the Security.level! >> >> > I am sure the other suggestions have their place too, but for me >> > setting the security level to medium did the trick. >> >> > Again, thanks (and until my next question ;) >> >> > Cheers, mano >> >> > On Mar 13, 1:45 pm, Adam Royle <[EMAIL PROTECTED]> wrote: >> > > This is just a stab in the dark - if you have >> > > Configure::write('Security.level', 'high') then your session id is >> > > regenerated on each request. If you have simultaneous ajax >> connections >> > > (or are refreshing the browser continually without letting the page >> > > load fully) it seems plausible that your session id could be >> > > regenerated, but the browser wasn't informed, therefore producing an >> > > invalid session. >> >> > > Try setting Security.level = 'medium' to see if this fixes your >> issue. >> >> > > Otherwise do what Chris Hartjes suggests and set Session.checkAgent = >> > > false >> >> > > Cheers, >> > > Adam >> >> > > On Mar 12, 7:48 pm, DerManoMann <[EMAIL PROTECTED]> wrote: >> >> > > > hi there, >> >> > > > I have tried to implement an upload progress bar and found that the >> > > > ajax requests cause the current session to become invalid. >> >> > > > Further experimenting turned out that the same happens by just >> hitting >> > > > reload a few times fast enough. I am using authentication with code >> in >> > > > the app_controller a la: >> >> > > > function beforeFilter(){ >> > > > $this->Auth->loginAction = array('controller' => >> > 'users', 'action' >> > > > => 'login'); >> > > > $this->Auth->loginRedirect = '/; >> > > > $this->Auth->logoutRedirect = '/'; >> >> > > > // use controller's isAuthorized() >> > > > $this->Auth->authorize = 'controller'; >> >> > > > // need active user >> > > > $this->Auth->userScope = array('User.active' => 1); >> > > > } >> >> > > > Basically all is working fine, just a single bit of load (or >> parallel >> > > > requests perhaps?) break it and the user gets a login screen again. >> >> > > > I am using cake_1.2.0.6311-beta on XP, but the same happens on the >> > > > production env. which is some sort of *nix. >> >> > > > Any help much appreciated. >> >> > > > cheers, mano > > > > -- View this message in context: http://www.nabble.com/Cake-1.2-losing-auth-session-under-load-tp16003887p17680643.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Apache Install
Hi Mike Maybe you could give us bits of your core.php config file. Make sure also that your tmp directory has the right directory structure (cache/views cache/persistent and so on, there has been another thread about it just yesterday). + Clément On Thu, May 29, 2008 at 7:59 AM, Mike <[EMAIL PROTECTED]> wrote: > > Hi Clement: > I know I must be trying your patience, but bear withme a little. I > really am scouring the docs and the newsgroup for solutions, but > here's what I have so far. When I go to my app's url, the default Cake > page comes up: > > Your tmp directory is writeable > Your cache is NOT working. Please check the settings in APP/config/ > core.php > Your database configuration file is present. > Warning: mysql_connect() [function.mysql-connect]: Access denied for > user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/mikes/ > cake/libs/model/datasources/dbo/dbo_mysql.php on line 100 > Cake is NOT able to connect to the database. > > In addition, every other time I refresh the page, I get the following: > > Fatal error: Call to undefined function: session_regenerate_id() in / > var/www/html/mikes/cake/libs/session.php on line 613 > > The database issue I'll just have to refer to my web admin. Any ideas > on the cache issue? > > Thanks, > Mike > > On May 28, 3:36 pm, clemos <[EMAIL PROTECTED]> wrote: >> Hi Mike >> >> Your database config is probably wrong. >> The hostname is often "localhost", but depending on your web hosting >> it may be different. >> If so, nobody here can help you about that, except your web hosting admin... >> >> ++ >> Clément >> >> On Wed, May 28, 2008 at 10:42 PM, Mike <[EMAIL PROTECTED]> wrote: >> >> > Hi Clément: >> > Thanks for the response. Doing that does lead me to some additional >> > clues. I've gotten beyond the original problem. Now, I just have to >> > deal access denied errors when the app attempts to connect to the >> > mysql database. >> >> > I have the correct login name and password as well as database name in >> > the app/config/database.php file. I am setting the server to >> > 'localhost'. Is this correct? It keeps coming back with >> > [EMAIL PROTECTED] access denied messages. >> >> > I'll keep beating on this, but if anyone has a suggestion, it would be >> > much appreciated. >> >> > Thank you! >> >> > --Mike >> >> > On May 28, 1:24 pm, clemos <[EMAIL PROTECTED]> wrote: >> >> Hi Mike >> >> >> You should first try to get some more info about what is going wrong, >> >> for exemple by setting debug level to at least 1 in your >> >> app/config/core.php... You'll get at least the error messages, and it >> >> will probably help you to figure this out. >> >> >> ++ >> >> Clément >> >> >> On Wed, May 28, 2008 at 7:34 PM, Mike <[EMAIL PROTECTED]> wrote: >> >> >> > Hi Everyone: >> >> > Ok, I've really done my research in groups and on the Cake site, but I >> >> > need a little help. I'm installing my Cake application on another >> >> > server (not my local machine) and I'm having a bit of a problem >> >> > getting it to run correctly. I think I need to use an Apache alias, >> >> > but I'm not sure. >> >> >> > Here's the directory structure on the server that I'll be using: >> >> >> > var >> >> > www >> >> > html >> >> >MyFolder >> >> > AppName >> >> > app >> >> > cake >> >> > ...other folders from default installation >> >> >> > I've got all my application code in the app folder. When I go to >> >> >http://serveraddress/MyFolder/AppName, I do get the home page >> >> > displaying correctly, but when I click on any of the links, I get a >> >> > blank page with absolutely nothing displaying. >> >> >> > Can anyone point me to a very precise description of how to install my >> >> > application correctly given that I have to obey the directory >> >> > structure given above? >> >> >> > Thank you! >> >> > --Mike > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Apache Install
Hi Clement: I know I must be trying your patience, but bear withme a little. I really am scouring the docs and the newsgroup for solutions, but here's what I have so far. When I go to my app's url, the default Cake page comes up: Your tmp directory is writeable Your cache is NOT working. Please check the settings in APP/config/ core.php Your database configuration file is present. Warning: mysql_connect() [function.mysql-connect]: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/mikes/ cake/libs/model/datasources/dbo/dbo_mysql.php on line 100 Cake is NOT able to connect to the database. In addition, every other time I refresh the page, I get the following: Fatal error: Call to undefined function: session_regenerate_id() in / var/www/html/mikes/cake/libs/session.php on line 613 The database issue I'll just have to refer to my web admin. Any ideas on the cache issue? Thanks, Mike On May 28, 3:36 pm, clemos <[EMAIL PROTECTED]> wrote: > Hi Mike > > Your database config is probably wrong. > The hostname is often "localhost", but depending on your web hosting > it may be different. > If so, nobody here can help you about that, except your web hosting admin... > > ++ > Clément > > On Wed, May 28, 2008 at 10:42 PM, Mike <[EMAIL PROTECTED]> wrote: > > > Hi Clément: > > Thanks for the response. Doing that does lead me to some additional > > clues. I've gotten beyond the original problem. Now, I just have to > > deal access denied errors when the app attempts to connect to the > > mysql database. > > > I have the correct login name and password as well as database name in > > the app/config/database.php file. I am setting the server to > > 'localhost'. Is this correct? It keeps coming back with > > [EMAIL PROTECTED] access denied messages. > > > I'll keep beating on this, but if anyone has a suggestion, it would be > > much appreciated. > > > Thank you! > > > --Mike > > > On May 28, 1:24 pm, clemos <[EMAIL PROTECTED]> wrote: > >> Hi Mike > > >> You should first try to get some more info about what is going wrong, > >> for exemple by setting debug level to at least 1 in your > >> app/config/core.php... You'll get at least the error messages, and it > >> will probably help you to figure this out. > > >> ++ > >> Clément > > >> On Wed, May 28, 2008 at 7:34 PM, Mike <[EMAIL PROTECTED]> wrote: > > >> > Hi Everyone: > >> > Ok, I've really done my research in groups and on the Cake site, but I > >> > need a little help. I'm installing my Cake application on another > >> > server (not my local machine) and I'm having a bit of a problem > >> > getting it to run correctly. I think I need to use an Apache alias, > >> > but I'm not sure. > > >> > Here's the directory structure on the server that I'll be using: > > >> > var > >> > www > >> > html > >> >MyFolder > >> > AppName > >> > app > >> > cake > >> > ...other folders from default installation > > >> > I've got all my application code in the app folder. When I go to > >> >http://serveraddress/MyFolder/AppName, I do get the home page > >> > displaying correctly, but when I click on any of the links, I get a > >> > blank page with absolutely nothing displaying. > > >> > Can anyone point me to a very precise description of how to install my > >> > application correctly given that I have to obey the directory > >> > structure given above? > > >> > Thank you! > >> > --Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Apache Install
Hi Mike Your database config is probably wrong. The hostname is often "localhost", but depending on your web hosting it may be different. If so, nobody here can help you about that, except your web hosting admin... ++ Clément On Wed, May 28, 2008 at 10:42 PM, Mike <[EMAIL PROTECTED]> wrote: > > Hi Clément: > Thanks for the response. Doing that does lead me to some additional > clues. I've gotten beyond the original problem. Now, I just have to > deal access denied errors when the app attempts to connect to the > mysql database. > > I have the correct login name and password as well as database name in > the app/config/database.php file. I am setting the server to > 'localhost'. Is this correct? It keeps coming back with > [EMAIL PROTECTED] access denied messages. > > I'll keep beating on this, but if anyone has a suggestion, it would be > much appreciated. > > Thank you! > > --Mike > > On May 28, 1:24 pm, clemos <[EMAIL PROTECTED]> wrote: >> Hi Mike >> >> You should first try to get some more info about what is going wrong, >> for exemple by setting debug level to at least 1 in your >> app/config/core.php... You'll get at least the error messages, and it >> will probably help you to figure this out. >> >> ++ >> Clément >> >> On Wed, May 28, 2008 at 7:34 PM, Mike <[EMAIL PROTECTED]> wrote: >> >> > Hi Everyone: >> > Ok, I've really done my research in groups and on the Cake site, but I >> > need a little help. I'm installing my Cake application on another >> > server (not my local machine) and I'm having a bit of a problem >> > getting it to run correctly. I think I need to use an Apache alias, >> > but I'm not sure. >> >> > Here's the directory structure on the server that I'll be using: >> >> > var >> > www >> > html >> >MyFolder >> > AppName >> > app >> > cake >> > ...other folders from default installation >> >> > I've got all my application code in the app folder. When I go to >> >http://serveraddress/MyFolder/AppName, I do get the home page >> > displaying correctly, but when I click on any of the links, I get a >> > blank page with absolutely nothing displaying. >> >> > Can anyone point me to a very precise description of how to install my >> > application correctly given that I have to obey the directory >> > structure given above? >> >> > Thank you! >> > --Mike > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Apache Install
Hi Clément: Thanks for the response. Doing that does lead me to some additional clues. I've gotten beyond the original problem. Now, I just have to deal access denied errors when the app attempts to connect to the mysql database. I have the correct login name and password as well as database name in the app/config/database.php file. I am setting the server to 'localhost'. Is this correct? It keeps coming back with [EMAIL PROTECTED] access denied messages. I'll keep beating on this, but if anyone has a suggestion, it would be much appreciated. Thank you! --Mike On May 28, 1:24 pm, clemos <[EMAIL PROTECTED]> wrote: > Hi Mike > > You should first try to get some more info about what is going wrong, > for exemple by setting debug level to at least 1 in your > app/config/core.php... You'll get at least the error messages, and it > will probably help you to figure this out. > > ++ > Clément > > On Wed, May 28, 2008 at 7:34 PM, Mike <[EMAIL PROTECTED]> wrote: > > > Hi Everyone: > > Ok, I've really done my research in groups and on the Cake site, but I > > need a little help. I'm installing my Cake application on another > > server (not my local machine) and I'm having a bit of a problem > > getting it to run correctly. I think I need to use an Apache alias, > > but I'm not sure. > > > Here's the directory structure on the server that I'll be using: > > > var > > www > > html > >MyFolder > > AppName > > app > > cake > > ...other folders from default installation > > > I've got all my application code in the app folder. When I go to > >http://serveraddress/MyFolder/AppName, I do get the home page > > displaying correctly, but when I click on any of the links, I get a > > blank page with absolutely nothing displaying. > > > Can anyone point me to a very precise description of how to install my > > application correctly given that I have to obey the directory > > structure given above? > > > Thank you! > > --Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Apache Install
Hi Mike You should first try to get some more info about what is going wrong, for exemple by setting debug level to at least 1 in your app/config/core.php... You'll get at least the error messages, and it will probably help you to figure this out. ++ Clément On Wed, May 28, 2008 at 7:34 PM, Mike <[EMAIL PROTECTED]> wrote: > > Hi Everyone: > Ok, I've really done my research in groups and on the Cake site, but I > need a little help. I'm installing my Cake application on another > server (not my local machine) and I'm having a bit of a problem > getting it to run correctly. I think I need to use an Apache alias, > but I'm not sure. > > Here's the directory structure on the server that I'll be using: > > var > www > html >MyFolder > AppName > app > cake > ...other folders from default installation > > I've got all my application code in the app folder. When I go to > http://serveraddress/MyFolder/AppName, I do get the home page > displaying correctly, but when I click on any of the links, I get a > blank page with absolutely nothing displaying. > > Can anyone point me to a very precise description of how to install my > application correctly given that I have to obey the directory > structure given above? > > Thank you! > --Mike > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 problem with cache
indeed it did! was having similar problem to tiadev. moved cake core and app director/ies out of single parent directory structure (secure app files and support multiple apps on one cake core instance). only webapp directory under htdocs. couldn't figure out why I was getting the "cache not setup properly" message in my 'default' home page. sure enough, windows needed the drive letter. your posting did the trick. thanks much!!! On Mar 20, 1:14 am, markfm <[EMAIL PROTECTED]> wrote: > Adding the 'C:' in the root definition makes all the difference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Undefined Variable: paginator
Hi Thanks for that, I have checked out your blog article, and I have also played around with the standard code, and I have found that if I use 'Message.message_status_id' => '<= 2' It works... So not sure how that does the job actually, but seems to be working.. Is there a reason why the paginate doesn't accept an SQL Query string like the findAll etc does? Seems like that would be a logical addition to it.. Thanks Patrick On Apr 26, 10:05 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 9:30 PM, AussieFreelancer > > > > <[EMAIL PROTECTED]> wrote: > > > Right you are! :D Man I'm going crazy... passed the object to the view > > using $data = $this->paginate('Message'); and it started working :D > > Sorry for the hassle, thanks for the help :) > > > On a slightly side note, when it comes to adding conditions, I need > > the following condition: > > > 'Message.user_id = ' . $this->Auth->user('id') . ' AND > > Message.message_status_id IN (1, 2)' > > > How do I do this using the paginate variable? I have tried to pass it > > as the scope, and the userid works fine, but I cant seem to get the > > message_status_id part working. I need to use either IN() or an OR > > statement, but can't see how it is done... Is this possible? > > I have a posting on my blog about doing custom pagination, which is > exactly what you need. > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Undefined Variable: paginator
On Fri, Apr 25, 2008 at 9:30 PM, AussieFreelancer <[EMAIL PROTECTED]> wrote: > > Right you are! :D Man I'm going crazy... passed the object to the view > using $data = $this->paginate('Message'); and it started working :D > Sorry for the hassle, thanks for the help :) > > On a slightly side note, when it comes to adding conditions, I need > the following condition: > > > 'Message.user_id = ' . $this->Auth->user('id') . ' AND > Message.message_status_id IN (1, 2)' > > How do I do this using the paginate variable? I have tried to pass it > as the scope, and the userid works fine, but I cant seem to get the > message_status_id part working. I need to use either IN() or an OR > statement, but can't see how it is done... Is this possible? > I have a posting on my blog about doing custom pagination, which is exactly what you need. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Undefined Variable: paginator
Right you are! :D Man I'm going crazy... passed the object to the view using $data = $this->paginate('Message'); and it started working :D Sorry for the hassle, thanks for the help :) On a slightly side note, when it comes to adding conditions, I need the following condition: 'Message.user_id = ' . $this->Auth->user('id') . ' AND Message.message_status_id IN (1, 2)' How do I do this using the paginate variable? I have tried to pass it as the scope, and the userid works fine, but I cant seem to get the message_status_id part working. I need to use either IN() or an OR statement, but can't see how it is done... Is this possible? On Apr 26, 8:46 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 8:26 PM, AussieFreelancer > > <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > I have just had a look through the groups, and tried a couple of > > things suggested, but for some reason I can't get the paginator > > working properly still. > > What about it isn't working? You getting errors? Pagination links > not showing up? Perhaps I don't understand pagination very well, but > I don't see where you are passing the paginator object to the view. > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Undefined Variable: paginator
$this->set('data', $this->Message->findAll('Message.user_id = ' . $this->Auth->user('id') . ' AND Message.message_status_id IN (1, 2)', null, 'Message.message_status_id, Message.importance, Message.created DESC')); should be something like $this->paginate['Message']['conditions']['Message.user_id'] = $this->Auth->user('id'); $this->paginate['Message']['conditions']['Message.message_status_id'] = 'IN (1, 2)'; $this->set('data', $this->paginate('Message')); On 26/04/2008, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > > On Fri, Apr 25, 2008 at 8:26 PM, AussieFreelancer > <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > I have just had a look through the groups, and tried a couple of > > things suggested, but for some reason I can't get the paginator > > working properly still. > > > > > What about it isn't working? You getting errors? Pagination links > not showing up? Perhaps I don't understand pagination very well, but > I don't see where you are passing the paginator object to the view. > > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard: http://www.littlehart.net/atthekeyboard > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Undefined Variable: paginator
On Fri, Apr 25, 2008 at 8:26 PM, AussieFreelancer <[EMAIL PROTECTED]> wrote: > > Hi All, > > I have just had a look through the groups, and tried a couple of > things suggested, but for some reason I can't get the paginator > working properly still. > What about it isn't working? You getting errors? Pagination links not showing up? Perhaps I don't understand pagination very well, but I don't see where you are passing the paginator object to the view. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 final release date
I'll add that, with the changes that have occurred *within* the 1.2 branch itself, it seems odd that we're not looking at a 2.0 release. IMO, 1.2 should have been released long ago with many of the current changes moved into a 2.0 target branch. And, yes, I realise that development is never as tidy as all that. I'm sure it couldn't be helped without releasing a dodgy 1.2. That is, I'm confident the devs had very good reasons to go ahead with all the changes within 1.2. I'm not complaining, just commenting on the very significant changes since the first 1.2beta became available. In any case, I don't really care what no. release it is--it's all tasty stuff :-p On Fri, Apr 25, 2008 at 1:06 PM, seb <[EMAIL PROTECTED]> wrote: > > > And looking at the bug list in trac, I wouldn't say there are any > > major changes in the pipeline either. Going from 1.1 to 1.2 isn't > > totally trivial, so the sooner you get started on such a transition > > the better. If you are waiting for a "final" release before making > > that change, I would re-think the strategy, and instead just go with > > the current build. > > Well, I've been working with 1.2 beta since a while now. Since the very > beginning in fact. Changes from 1.1 to 1.2 were so important that after > 2 days learning 1.1, I switched to 1.2 even there was no "official" doc > yet. New Cookbook is nice and a good way to start learning :D > > I've got a website working with 1.2 beta nicely and I'm currently > working on a total recode of my good old (and rather badly coded) PHP4 > webstore > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 final release date
> And looking at the bug list in trac, I wouldn't say there are any > major changes in the pipeline either. Going from 1.1 to 1.2 isn't > totally trivial, so the sooner you get started on such a transition > the better. If you are waiting for a "final" release before making > that change, I would re-think the strategy, and instead just go with > the current build. Well, I've been working with 1.2 beta since a while now. Since the very beginning in fact. Changes from 1.1 to 1.2 were so important that after 2 days learning 1.1, I switched to 1.2 even there was no "official" doc yet. New Cookbook is nice and a good way to start learning :D I've got a website working with 1.2 beta nicely and I'm currently working on a total recode of my good old (and rather badly coded) PHP4 webstore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 final release date
For the last few months I have been using the nightly build. It is pretty stable. If you follow the change log, it has been a while since any application breaking syntax changes have been introduced. And looking at the bug list in trac, I wouldn't say there are any major changes in the pipeline either. Going from 1.1 to 1.2 isn't totally trivial, so the sooner you get started on such a transition the better. If you are waiting for a "final" release before making that change, I would re-think the strategy, and instead just go with the current build. -Aran On Apr 25, 7:10 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > There is a hint in this article (at the very end) that it might be out > very soon.. > > http://bakery.cakephp.org/articles/view/after-3-years-looking-back-an... > > Let us pray.. :-) > > On Apr 25, 4:02 pm, seb <[EMAIL PROTECTED]> wrote: > > > Well, this might have been asked a few times before but does anybody > > have any idea when 1.2 will be available as stable release ? > > > Yes I know "When it's done" > > > :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 final release date
There is a hint in this article (at the very end) that it might be out very soon.. http://bakery.cakephp.org/articles/view/after-3-years-looking-back-and-moving-ahead Let us pray.. :-) On Apr 25, 4:02 pm, seb <[EMAIL PROTECTED]> wrote: > Well, this might have been asked a few times before but does anybody > have any idea when 1.2 will be available as stable release ? > > Yes I know "When it's done" > > :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 r6709 - scaffolding and german umlauts
2008/4/23 MonkeyGirl <[EMAIL PROTECTED]>: > Technically, it doesn't matter which character set you use as far as > storing data into a database goes. Whatever you put in, you get the > same stuff out. I would recommend using "CHARSET=utf8 > COLLATE=utf8_unicode_ci" however, because this makes the database > server realise that letters with accents and letters without accents > are the same, which makes it able to search and alphabetise things > properly. At first I had a problem, because my editor does not store UTF-8 as the default char set für .ctp or .php files. After saving it in UTF-8 everything worked. Siegfried --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake 1.2 r6709 - scaffolding and german umlauts
> when I create an entry in the database with the scaffolding interface, > it's possible to save german umlauts. The scaffolding webpages display > the entered characters correct, except in input fields (if try to edit > such an entry) or drop down boxes. The content is not corrupt, it's > empty. It makes not difference whether I use 'encoding' => 'UTF-8' or > not. The tables are InnoDB with charset=UTF-8. > > This worked with 1.2.0.6311, but I swtiched to a newer revision since > then HABTM relations seem to be fixed in the newer revisions. Is this > bug or a error in my setup? It'd help to see the relevant code, but for what it's worth, I'm working on a CakePHP project at the moment that's using various European languages and it's working fine with the latest nightly release of Cake. All I had to do was make sure that /app/views/layouts/ default.ctp and the other layouts included in the HTML headers and it's working fine with umlauts. > I've also noticed that the entries in the database are latin1. Should > cake convert the form data to utf8? Technically, it doesn't matter which character set you use as far as storing data into a database goes. Whatever you put in, you get the same stuff out. I would recommend using "CHARSET=utf8 COLLATE=utf8_unicode_ci" however, because this makes the database server realise that letters with accents and letters without accents are the same, which makes it able to search and alphabetise things properly. Hope that helps a bit, Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Session Write
Hi Stefan, I think it's not a good idea to write Session-data in the viewsanyway: In the SessionHelper write() overrides CakeSession:write() and disables it, so copy the SessionHelper from /cake/libs/view/helpers/ session.php to app/view/helpers. Now edit the file and delete the write() function (you could also edit the SessionHelper in /cake/libs directly but I personally never touch the files in /cake/libs ;-) ) Another solution is just to skip the SessionHelper and write to the $_SESSION array directly. I wouldn't recommend either. (sorry for my english, I'm not used to it) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake 1.2 Console - Fatal Errors - Possible Bug?
Make sure your svn:externals property is uses the repository at https://svn.cakephp.org/repo/branches/1.2.x.x/cake. I had the same problem as you where I was stuck at revision 6311, although svn reported that I was at the latest revision, because I was using the trunk. >From the root directory of your cake install, do `svn propedit svn:externals cake` then paste: cake https://svn.cakephp.org/repo/branches/1.2.x.x/cake Now Im really at the latest revision. On Jan 4, 10:16 am, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > A duplicate ticket...Read my comment in the ticket > > On Jan 4, 2008 10:15 AM, Cake Fan <[EMAIL PROTECTED]> wrote: > > > > > > > I submitted a ticket on this problem: > > >https://trac.cakephp.org/ticket/3828 > > > - Cake Fan > > > On Jan 4, 11:16 am, Cake Fan <[EMAIL PROTECTED]> wrote: > > > I'm a little confused about this, perhaps I'm missing something... but > > > when I update via svn, this fix doesn't happen in my core library. > > > For instance, I just looked at line 30 in schema.php (bug fix 6319) > > > and the string class is not included after I updated. > > > > However, I manually added the 'string' class on my box in schema.php > > > and it still didn't solve the problem in the console. > > > > - Cake Fan > > > > On Jan 3, 5:00 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > > > > > It looks related > > tohttps://trac.cakephp.org/ticket/3793andchangesethttps://trac.cakephp > > > > > -Original Message- > > > > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of Cake Fan > > > > Sent: 3. januar 2008 22:57 > > > > To: Cake PHP > > > > Subject: Re: Cake 1.2 Console - Fatal Errors - Possible Bug? > > > > > Christian, > > > > > I am at Revision 6319, but the console still says 6311. I am only > > > > updating the "cake" folder, so I'm not changing the app or vendors > > > > folders at all. Am I missing something here because the problem still > > > > persists after I updated as you suggested. > > > > > Thanks for the help! > > > > > - Cake Fan > > > > > On Jan 3, 3:32 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote: > > > > > Update to SVN head from 1.2 branch, was fixed there :) > > > > > > -Original Message- > > > > > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] > > On Behalf Of Cake Fan > > > > > Sent: 3. januar 2008 22:20 > > > > > To: Cake PHP > > > > > Subject: Cake 1.2 Console - Fatal Errors - Possible Bug? > > > > > > I have my cake 1.2 shell script working properly in most regards; it > > > > > will help me immensely in converting a large flat table into > > > > > relational data for Cake consumption. > > > > > > However, in the shell, whenever I try to call any of the Model query > > > > > commands, I get a failure. > > > > > > So far, it has happened with findCount(), find(), findall(), save(), > > > > > and saveall(); The problem seems to be inconsistent and no matter > > > > > what I try or eliminate, it seems to persist. > > > > > > My shell script ultra-simplified to this: > > > -- > > > > > function main() { > > > > > >$i = 0; > > > > >while ($i < 1000) { > > > > >$formatted_data_array = array ( > > > > > 'Business' => array ('name' => 'test') > > > > > ); > > > > >$this->Business->save($formatted_data_array, false); > > > > >$i++; > > > > >} > > > > > } > > > -- > > > > > > It will save one time successfully, and then errors out. I get the > > > > > following error message from the console: > > > > > > ++ > > > > > C:\Apache\htdocs\project\app>cake raw_data > > > > > > Welcome to CakePHP v1.2.0.6311 beta Console > > > > > --- > > &
Re: Cake 1.2 Auth Component Step-by-Step
There seems that when sessions expire Auth has problems redirecting to where you were. So a lot of people have added their own "redirect to"- logic in the login action. I haven't looked into it closely yet but I have read other posts about it and noticed it sometimes myself. I am not sure these observations are accurate but this is what I "think" happens: Expired session and you click a link = you are redirected to the page you were at not the page you clicked to get to. Expired session and you refresh the browser or type an url = you are redirected to the default loginRedirect not the page you wanted. On Feb 22, 6:08 pm, EchoChargen <[EMAIL PROTECTED]> wrote: > I've seen several posts and articles with this type of thing in > Users->login(): > > if($this->Auth->login()) { > $this->redirect($this->Auth->loginRedirect); > }else{ > $this->data = null; > $this->set('error', $this->Auth->loginError); > } > Doesn't the Auth component do the above already? If so, what is the > advantage to doing this again in your controller login() method? > Thanks, > Jeremy > > On Feb 22, 10:18 am, BlenderStyle <[EMAIL PROTECTED]> wrote: > > > Okay, I'll be the first to mention. The title sucks, and this is in no > > way a step-by-step because I really don't explain much. Sorry about > > that. --~--~-~--~~~---~--~~ 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 1.2 Auth Component Step-by-Step
I've seen several posts and articles with this type of thing in Users- >login(): if($this->Auth->login()) { $this->redirect($this->Auth->loginRedirect); }else{ $this->data = null; $this->set('error', $this->Auth->loginError); } Doesn't the Auth component do the above already? If so, what is the advantage to doing this again in your controller login() method? Thanks, Jeremy On Feb 22, 10:18 am, BlenderStyle <[EMAIL PROTECTED]> wrote: > Okay, I'll be the first to mention. The title sucks, and this is in no > way a step-by-step because I really don't explain much. Sorry about > that. --~--~-~--~~~---~--~~ 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 1.2 Auth Component Step-by-Step
Okay, I'll be the first to mention. The title sucks, and this is in no way a step-by-step because I really don't explain much. Sorry about that. --~--~-~--~~~---~--~~ 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 1.2 Auth Component Step-by-Step
Thanks for sharing. I have been tinkering with something that at some level is kind of similar. I'll definitely take a closer look at your setup later. I have set it so that one user is the "root" and can access everything. Then for users I dynamically generate an array of allowed controllers based on the users permissions. (e.g. Users HABTM Controllers) This array is also used to decide which menu items to display for the current user. (I should explain that all users in my application are editors/admins in some sense so I really don't need advanced premissions) I might try to merge your idea with my own later on. If I get aroubnd to is and it works I'll post back the code. On Feb 22, 10:00 am, BlenderStyle <[EMAIL PROTECTED]> wrote: > I had to piece together information from several different places to > finally come up with a usage of the Auth Component I was somewhat > happy with. The primary thing that bothered me is that when using > $this->Auth->authorize = 'controller';, all actions are denied by > default. In my mind, I thought I would just allow all actions and then > deny the ones that need security, but it doesn't work that way. Also, > I wanted to focus most of the work in AppController, so that if other > controllers didn't want to use security, they didn't have to do > anything. Let me share my bare solution in hopes that it might help > someone else. > > AppController: > var $components = array('Auth'); > > var $__guestActions = array(); // override this in controller > var $__userActions = array(); // override this in controller > var $__adminActions = array(); // override this in controller > var $__neverAllow = array('login'); // this saved me some headaches - > don't put logout in here > var $currentUser = null; > > function beforeFilter() { > $this->Auth->authorize = 'controller'; // with this set, Auth looks > for isAuthorized() > $this->currentUser = $this->Auth->user(); // for convenience > > // this is where I screw with what Cake intended > $allActions = $this->getAllActions(); // get every single method from > the controller > $allowedActions = array_diff($allActions, $this->__neverAllow); // > remove never allowed actions > $allowedActions = array_diff($allowedActions, $this->__userActions); > // remove user actions > > $allowedActions = array_diff($allowedActions, $this->__adminActions); > // remove admin actions > > $this->Auth->allow($allowedActions); // only allow the leftovers} > > function beforeRender(){ > $this->set('currentUser', $this->currentUser); // this makes my > $currentUser available to all my views} > > function getAllActions() { > return get_class_methods($this->name.'Controller'); // this gets all > the methods from the controller} > > // I basically set this up for a three-level security approach (guest, > user, admin) > function isAuthorized() { > $requestedAction = $this->params['action']; > $isAdmin = $this->currentUser['User']['admin']; > if($isAdmin){ > return true; > }elseif(in_array($requestedAction, $this->__userActions)) { > return true; > }else{ > return false; > } > > } > > UsersController: > > var $__guestActions = array('testGuest'); // if I commented this out, > it would still work > var $__userActions = array('testUser'); // > var $__adminActions = array('testAdmin'); > function testGuest() { > // everyone can access this} > > function testUser() { > // only users and admins in here} > > function admin() { > // only admins in here} > > function login() { > if(!empty($this->data)) { > if($this->Auth->login()) { > $this->redirect($this->Auth->loginRedirect); > }else{ > $this->data = null; > $this->set('error', $this->Auth->loginError); > } > }} > > function logout() { > $this->Auth->logout(); > $this->redirect($this->Auth->logoutRedirect);} > > function beforeFilter(){ > parent::beforeFilter(); // if you plan to use beforeFilter() in your > controller, add this first > > } > > That's about it. It's really stripped down and basic, but it's my > first attempt, and it works. You can opt to use any, all, or none of > the three "access" variables ($__guestActions, $__userActions, and > $__adminActions). > > All the blogs I read basically had empty login and logout controllers. > I never saw got that to work. Am I missing something? Also, > redirection doesn't work well in this. If you arrive at an empty > > Oh, by the way, you need to create a user manually in your database. > To get a password that works, use $this->Auth- > > >password($password_to_hash);. That will give you the hashed password. --~--~-~--~~~---~--~~ You received this message because you ar
Re: Cake 1.2 - Space in field name
On Wed, Feb 20, 2008 at 4:57 AM, phantz <[EMAIL PROTECTED]> wrote: > > Hey, > > I understand that you "shouldn't" use spaces in field names when using > cake. But the problem is that I have been given a huge amount of data > that is filled with field names containing spaces. I can't remove > these spaces and I can't alter the structure of the db at all. > > Is there a way to use cake with field names that have spaces? > > Basically any query with spaces end up with the ` in the wrong place. > > For example this is from an association generated query: > > " .. LEFT JOIN `new vehicles` AS `NewVehicles` ON > (`VehiclesTrims`.`Vehicle` ID = `NewVehicles`.`Vehicle` ID) .." > > Should be: > > " .. LEFT JOIN `new vehicles` AS `NewVehicles` ON > (`VehiclesTrims`.`Vehicle ID` = `NewVehicles`.`Vehicle ID`) .." > > Basically it puts the second ` in between the words instead of at the > end of the field name. `Vehicle` ID as apposed to `Vehicle ID` > Database column names should never have spaces. Is this an MSAcces file? Is there some existing application that will be sharing the data with Cake? If the data will be fetched by Cake from a different store (say, copied from Access to MySQL) you could translate the column names on the fly whenever you dump data from one to the other. But, if both applications will be fetching from the same DB this will be a problem (and, if it is MSAccess that your web app uses you have other problems to begin with). --~--~-~--~~~---~--~~ 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 1.2 Baking Question
Yes, I am baking the views from the app_name folder at the command prompt. I have also setup Eclipse PDT and can bake directly from there but with the same results. Could it be something incorrect in my setup? On Feb 11, 12:40 pm, Baz <[EMAIL PROTECTED]> wrote: > hmmph, > > Never experienced what you're seeing. Are you sure you're baking the views > from the app_name folder? > > On Feb 11, 2008 12:36 PM, rob.rightmyer <[EMAIL PROTECTED]> wrote: > > > > > > Is the problem with the actual FOLDER structure or is it a URL problem > > (or > > > both)? > > > The problem seems to be with the folder structure created after baking > > which > > in turn effects the URL when I try to access my app. > > > > Ok, here we go, start fresh! > > > >1. cd htdocs\cake > > >2. cake bake [newapp] > > >3. cd newapp > > >4. cake bake (bake stuff from here) > > > Followed these steps and experienced the same results unfortunately. > > > The resulting directory structure after baking looks like this: > > htdocs\cake\app_name\views\app_name > > > And inside this directory are add.ctp, edit.ctp, index.ctp and > > view.ctp. > > > To accesshttp://localhost/cake/newappwould require the files above > > to > > be in the root of my view folder, correct? Or am I missing something? > > If I > > move the files up a level to the "view" directory, this should give me > > the > > result I'm looking for. Instead I receive the standard cake "home" > > page. > > > The functionality I'm hoping to achieve is to be able to install cake > > on any > > directory on my server, which is one of the main features mentioned on > > the > > CakePHP page. If there is a better way to accomplish this I'd like to > > know. > > > On Feb 11, 11:25 am, Baz <[EMAIL PROTECTED]> wrote: > > > Ok, we need to make a distinction here... > > > > Is the problem with the actual FOLDER structure or is it a URL problem > > (or > > > both)? > > > > Ok, here we go, start fresh! > > > >1. cd htdocs\cake > > >2. cake bake [newapp] > > >3. cd newapp > > >4. cake bake (bake stuff from here) > > > > You should be able to access fromhttp://localhost/cake/newapp > > > > If not, check your DocumentRoot in httd.conf. > > > > or better yet, just copy the default app folder to newapp and see if it > > does > > > the same doubling thing. > > > > On Feb 11, 2008 10:26 AM, rright <[EMAIL PROTECTED]> wrote: > > > > > > Questions: > > > > > - Linux/Windows > > > > > - PHP and Cake console in %PATH% or calling each time? > > > > > I'm running xampp on Windows and Cake is installed in the xampp htdocs > > > > folder: > > > > "localhost://cake" > > > > > PHP and Cake console have been added to the Path environment variables > > > > in Windows. > > > > > I want to clarify that baking works fine but my question is in the > > > > resulting paths to my app. > > > > > After baking, the resulting path to my app is: > > > >http://localhost/cake/project_name/project_name/ > > > > > I want to know how to make my app accessible from this URL insteak: > > > >http://localhost/cake/project_name/ > > > > > Baking appears to double my project name twice in the URL string. > > > > Perhaps this is by > > > > design, I don't know. I'm a cake newbie and am just trying to > > > > understand if what I'm > > > > seeing is normal or if there is an adjustment I need to make to > > > > achieve what I want. --~--~-~--~~~---~--~~ 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 1.2 Baking Question
hmmph, Never experienced what you're seeing. Are you sure you're baking the views from the app_name folder? On Feb 11, 2008 12:36 PM, rob.rightmyer <[EMAIL PROTECTED]> wrote: > > > Is the problem with the actual FOLDER structure or is it a URL problem > (or > > both)? > > The problem seems to be with the folder structure created after baking > which > in turn effects the URL when I try to access my app. > > > Ok, here we go, start fresh! > > > >1. cd htdocs\cake > >2. cake bake [newapp] > >3. cd newapp > >4. cake bake (bake stuff from here) > > Followed these steps and experienced the same results unfortunately. > > The resulting directory structure after baking looks like this: > htdocs\cake\app_name\views\app_name > > And inside this directory are add.ctp, edit.ctp, index.ctp and > view.ctp. > > To access http://localhost/cake/newapp would require the files above > to > be in the root of my view folder, correct? Or am I missing something? > If I > move the files up a level to the "view" directory, this should give me > the > result I'm looking for. Instead I receive the standard cake "home" > page. > > The functionality I'm hoping to achieve is to be able to install cake > on any > directory on my server, which is one of the main features mentioned on > the > CakePHP page. If there is a better way to accomplish this I'd like to > know. > > On Feb 11, 11:25 am, Baz <[EMAIL PROTECTED]> wrote: > > Ok, we need to make a distinction here... > > > > Is the problem with the actual FOLDER structure or is it a URL problem > (or > > both)? > > > > Ok, here we go, start fresh! > > > >1. cd htdocs\cake > >2. cake bake [newapp] > >3. cd newapp > >4. cake bake (bake stuff from here) > > > > You should be able to access fromhttp://localhost/cake/newapp > > > > If not, check your DocumentRoot in httd.conf. > > > > or better yet, just copy the default app folder to newapp and see if it > does > > the same doubling thing. > > > > On Feb 11, 2008 10:26 AM, rright <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Questions: > > > > - Linux/Windows > > > > - PHP and Cake console in %PATH% or calling each time? > > > > > I'm running xampp on Windows and Cake is installed in the xampp htdocs > > > folder: > > > "localhost://cake" > > > > > PHP and Cake console have been added to the Path environment variables > > > in Windows. > > > > > I want to clarify that baking works fine but my question is in the > > > resulting paths to my app. > > > > > After baking, the resulting path to my app is: > > >http://localhost/cake/project_name/project_name/ > > > > > I want to know how to make my app accessible from this URL insteak: > > >http://localhost/cake/project_name/ > > > > > Baking appears to double my project name twice in the URL string. > > > Perhaps this is by > > > design, I don't know. I'm a cake newbie and am just trying to > > > understand if what I'm > > > seeing is normal or if there is an adjustment I need to make to > > > achieve what I want. > > > --~--~-~--~~~---~--~~ 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 1.2 Baking Question
> Is the problem with the actual FOLDER structure or is it a URL problem (or > both)? The problem seems to be with the folder structure created after baking which in turn effects the URL when I try to access my app. > Ok, here we go, start fresh! > >1. cd htdocs\cake >2. cake bake [newapp] >3. cd newapp >4. cake bake (bake stuff from here) Followed these steps and experienced the same results unfortunately. The resulting directory structure after baking looks like this: htdocs\cake\app_name\views\app_name And inside this directory are add.ctp, edit.ctp, index.ctp and view.ctp. To access http://localhost/cake/newapp would require the files above to be in the root of my view folder, correct? Or am I missing something? If I move the files up a level to the "view" directory, this should give me the result I'm looking for. Instead I receive the standard cake "home" page. The functionality I'm hoping to achieve is to be able to install cake on any directory on my server, which is one of the main features mentioned on the CakePHP page. If there is a better way to accomplish this I'd like to know. On Feb 11, 11:25 am, Baz <[EMAIL PROTECTED]> wrote: > Ok, we need to make a distinction here... > > Is the problem with the actual FOLDER structure or is it a URL problem (or > both)? > > Ok, here we go, start fresh! > >1. cd htdocs\cake >2. cake bake [newapp] >3. cd newapp >4. cake bake (bake stuff from here) > > You should be able to access fromhttp://localhost/cake/newapp > > If not, check your DocumentRoot in httd.conf. > > or better yet, just copy the default app folder to newapp and see if it does > the same doubling thing. > > On Feb 11, 2008 10:26 AM, rright <[EMAIL PROTECTED]> wrote: > > > > > > Questions: > > > - Linux/Windows > > > - PHP and Cake console in %PATH% or calling each time? > > > I'm running xampp on Windows and Cake is installed in the xampp htdocs > > folder: > > "localhost://cake" > > > PHP and Cake console have been added to the Path environment variables > > in Windows. > > > I want to clarify that baking works fine but my question is in the > > resulting paths to my app. > > > After baking, the resulting path to my app is: > >http://localhost/cake/project_name/project_name/ > > > I want to know how to make my app accessible from this URL insteak: > >http://localhost/cake/project_name/ > > > Baking appears to double my project name twice in the URL string. > > Perhaps this is by > > design, I don't know. I'm a cake newbie and am just trying to > > understand if what I'm > > seeing is normal or if there is an adjustment I need to make to > > achieve what I want. --~--~-~--~~~---~--~~ 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 1.2 Baking Question
Ok, we need to make a distinction here... Is the problem with the actual FOLDER structure or is it a URL problem (or both)? Ok, here we go, start fresh! 1. cd htdocs\cake 2. cake bake [newapp] 3. cd newapp 4. cake bake (bake stuff from here) You should be able to access from http://localhost/cake/newapp If not, check your DocumentRoot in httd.conf. or better yet, just copy the default app folder to newapp and see if it does the same doubling thing. On Feb 11, 2008 10:26 AM, rright <[EMAIL PROTECTED]> wrote: > > > Questions: > > - Linux/Windows > > - PHP and Cake console in %PATH% or calling each time? > > I'm running xampp on Windows and Cake is installed in the xampp htdocs > folder: > "localhost://cake" > > PHP and Cake console have been added to the Path environment variables > in Windows. > > I want to clarify that baking works fine but my question is in the > resulting paths to my app. > > After baking, the resulting path to my app is: > http://localhost/cake/project_name/project_name/ > > I want to know how to make my app accessible from this URL insteak: > http://localhost/cake/project_name/ > > Baking appears to double my project name twice in the URL string. > Perhaps this is by > design, I don't know. I'm a cake newbie and am just trying to > understand if what I'm > seeing is normal or if there is an adjustment I need to make to > achieve what I want. > > > --~--~-~--~~~---~--~~ 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 1.2 Baking Question
> Questions: > - Linux/Windows > - PHP and Cake console in %PATH% or calling each time? I'm running xampp on Windows and Cake is installed in the xampp htdocs folder: "localhost://cake" PHP and Cake console have been added to the Path environment variables in Windows. I want to clarify that baking works fine but my question is in the resulting paths to my app. After baking, the resulting path to my app is: http://localhost/cake/project_name/project_name/ I want to know how to make my app accessible from this URL insteak: http://localhost/cake/project_name/ Baking appears to double my project name twice in the URL string. Perhaps this is by design, I don't know. I'm a cake newbie and am just trying to understand if what I'm seeing is normal or if there is an adjustment I need to make to achieve what I want. --~--~-~--~~~---~--~~ 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 1.2 Baking Question
Questions: - Linux/Windows - PHP and Cake console in %PATH% or calling each time? What exactly are you trying to accomplish? If you're baking a project you need to call the script from the localhost/cake folder. - cake bake [project_name] after this, you call all other bake commands from: localhost\cake\[project_name] I've experience weird results (not what you stated though) when my cake console path was from a different folder from where I was trying to bake toeg. I'm under my Cake Beta folder, but in the path Cake SVN folderstuff gets funky ;) -- Baz L Web Development 2.0 http://WebDevelopment2.com/ On Feb 11, 2008 6:37 AM, rright <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. > > > don't create a project, when already in an app folder. > > Actually I did not create a project using the bake script. I've so far > started my project by > using two different methods: > > 1) renamed a copy of the "app" folder within my cake directory to my > app name > 2) renamed a copy of the entire cake folder within my webroot to my > app name > > From reading a couple of different tutorials, this was my > understanding of how to best start > a new project but if there is a better practice please let me know. > > In both methods mentioned above I then baked the model, controller and > view. Both > yielded the same results, where a folder named the same as my app is > created within > "views". > > > > --~--~-~--~~~---~--~~ 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 1.2 Baking Question
Thanks for the reply. > don't create a project, when already in an app folder. Actually I did not create a project using the bake script. I've so far started my project by using two different methods: 1) renamed a copy of the "app" folder within my cake directory to my app name 2) renamed a copy of the entire cake folder within my webroot to my app name >From reading a couple of different tutorials, this was my understanding of how to best start a new project but if there is a better practice please let me know. In both methods mentioned above I then baked the model, controller and view. Both yielded the same results, where a folder named the same as my app is created within "views". --~--~-~--~~~---~--~~ 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 1.2 Baking Question
On Feb 11, 5:35 am, rright <[EMAIL PROTECTED]> wrote: > Why does baking create a subdirectory under views with the same name > as my app? It creates the app under wherever you are when you run it. > > My current url is:http://localhost/cake/app_name/app_name > > Instead I would like to have this:http://localhost/cake/app_name don't create a project, when already in an app folder. hth, AD --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---