cakephp

Cakephp's auth component logs me out too quickly. Anyway to change this?

This is my first time on StackOverflow though I "read" Coding Horror quite often. Anyway... I'm working on a school/college project using CakePHP and I'm using the built in AuthComponent to support user Authentication (i.e. logging in, etc). My problem is that it logs me out after very short intervals. It doesn't even have me wait a f...

$html-link() using onmouseover

Trying to use an onmouseover event echo $html->link("Dashboard", "/dashboard/index", array("onmouseover" => "Tip('Test');") ); becomes <a href="/dashboard/index" onmouseover="Tip(&#039;Test&#039;);">Dashboard</a> How do I prevent the link function from removing the single quotes? ...

To use a PHP framework or not?

I've started writing quite a few applications in PHP mainly for Wordpress and becoming more and more familiar with the language. Someone told me about CakePHP and Codeigniter and I wanted to get a better understanding of how these could help me and whether it's worthwhile spending the time to learn a framework? Thanks Jonathan ...

Reset fields in CakePHP

How to reset all the fields in the form on each refresh in CakePHP? ...

How to avoid a separate log-in when adding WikiMedia references in a CakePHP framework?

My team is trying to use Media Wiki to let users post deeper analysis of scientific research. However, MediaWiki requires a separate log-in, which is a real hassle. Is there a way to bypass the need for a separate Media Wiki log-in so that the user who is already logged-in to our site can go straight to Wiki Media and post references wi...

CakePHP - change user records on login

I'm new to CakePHP and frameworks and I've tried to google in search of an answer without any luck. I'm using the blank login() function and want to be able to change user records on login (like last_login). How can I do that? ...

Suppress the default template from a view with CakePHP

I'm doing some experimenting with AJAX in CakePHP and it seems to work except that the view that gets returned includes the default template. How can I get rid of that (or even just specify a different empty template for a view)? ...

CakePHP problem bake views (EasyPHP, MySQL)

I CakePHP (cake_1.2.2.8120) and EasyPHP (3.0) installed on Windows Vista Ultimate. I followed the "baking" tutorials online, successfully set the database connection with the "cake bake" command from the CLI. I baked the controller for my "Users" table using the "php cake.php bake controller Users" command - worked fine. However, when I...

cake's Acl problems...

I created an application using the method described in the "http:// book.cakephp.org/view/641/Simple-Acl-controlled-Application" but after I try to log in there is an error which says, "DbAcl::allow() - Invalid node [CORE\cake\libs\controller\components\acl.php, line 325]" I did exactly same as mentioned in the website but after loggin ...

alpha with space regex in cakephp

I have a user registration form and I only want the user to specify their first and last name (i.e. Donalg Doonsberry). If the user doesn't provide their name in this fashion, the input will be rejected. I thought something like this would work for my regex user validation in cakephp: 'name'=>array('Name has to be comprised of letter...

How can I do this without breaking the MVC framework in CakePHP?

Sorry for what is a generic title. I'm not the best at titles. Anyway the way Cake passes around data (as a hash) is pretty much the reason why I even need to ask this question. If when I passed a variable/obj from the controller to the view, it was an object that I can ask questions to (i.e. $duck->quack() ) rather than having it be an...

Use TIBCO General Interface with PHP, is that posible?

Can I use TIBCO General Interface with PHP? Or better, with CakePHP? If it's possible, how can I do that? Maybe some documentation in the web? (I search but I don't find anything). Thanks. ...

Can the CakePHP form helper be coerced to include a custom attribute?

What I need to do is create a form something like this: <form method="post" promptpermission="email" action="blahblah"> (Note the promptpermission attribute.) Is there any way I can do this without straying to far from the helper? <?php echo $form->create(); ?> Since it's only one form, I'm loath to go mod very much. Is there a qu...

a method creates an object and I call the method from an other object

If a method creates an object and I call the method from an other object, will the last object have access to the first object's properties and methods? ...

In CakePHP, is it possible to have internal and external routes?

A Facebook app is hosted on my server at, say, http://server.com/projects/fbapp/, but is only ever viewed in Facebook at, for instance, http://apps.facebook.com/fbapp/. Using CakePHP this presents a problem - should routes be prefixed with "/project/fbapp" or just "fbapp"? It's a problem because routes are used not just for routing inb...

Renamed Database in CakePHP

Hi all, After I uploaded my application created using cakephp, I found out that I had to rename the database. I renamed my database accordingly and changed the settings in the database.php file in the "config" folder. But my application is still not running. I am being shown this error message "Missing Database table" "Error: Database...

Logging in a user after registering

Hi, I am using cakephp framework to build my application. I want that, whenever a user registers he is automatically logged in and shown a particular page. Please tell me how do i achieve this functionality? using xampp, with php 5.2 and mysql 5.0 on winXP. ...

how can i limit the find to a specific number in cakephp?

i have a user model which gives me latest users as output. how can i limit the record to just output me 200 records instead of all the users in database?? ...

CakePHP Accessing Dynamically Created Tables?

As part of a web application users can upload files of data, which generates a new table in a dedicated MySQL database to store the data in. They can then manipulate this data in various ways. The next version of this app is being written in CakePHP, and at the moment I can't figure out how to dynamically assign these tables at runtime...

How do I change the user session after a user logs in with CakePHP?

I have $user = $this->Auth->user(); which retrieves the current user from the session. I want to make an admin user be able to 'act as' a customer. And I was hoping to be able to just replace the customer_id in the user session when they enter the customer interface. $user['User']['customer_id'] = 4; This doesn't work because I ...