Thursday, January 31, 2013
Re: Save ID for Associated Table
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Save ID for Associated Table
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Change From AS in find request
FROM `fournitures`.`telephones_backup` AS `TelephoneBackup`
I would like the AS to be Telephone and no TelephoneBackup
$d['telephones'] = $this->TelephoneBackup->find('all',array(
'conditions'=>array('TelephoneBackup.id'=>$id
),
'order'=> array('TelephoneBackup.modified ASC'),
));
Thanks
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
CakePHP ACL and paginate
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Using CacheHelper to cache JSON views
On Friday, July 27, 2012 10:58:10 AM UTC-4, Falagar wrote:
--I cannot get this to work in 2.2. This is what I have tried:
First I just followed the book to create JSON views (http://book.cakephp.org/2.0/
en/views/json-and-xml-views. Works great. I get JSON data back.html). Then I followed the CacheHelper instructions (http://book.cakephp.org/2.0/
en/core-libraries/helpers/ I un-commented Cache.check in core.php, added the CacheHelper in my Controller and defined $cacheAction. This works great for HTML Views. But, for JSON views nothing gets cached unfortunately.cache.html). I found this post: http://lars-schenk.com/cached-
json-or-xml-view-with-cakephp/ that ran into a similar issue (albeit in an earlier version of Cake that didn't have JsonView yet).523 So I tried to use his method, and apply it to 2.2. I took Router::parseExtensions( 'json' ) out, took the RequestHandler out, created a json.ctp layout file.
<!--nocache--><?php configure::write('debug',0); // surpress all debug output on json views header('Content-type: text/x-json'); ?><!--nocache--><?php echo $this->fetch('content'); ?>
a feed.ctp view file
<?php echo json_encode( $data ); ?>
and changed my controller action to just set the layout and data
$this->layout = 'json'; $this->view = 'feed'; $this->set( 'data', $data );
This works somewhat. I get the JSON file the first time, but when I request that action again, the response contains
<!--nocache:001--><!--nocache:
002--> before the actual JSON data, so it won't work for my client app. I can see that chunk of text in the actual cache file as well, which I think is the problem.
So I am not quite sure how to proceed.
Am I just missing something painfully obvious?
Any help would be greatly appreciated.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
On Thursday, January 31, 2013 4:55:48 AM UTC-5, euromark wrote:
since PHP5.4 E_STRICT is included in E_ALL (you would need to explicitly remove it).--That is why your PHP5.2 env does not report any strict errors (there you need to explicitly activate it).
Am Donnerstag, 31. Januar 2013 09:35:26 UTC+1 schrieb roundrightfarm:So, I've discovered that setting short tags to "on" in ini.php has fixed another problem I was having, but I'm still getting the Strict Standards errors. The local server is running php 5.4, but my cake-app runs live on a server with 5.2 and without generating any Strict Standard errors. Is it possible that the use of short tags in the code is causing these errors with 5.4?
On Wednesday, January 30, 2013 10:41:36 AM UTC-5, roundrightfarm wrote:I have a completed app written in 1.3 that I'm trying to make changes
to
On Jan 29, 7:16 pm, benfarhat <benfarhat.el...@gmail.com> wrote:
> Try using the latest version of Cake
> <https://github.com/cakephp/cakephp/zipball/2.3.0 > .
>
> --
> View this message in context:http://cakephp.1045679.n5.nabble.com/cakephp- ..on-XAMPP-for-windows-tp5.
> Sent from the CakePHP mailing list archive at Nabble.com.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: get actions
On Tuesday, January 29, 2013 11:51:04 AM UTC-2, Igor Padovan da Silva wrote:
--Hi,In this code, http://pastebin.com/9BUKfsGh , i need to get all actions from crontrollers. In my app i have the same controller in app and plugin, but when is executed $methods = get_class_methods ($controller . 'Controller' ); it get the methods from controller tha is in app, it ignores de controller from plugin. I tried to use App::shutdown(), but it dosen't work.Does anybody know what can I do?Thanks,Igor Padovan da Silva
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: CakeTestCase, output and graceful failing
On Tuesday, January 29, 2013 4:28:32 PM UTC-2, Vanja Dizdarević wrote:
Pretty newb at Testing, but I wish to create a list-of-feature-test with some useful output.--I have created a test case for a parser which loads about a 100 input + expected pairs from an external definition file.
So far so good, test runs OK with this method:public function testFormats(){foreach ($this->tests as $case){$this->assertTextEquals($this->Parser->parse($case['input']), $case['expected'],$case['message']);}}
But currently, I can only see if all test pass.
I have some features that are still being developed and I'm trying to push towards a test-driven-development pattern here.This means I have many test I have made that are meant to fail, but I would like them to do so gracefully.Is there a way a TestCase can output a list of all tests with "OK" or "FAILED" results, so other developers and end-users can see which of the features are safe to use?Thanks!
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Using variable from controller in model
On Tuesday, January 29, 2013 12:41:42 PM UTC-2, MetZ wrote:
Hi all.--
I am struggling passing a variable to my before save function in my User model.
Controller:
$this->User->read(null, $data['user_id']);
$this->User->set(array(
'noslug' => 1,
'TEST' => 'sdfsd'
));
$this->User->save();
Model:
if(empty($this->data[$this->alias]['noslug']) {
// noslug empty, do somthing cool
} else {
// noslug not empty, do something else
}
$this->data[$this->alias]['noslug'] = always empty/false
How can I read the "noslug" = 1 in my model?
Thanks for any help on this!
-Tom
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Help / Source code for Simple Authentication tutorial
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Best IDE for CakePHP 2.1
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
Am Donnerstag, 31. Januar 2013 09:35:26 UTC+1 schrieb roundrightfarm:
So, I've discovered that setting short tags to "on" in ini.php has fixed another problem I was having, but I'm still getting the Strict Standards errors. The local server is running php 5.4, but my cake-app runs live on a server with 5.2 and without generating any Strict Standard errors. Is it possible that the use of short tags in the code is causing these errors with 5.4?
On Wednesday, January 30, 2013 10:41:36 AM UTC-5, roundrightfarm wrote:I have a completed app written in 1.3 that I'm trying to make changes
to
On Jan 29, 7:16 pm, benfarhat <benfarhat.el...@gmail.com> wrote:
> Try using the latest version of Cake
> <https://github.com/cakephp/cakephp/zipball/2.3.0 > .
>
> --
> View this message in context:http://cakephp.1045679.n5.nabble.com/cakephp- ..on-XAMPP-for-windows-tp5.
> Sent from the CakePHP mailing list archive at Nabble.com.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
On Wednesday, January 30, 2013 10:41:36 AM UTC-5, roundrightfarm wrote:
I have a completed app written in 1.3 that I'm trying to make changes--
to
On Jan 29, 7:16 pm, benfarhat <benfarhat.el...@gmail.com> wrote:
> Try using the latest version of Cake
> <https://github.com/cakephp/cakephp/zipball/2.3.0 > .
>
> --
> View this message in context:http://cakephp.1045679.n5.nabble.com/cakephp- ..on-XAMPP-for-windows-tp5.
> Sent from the CakePHP mailing list archive at Nabble.com.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Wednesday, January 30, 2013
Re: How to redirect two pages back?
El lunes, 16 de abril de 2012 10:19:23 UTC+2, euromark escribió:
@cricket--almost perfect - I would not pass the referer this way, though. creates overheadand then I don't think the else case inside the post() is necessary.after a post the same post data will populate the inputs anyway. therefore the Model.referer input should still have the same value.no need to resend this variable to the view.I also dont like to unnecessarily set defaults in the view.echo $this->Form->input('Model.
referer'); public function add() {
if ($this->request->is('post')) {
// validate ...
if ($this->Model->save()) {
$referer = !empty($this->request->data['Model']['referer']) ? $this->request->data['Model']['referer']
: '/'; // or some other fallback route of your choice
$this->redirect($referer);
}
} else {
$this->request->data['Model'][' referer'] = $this->referer();
}
}you agree?
Am Montag, 16. April 2012 01:08:29 UTC+2 schrieb cricket:On first display of the form pass the referer to the view to add it to the form.echo $this->Form->input('Model.
referer', array('value' => $referer)); public function add() {
if ($this->request->is('post')) {
$referer = isset($this->request->data['Model']['referer'])
? $this->request->data['Model']['referer']
: '/'; // or some other fallback route of your choice
// validate ...
if ($this->Model->save()) {
$this->redirect($referer);
}
else {
// flash msg, log, etc.
$this->set(compact('referer'));
}
}
else {
$this->set('referer', $this->referer());
}
}
You have to use the else block to set the view var because if the save
failed it would overwrite it to the empty form. Likewise, you need to
create the $referer method var before attempting to save so that it's
available either way (to redirect or reset the view var).On Sun, Apr 15, 2012 at 4:15 PM, Daniel <danw...@gmail.com> wrote:
> I am using the following code to go back a page, but the problem is
> that the action is an "add" one so it just goes back to an empty "add"
> form:
>
> if ($this->request->is('post')) {
> // blah blah ...
> if ($this->Inemail->save($this->request->data)) {
> // blah blah ...
> $this->redirect($this->referer());
>
> I think what I need to do is go back two pages. Is this possible?
>
> Thanks.
>
> --
> 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+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
to
On Jan 29, 7:16 pm, benfarhat <benfarhat.el...@gmail.com> wrote:
> Try using the latest version of Cake
> <https://github.com/cakephp/cakephp/zipball/2.3.0> .
>
> --
> View this message in context:http://cakephp.1045679.n5.nabble.com/cakephp-on-XAMPP-for-windows-tp5...
> Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Cache errors on Heroku with update to 2.3 but works fine on local?
On Wednesday, January 30, 2013 7:51:12 AM UTC-5, Luciano Bargmann wrote:
First things first: I am almost sure you have a write permission problem. Have you tried to fix that?--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Cache errors on Heroku with update to 2.3 but works fine on local?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Tuesday, January 29, 2013
Re: Issue with removing records (unset) from data array in afterFind
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: autoComplete with jquery in cake 1.3
On Tuesday, January 29, 2013 5:31:02 AM UTC-5, Chris wrote:
--hi guys,.. can you help me please,...I'm in cake 1.3 and using jquery librariesI got all setup, including jquery.autocomplete.min.js from Ajax Javascript helper http://www.cakephp.4uk.pl/ajax/autoComplete ,...I can see the "fistnames" in autocomplete form field, but I can't select them,...how can I fix this...?this is my form:<?php echo $this->Form->create('User'); ?><div style="float: left; width: 200px; margin: 10px 0 40px 15px; "><?php echo $ajax->autoComplete('User.firstname', '/users/autoComplete', array('label' => false)); ?> </div><span style="float: left; width: 200px; margin: 5px 0 40px 15px; "><?php echo $this->Form->end(__('Search', true)); ?></span>this is my function:function autoComplete() {$this->set('members', $this->User->find('all', array('conditions' => array('User.firstname LIKE' => $this->params['url']['q'].'%'),'fields' => array('firstname'))));$this->layout = 'ajax';}and this is auto_complete.ctp file:<ul><?php foreach($members as $member): ?><li><?php echo $member['User']['firstname']; ?></li><div class="clr"></div><?php endforeach; ?></ul>thanks in advancechris
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: autoComplete with jquery in cake 1.3
On Tuesday, January 29, 2013 2:56:10 PM UTC-8, cricket wrote:
If you're seeing the results then it isn't a Cake problem. I'd guess
CSS, probably with the floats. Have you tried installing Firebug?
On Tue, Jan 29, 2013 at 5:31 AM, Chris <chri...@yahoo.com> wrote:
> hi guys,.. can you help me please,...
> I'm in cake 1.3 and using jquery libraries
>
> I got all setup, including jquery.autocomplete.min.js from Ajax Javascript
> helper http://www.cakephp.4uk.pl/ajax/autoComplete ,...
> I can see the "fistnames" in autocomplete form field, but I can't select
> them,...
>
> how can I fix this...?
>
> this is my form:
>
> <?php echo $this->Form->create('User'); ?>
>
> <div style="float: left; width: 200px; margin: 10px 0 40px 15px; ">
> <?php echo $ajax->autoComplete('User.firstname', '/users/autoComplete',
> array('label' => false)); ?>
> </div>
>
> <span style="float: left; width: 200px; margin: 5px 0 40px 15px; ">
> <?php echo $this->Form->end(__('Search', true)); ?>
> </span>
>
>
> this is my function:
>
> function autoComplete() {
>
> $this->set('members', $this->User->find('all', array(
> 'conditions' => array(
> 'User.firstname LIKE' => $this->params['url']['q'].'%'
> ),
> 'fields' => array('firstname')
> )));
> $this->layout = 'ajax';
> }
>
> and this is auto_complete.ctp file:
>
> <ul>
> <?php foreach($members as $member): ?>
> <li><?php echo $member['User']['firstname']; ?></li>
>
> <div class="clr"></div>
> <?php endforeach; ?>
> </ul>
>
> thanks in advance
> chris
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+u...@googlegroups.com .
> To post to this group, send email to cake...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en .
> For more options, visit https://groups.google.com/groups/opt_out .
>
>
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Cache errors on Heroku with update to 2.3 but works fine on local?
Warning (512): /app/www/app/tmp/cache/ is not writable [CORE/Cake/Cache/Engine/FileEngine.php, line 336]
Warning (2): file_put_contents(/app/www/app/tmp/logs/error.log) [http://php.net/function.file-put-contents]: failed to open stream: No such file or directory [CORE/Cake/Log/Engine/FileLog.php, line 88]
This works fine on my local server. Any tips?
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: MongoDB queries being escaped?
On Tuesday, January 29, 2013 8:56:00 PM UTC-5, Shahruk Khan wrote:
I am trying to do : $courses = $this->Course->find("all", array("conditions" => array("Course.professor" => "/Odinga/")));This is the equivalent of Mysql %Odinga%. Unfortunately, I get the following query:db.courses.find( {"professor":"\/\/Odinga, Sobukwe\/\/"} );CakePHP is escaping the backslashes which are used in MongoDB for the LIKe query.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
MongoDB queries being escaped?
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
that is incompatible with XAMPP 1.8.1 and I need to upgrade cake (or
downgrade XAMPP)?
On Jan 29, 4:26 pm, roundrightfarm <roundrightf...@gmail.com> wrote:
> Greetings Everyone,
> Just installed XAMPP 1.8.1 for Windows which I plan to use to test a
> cakephp web-app. The basic install worked fine, but once I copied all
> the cake files to htdocs, I started getting errors I don't
> understand. Even with debug set to 0, I get this message:
>
> Strict Standards: Redefining already defined constructor for class
> Object in C:\xampp\htdocs\cake\libs\object.php on line 54
>
> Strict Standards: Non-static method Configure::getInstance() should
> not be called statically in C:\xampp\htdocs\cake\bootstrap.php on line
> 38
>
> Under this, my layout background eventually loads but the server can't
> find the content files. With debug set to 2, I get a much longer list
> of Strict Standards errors.
>
> Does anybody understand these errors. It my understanding that I
> shouldn't alter files in the cake folder, so I'm assuming the problem
> must lie elsewhere in my setup and not in the files mentioned by the
> errors.
>
> Thanks for your help!
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Validating multiple fields problem
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: cakephp on XAMPP for windows
<https://github.com/cakephp/cakephp/zipball/2.3.0> .
--
View this message in context: http://cakephp.1045679.n5.nabble.com/cakephp-on-XAMPP-for-windows-tp5713475p5713479.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Using variable from controller in model
After calling set() debug the User->data to see whether id is set.
On Tue, Jan 29, 2013 at 9:41 AM, MetZ <metz80@gmail.com> wrote:
> Hi all.
>
> I am struggling passing a variable to my before save function in my User
> model.
>
> Controller:
> $this->User->read(null, $data['user_id']);
> $this->User->set(array(
> 'noslug' => 1,
> 'TEST' => 'sdfsd'
> ));
> $this->User->save();
>
> Model:
>
> if(empty($this->data[$this->alias]['noslug']) {
> // noslug empty, do somthing cool
> } else {
> // noslug not empty, do something else
> }
>
>
> $this->data[$this->alias]['noslug'] = always empty/false
>
> How can I read the "noslug" = 1 in my model?
>
> Thanks for any help on this!
> -Tom
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: autoComplete with jquery in cake 1.3
CSS, probably with the floats. Have you tried installing Firebug?
On Tue, Jan 29, 2013 at 5:31 AM, Chris <chris69m@yahoo.com> wrote:
> hi guys,.. can you help me please,...
> I'm in cake 1.3 and using jquery libraries
>
> I got all setup, including jquery.autocomplete.min.js from Ajax Javascript
> helper http://www.cakephp.4uk.pl/ajax/autoComplete ,...
> I can see the "fistnames" in autocomplete form field, but I can't select
> them,...
>
> how can I fix this...?
>
> this is my form:
>
> <?php echo $this->Form->create('User'); ?>
>
> <div style="float: left; width: 200px; margin: 10px 0 40px 15px; ">
> <?php echo $ajax->autoComplete('User.firstname', '/users/autoComplete',
> array('label' => false)); ?>
> </div>
>
> <span style="float: left; width: 200px; margin: 5px 0 40px 15px; ">
> <?php echo $this->Form->end(__('Search', true)); ?>
> </span>
>
>
> this is my function:
>
> function autoComplete() {
>
> $this->set('members', $this->User->find('all', array(
> 'conditions' => array(
> 'User.firstname LIKE' => $this->params['url']['q'].'%'
> ),
> 'fields' => array('firstname')
> )));
> $this->layout = 'ajax';
> }
>
> and this is auto_complete.ctp file:
>
> <ul>
> <?php foreach($members as $member): ?>
> <li><?php echo $member['User']['firstname']; ?></li>
>
> <div class="clr"></div>
> <?php endforeach; ?>
> </ul>
>
> thanks in advance
> chris
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Re: Validating multiple fields problem
models. CharactersEvent, especially.
You don't say how you're saving the data, btw. And have you tried
putting a log call just before the foreach?
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
cakephp on XAMPP for windows
Just installed XAMPP 1.8.1 for Windows which I plan to use to test a
cakephp web-app. The basic install worked fine, but once I copied all
the cake files to htdocs, I started getting errors I don't
understand. Even with debug set to 0, I get this message:
Strict Standards: Redefining already defined constructor for class
Object in C:\xampp\htdocs\cake\libs\object.php on line 54
Strict Standards: Non-static method Configure::getInstance() should
not be called statically in C:\xampp\htdocs\cake\bootstrap.php on line
38
Under this, my layout background eventually loads but the server can't
find the content files. With debug set to 2, I get a much longer list
of Strict Standards errors.
Does anybody understand these errors. It my understanding that I
shouldn't alter files in the cake folder, so I'm assuming the problem
must lie elsewhere in my setup and not in the files mentioned by the
errors.
Thanks for your help!
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Auth Login Redirect is not redirecting or encrypting user info
for user authentication. Using topics here, stackoverflow and the
documentation for reference, i've almost got it, just hung up on the login.
If I try to access anything, the app does display the login, however even
with correct credentials, it looks like it loads but doesn't move past the
login view. No error is displayed. And for some reason, any user(Editor in
my case) doesn't have an encrypted password in the DB. I've been at this for
a day and a half and don't know what to do at this point. The table fields
are the standard user fields just in a table named editors. and the login
view is standard. The code for the login/logout I used from the
documenation. Any suggestions? I would use Users, but another Cake 1.3 app
is using that table and i'm not sure how difficult it would be to use the
same table.(I tried but the user passwords weren't encrypted there
either..so it might be how i'm using auth?
References:
1.
http://stackoverflow.com/questions/9929129/cakephp-authentication-component-using-a-different-table-name-and-column-name
2.
http://stackoverflow.com/questions/6016044/cakephp-autentication-with-auth-table-other-than-user-problem
3. http://stackoverflow.com/questions/7258455/cakephp-login-redirect-problem
4.
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers
5.
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
AppController:
class AppController extends Controller {
public $components = array(
'Session',
'Security',
'Auth'=> array(
'loginAction' => array(
'controller' => 'editors',
'action' => 'login',
),
'authorize' => array('Controller'),
'authError' => 'You are not authorized to access that page.',
'authenticate' => array(
'Form'
)
)
);
//public $helpers = array('Form','Html','Session');
public function isAuthorized($user) {
return true;
}
public function beforeFilter() {
//$this->Auth->authenticate = ClassRegistry::init('Editor');
$this->Auth->loginAction =
array('controller'=>'editors','action'=>'login');
$this->Auth->loginRedirect =
array('controller'=>'drugs','action'=>'index');
$this->Auth->loginError = 'Incorrect Username/Password
Combination.';
$this->Auth->logoutRedirect =
array('controller'=>'editors','action'=>'login');
//$this->set('logged_in', $this->Auth->loggedIn());
//$this->set('current_user', $this->Auth->user());
}
}
Editors Controller:
public function beforeFilter() {
parent::beforeFilter();
//$this->Auth->allow('add');
//$this->Auth->autoRedirect = false;
}
public function beforeSave($options = array()) {
if (isset($this->data['Editor']['password'])) {
$this->data['Editor']['password'] =
AuthComponent::password($this->data['Editor']['password']);
}
return true;
}
public function login() {
if ($this->request->is('post')) {
if ($this->Auth->login()) {
return $this->redirect($this->Auth->redirectUrl());
//return $this->redirect($this->Auth->redirect());
} else {
$this->Session->setFlash(__('Username or password is
incorrect'), 'default', array(), 'auth');
}
}
}
public function logout() {
$this->redirect($this->Auth->logout());
}
Model:
<?php
App::uses('AppModel', 'Model');
/**
* Editor Model
*
*/
class Editor extends AppModel {
public $displayField = 'name';
}
--
View this message in context: http://cakephp.1045679.n5.nabble.com/Auth-Login-Redirect-is-not-redirecting-or-encrypting-user-info-tp5713474.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
CakeTestCase, output and graceful failing
So far so good, test runs OK with this method:
But currently, I can only see if all test pass.
I have some features that are still being developed and I'm trying to push towards a test-driven-development pattern here.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
a few questions about Cake Bake and latest version 2.30
- admin_add.ctp
- admin_edit.ctp
- admin_index.ctp
- admin_view.ctp
- add.ctp
- edit.ctp
- index.ctp
- view.ctp
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Using variable from controller in model
I am struggling passing a variable to my before save function in my User model.
Controller:
$this->User->read(null, $data['user_id']);
$this->User->set(array(
'noslug' => 1,
'TEST' => 'sdfsd'
));
$this->User->save();
Model:
if(empty($this->data[$this->alias]['noslug']) {
// noslug empty, do somthing cool
} else {
// noslug not empty, do something else
}
$this->data[$this->alias]['noslug'] = always empty/false
How can I read the "noslug" = 1 in my model?
Thanks for any help on this!
-Tom
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
get actions
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.