Re: CakeSocket - Allowed memory size of bytes exhausted error

2013-12-04 Thread Sebastien Beausoleil
Yes

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


CakeSocket - Allowed memory size of bytes exhausted error

2013-12-04 Thread Sebastien Beausoleil
Hi,

I need help, I tried to send email with CakeEmail and I received this error:

Error: Allowed memory size of 134217728 bytes exhausted ...
File: /cakephp/2.2/lib/Cake/Network/CakeSocket.php
Line: 199

What could cause this error?

Thank 
 

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


Data validation: Client or Server?

2013-08-18 Thread Sebastien Beausoleil
I think you should see client side validation like a way to give the user a 
better (and faster) experience, the server side validation is to ensure the 
reliability of sent data.

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: bind model for saveAssociated

2013-07-24 Thread Sebastien Beausoleil
Yes. It works.  Simply bindModel before the save action.  Keep in mind that 
bindModel is set just for one next action (find, save). 

On Wednesday, March 20, 2013 2:25:40 PM UTC-4, Henry Turk wrote:
>
> Did you ever find a solution to this?
>
> On Tuesday, November 20, 2012 12:35:55 PM UTC-8, Sebastien Beausoleil 
> wrote:
>>
>> Hi,
>>
>> Is it possible to bind on the fly a model to another to saveAssociated 
>> those to at the same time?
>>
>

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.




bind model for saveAssociated

2012-11-20 Thread Sebastien Beausoleil
Hi,

Is it possible to bind on the fly a model to another to saveAssociated those to 
at the same time?

-- 
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 post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: FPDF or any other PDF export option for a cakePHP environment

2012-06-21 Thread Sebastien Beausoleil
Since I work with cakephp, I use tcpdf to generate pdf.

Here is the a bakery article: 
http://bakery.cakephp.org/articles/kalileo/2010/06/08/creating-pdf-files-with-cakephp-and-tcpdf
Here is the tcpdf website: http://www.tcpdf.org/

If you have any question, do not hesitate.

On Wednesday, June 20, 2012 2:00:13 AM UTC-4, DerekGardiner wrote:
>
> I am trying to export a PDF from within a cakephp system. From my searches 
> it seems that FPDF if the best option to export a PDF from an PHP 
> environment. The only cakePHP tutorial i can find about it is a 2007 
> tutorial: 
> http://bakery.cakephp.org/articles/sdevore_myopenid_com/2007/01/27/pdf-helper-using-fpdf
>  which 
> is buggy and I can't seem to find anything newer. 
>
> I would be very interested in what the community suggests is the best PDF 
> strategy for a cakePHP environment and if there are any supporting 
> (and relevantly new) tutorial for it.
>

-- 
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: Cakephp and AJAX

2011-12-04 Thread Sebastien Beausoleil
Hi Milos,
Instead of calling an ajax layout, I think you simply should add this
line at the beginning of your action in the controller.

$this->autoRender = false;

This action  will only be executed on the server side.

And to send parameter to the action, why don't you send them in array
by  'post' method in Json encoding and receive the response from the
action the same way.
To do it, use this command:

$this-> Js->request

On 4 déc, 12:05,Miloš Vučinić  wrote:
> Thank you very much !
>
> All the best,
> Milos
>
> On Dec 3, 9:25 am, Tilen Majerle  wrote:
>
>
>
>
>
>
>
> > for response: just create a view like (but not 'default' layout, make a new
> > layout 'ajax') in others functions
>
> > how to detect ajax: $this->request->is('ajax')
>
> > CONTENT FOR ajax.ctp layout:
> > 
>
> > and in controller to enable this layout:
> > $this->layout = 'ajax';
>
> > why this ? this will return just your 'archieve' view
>
> > --
> > Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> > 2011/12/3 Miloš Vučinić 
>
> > > Hello,
>
> > > I haven't used AJAX so far because I never needed it. I read the
> > > manuals regarding it, now I am wondering how to do it in cake. My task
> > > is following:
> > > I have a list of users. Next to each user I have a button which says
> > > archive. On click I have to archive the user. Now, I don want to
> > > reload the whole page so I want to use AJAX.
> > > The way I see it, I would create a regular AJAX call to my url which
> > > is function just like any other in cake, like /users/archive/57 where
> > > number 57 is id in the database (it will be generated for each
> > > button).
> > > On server side I would perform the function, but how do I return
> > > response. Do I just echo it ? And how does the cake knows it was an
> > > AJAX call and that it needs to send a response to a client. And is it
> > > ok, for the response to be just a simple ok , or notok string , and
> > > then if ok, I just change the archive sting into yes from no in the
> > > user list.
>
> > > Can you please give me like quick steps of how would you do it with a
> > > quick syntax example.
>
> > > Like : 1) Create a client call to the server
> > >         2) Execute function on server the normal way you wold
> > >         3) Send response to client (please explain how)
>
> > > Thank you in advance,
>
> > > All the best
> > > Milos Vucinic
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > 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
> > > athttp://groups.google.com/group/cake-php

-- 
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


cakephp 2.0 Cookbook blog tutorial - problem with autentication component

2011-10-24 Thread Sebastien Beausoleil
Hi,
I work on the cookbook blog tutorial. A piece of code give me a bug.  When I 
try to access to www.example.com/posts/add , I am forward to the home page. 
But, when I comment the line (orange highlighted), I can access to the 
/posts/add page.
I think it could be related with the 
authcomponent
.

Code (source: 
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html,
 
section: "Authorization (who’s allowed to access what)")

public $components = array(
'Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'posts', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'pages', 'action' => 
'display', 'home'),'authorize' => array('Controller') // Added this line
));
public function isAuthorized($user) {
if (isset($user['role']) && $user['role'] === 'admin') {
return true; //Admin can access every action
}
return false; // The rest don't}


*
*

-- 
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