Re: Problem masking errors in cakePhP

2011-11-22 Thread Zaky Katalan-Ezra
Create app_error file; controller->log($this,'err'); $this->controller->beforeFilter(); parent::_outputMessage($template); } } ?> Taken from here: http://www.bradezone.com/2009/05/21/cakephp-beforefilter-and-the-error-error/ On Tue, Nov 22, 2011 at 8:23 AM, rach wrote: > Hi

Re: cakephp 1.3 with javascript

2011-11-22 Thread Zaky Katalan-Ezra
Where in the code you get the returned data and try to put it in the page? On Tue, Nov 22, 2011 at 1:31 PM, jason for wrote: > Hi folks, > I'm almost done with my 1st cakephp site and it's looking good, but > could look better with a bit of javascript dynamically changing my > view. > Here's my

Re: How to track the referer when error 404 happens?

2011-11-22 Thread heohni
Hi Mark, I am only dealing on a small project, so I don't get as much emails luckely :-) I will try your code, thanks a lot!! Bye On 22 Nov., 17:55, euromark wrote: > I did that for while - after upgrading the application > jesus christ. I can tell you. > I would have gotten hundreds of mail

Re: Confused: Trying to get values from a table outside of the controller.

2011-11-22 Thread Jeremy Burns | Class Outfit
Don't just rely on recursion. Always use the containable behaviour. Jeremy Burns Class Outfit http://www.classoutfit.com On 23 Nov 2011, at 02:05, Ma'moon wrote: > If there is any kind of association between `Post` and `Period` models then > you can easily play with model's `recursive` flag to

Re: Mask Fatal and Strict-standard errors

2011-11-22 Thread Bhoomit
Hi Walther, Thanks for the reply. You have a point that we don't mask these errors we fix them but I cant show fatal error in production, so I want to mask Fatal error and show default page or some default error and log the actual error to fix it. Strict standard errors we are getting is below:

afterFind via a hasmany relationship with paginate

2011-11-22 Thread #2Will
Hello, When doing this $projects = $this->paginate(); and project hasmany round, should afterFind in Round be called? I put a bit of debug code in there and it isn't being run. If it isn't supposed to because it is related data no worries, just wondering if it supposed to do it and I have done

Observer Pattern in CakePHP 2.0

2011-11-22 Thread amiable_indian
Hi All: I would like to implement observer pattern [1] in my project and would like to hear your suggestions regarding cake's way of doing it the right way. Most web searches led me to an article [2] written in 2009. I am sure a lot of things have changed since then :) In my project (*which tr

Re: Problem masking errors in cakePhP

2011-11-22 Thread Walther
You don't need to post the same message twice under different users. On Nov 22, 8:23 am, rach wrote: > Hi, > > We are using PHP 5.3.5, and cakePHP 1.3.7. We are not able to mask the > error messages we are getting - 'Strict Standards", "Fatal errors". > The problem we are running into is - > > We

Re: Mask Fatal and Strict-standard errors

2011-11-22 Thread Walther
Hi, Firstly, you do not mask fatal or strict errors. You fix them. Fatal erros mean that there is something wrong in your code and php cannot continue parsing your code. If you "mask" a fatal error, your user will simply get a white screen. Strict errors mean that you are doing something that will

Re: Confused: Trying to get values from a table outside of the controller.

2011-11-22 Thread Ma'moon
If there is any kind of association between `Post` and `Period` models then you can easily play with model's `recursive` flag to obtain what you want, otherwise you may manually load `Period` model in your `PostsController` and fetch the information you seek, code language: $this->loadModel('Period

Re: Student wanting your views on CakePHP

2011-11-22 Thread gremlin
I would first recommend that you use a list less than 4 years old. On Nov 22, 12:16 pm, david mitchell wrote: > Hi, Coders. > > I am currently studying Website Development at the University of > Bolton and am doing my final dissertation on the features, usability > and comparison of 3 of the to

How to get information in a mysql table from a different controller.

2011-11-22 Thread GG
I have two tables, a posts table, and a periods table. The posts table has a user_id, title, body, period. The periods table has a user_id, title, period. I can easily get the information from the posts table in my PostsController.php: $this->set('period1', $this->Post->find('all', array(

Student wanting your views on CakePHP

2011-11-22 Thread david mitchell
Hi, Coders. I am currently studying Website Development at the University of Bolton and am doing my final dissertation on the features, usability and comparison of 3 of the top 5 PHP Frameworks taken from (http:// www.phpframeworks.com/top-10-php-frameworks/) (CodeIgniter, CakePHP, PHPDevShell) an

Call to a member function create() on a non-object error cakePHP

2011-11-22 Thread Taby
Hola, que tal? necesito de ayuda de alguien que pueda ayudarme con este error mi vista es : create('Ingreso',array('action'=>'index')); ? >// <-- error

site not quite working on local xampp, but running on unix server

2011-11-22 Thread KennyB
Although I've done a lot of php / mysql development, I am very new to cake. I am doing some work on my local machine for a client and am looking at a site that another company built using cake. The site includes a simple search form which accepts a zip and returns a list of matching items. When

cakephp 1.3 with javascript

2011-11-22 Thread jason for
Hi folks, I'm almost done with my 1st cakephp site and it's looking good, but could look better with a bit of javascript dynamically changing my view. Here's my code; $(document).ready(function() { $("#event_id").change(function() { $.post( "

Displaying temp view using beforeSave/beforeRender ?

2011-11-22 Thread rs
Hi, I've started using Cake as of late but have run into a problem which I hope one of the master bakers can easily resolve :) I'm looking for a way to show a "temporary view" while things work in the background, my web server is located "far" from some users and there is a slight lag on loading

Mask Fatal and Strict-standard errors

2011-11-22 Thread Bhoomit
Hi, We are using PHP 5.3.5, and cakePHP 1.3.7. We are not able to mask the error messages we are getting - 'Strict Standards", "Fatal errors". The problem we are running into is - We tried this solution. Configure::write('debug', 0); and Configure::write('log', false); in core.php but it

Problem masking errors in cakePhP

2011-11-22 Thread rach
Hi, We are using PHP 5.3.5, and cakePHP 1.3.7. We are not able to mask the error messages we are getting - 'Strict Standards", "Fatal errors". The problem we are running into is - We tried this solution. Configure::write('debug', 0); and Configure::write('log', false); in core.php but it did

Confused: Trying to get values from a table outside of the controller.

2011-11-22 Thread GG
I have a PostsController. I have a posts table. I can easily get the information I need from that table. I am trying to get information from my periods table, from my posts controller. I am confused on how to best do that. This is how I get the information from my posts table. ( I am getting all i

"query($method, $params, $this)" references what?

2011-11-22 Thread Dennis Dix
In the cake "model class" (model.php) and the "call_ function" the statement: $return = $db->query($method, $params, $this); references what function/method? It doesn't appear to call the function "query()" inside model.php. Is the function it calls a cakephp function or just a php function? I

"query($method, $params, $this)" references what?

2011-11-22 Thread Dennis Dix
In the cake "model class" (model.php) and the "call_ function" the statement: $return = $db->query($method, $params, $this); references what function/method? It doesn't appear to call the function "query()" inside model.php. Is the function it calls a cakephp function or just a php function? I

Re: routing and seo => changing language

2011-11-22 Thread daf182
Hi, You can store the user's language in session to use it during the browsing, or you could use the Accept-Language header sent by the browser to guess the user language, use this function: CakeRequest::acceptLanguage(); Or you can even ask it that user has a language for instance CakeRequest::ac

Re: Remember Me with Cookie and Auth Component

2011-11-22 Thread Miles J
Here you are: https://github.com/milesj/cake-auto_login On Nov 22, 10:23 am, Jordy van Kuijk wrote: > Hi all, > > I'm trying to add a "remember me" checkbox into my login form. > When users check the box, they log in and a cookie ('Auth.User') is > stored, with 'email' and 'password' fields (this

Re: Write unit test for a controller that uses AuthComponent in CakePHP 2.0.3

2011-11-22 Thread Shukuboy
Hi, I've also had to deal with testing controllers that use Auth lately.Auth has improved heaps since 1.3 but it still seems to be coupled with various bits and pieces of the core, and hence you might get different behaviours between the website and testing. I recommend mocking out Auth and g

Remember Me with Cookie and Auth Component

2011-11-22 Thread Jordy van Kuijk
Hi all, I'm trying to add a "remember me" checkbox into my login form. When users check the box, they log in and a cookie ('Auth.User') is stored, with 'email' and 'password' fields (this works). Now in my AppController, I want to see if users can log back in using their cookie. I have the follow

Re: How to track the referer when error 404 happens?

2011-11-22 Thread euromark
I did that for while - after upgrading the application jesus christ. I can tell you. I would have gotten hundreds of mails per second With session token (and one email per session every HOUR) it went down to "a lot" ;) Anyway - the thing is, that a browser opens invalid urls all the time especial

Re: Auth issue with Multi-app enviroment

2011-11-22 Thread Ernesto
It looks like i solved my issue modifying Configure::write('Session', array('cookie' => APP_DIR)); <3 CakePHP -- 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

Re: CakePHP

2011-11-22 Thread euromark
"But I think we cannot do that in cakephp." you can use models anywhere in the complete cakephp framework - even in the subsubsubsub element of a view if you want to. simply be using ClassRegistry::init(ModelName) But that doesnt mean that you should...^^ On 22 Nov., 13:56, Kane The Pirate wro

Re: CakePHP

2011-11-22 Thread Kane The Pirate
It can be done in MVC application, but it is recommended in case of having issue to render the view with the controllers' data. Also the main logic of the code is in the controller, so taking just the model data you are limiting the capacity of the data processing Em 22 de novembro de 2011 10:46,

Auth issue with Multi-app enviroment

2011-11-22 Thread Ernesto
Hi all. i have a multi-app enviroment (more apps sharing the same core). two of those apps are using Cake's AuthComponent. i followed the cake's conventions so both apps have - an UsersController - a UserModel and, in theyr own db (they use different DBs) - a users table, with username and pass

Re: CakePHP

2011-11-22 Thread rchavik
On Tuesday, November 22, 2011 6:00:24 PM UTC+7, Mike Karthauser wrote: > > > why would you want to load model in the view? > I have come across this requirement/need. And this is something that I've been wondering myself, i.e: are we allowed to instantiate a model in views by the rules of MVC?

Re: CakePHP

2011-11-22 Thread Sathia S
> > > why would you want to load model in the view? > you'd load model data in the controller and set it in the view. silly old > codeigniter.. > > ya silly. that will not be perfect MVC if we load model in views. I mentioned negative point about that. -- -

Re: CakePHP

2011-11-22 Thread Mike Karthauser
On 22 Nov 2011, at 09:10, Sathia S wrote: > What is difference between CakePHP and Codeigniter ?? > > # In Codeigniter, can load model even in views. > But I think we cannot do that in cakephp. why would you want to load model in the view? you'd load model data in the controller and set it in

Re: loginError still notify even though i successfully logged in

2011-11-22 Thread AD7six
On Saturday, 19 November 2011 05:21:18 UTC+1, danswater wrote: > > Hi guys, i downloaded cakephp 1.3 and follow the CakePHP 1.3 App Dev > CookBook on creating an application with authentication. > I create the AppController class and set the $components in this > following settings: > public $com

Re: How to track the referer when error 404 happens?

2011-11-22 Thread AD7six
On Tuesday, 22 November 2011 11:45:42 UTC+1, heohni wrote: > > Hi, > > I using this app_error handler: > > class AppError extends ErrorHandler{ > > function __construct($method, $messages) { > Configure::write('debug', 2); > parent::__construct($method, $messages); > } >

How to track the referer when error 404 happens?

2011-11-22 Thread heohni
Hi, I using this app_error handler: controller->render($template); $this->controller->afterFilter(); App::import('Core', 'Email'); $email = new EmailComponent; $email->from = 'CakePHP '; $email->to = 'Developer '; $email->sendAs = 'html';

Re: Infinite re-direct during login

2011-11-22 Thread Mamdoohi
hi for any page that you want load without authentication, you must add this code in your beforeFilter() function in ony controller $this->Auth->allow('your_page') -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http

Re: CakePHP

2011-11-22 Thread Sathia S
What is difference between CakePHP and Codeigniter ?? # In Codeigniter, can load model even in views. But I think we cannot do that in cakephp. # Codeigniter doesnt have any auth component or acl , but cakephp does. # Codeigniter does'nt have ajax helper. By default cakephp has. -- Regards sa