cakephp

CakePHP memcache items expire too early

Hi, I got very strange behaviour with cackephp engine = memcache. The problem is that the cached items always expire earlier than it has. Setting engine = file fix the problem but this is not what i need. Any help will be appreciated! P.S. Im using cakephp 1.2.3.8166 stable. ...

ajax update multiple div

In my application i need to update multiple divs. we can give the div names in array. But i dont know how to render two ctp files in controller. for one ctp $this->render('newctp','ajax'); I want to know how to update for two? ...

redirect from another div

From my home page am showing a popupdiv.on submiting the popup form i need my home page to redirect.but my popup form is redirecting . How to make my home page redirect, after completing controller function. Now am using $this->redirect(home/action) ...

Registering a user automatically in cakephp

Hello everyone, Is it possible in cakephp that a user be registered automatically with a predefined set of inputs (username, password and all that...) provided by the programmer.? I want to register a user automatically whenever he tries to enter/access a member's restricted area. Please help me achieve this functionality. Using cake...

I have one month to get up to speed on ONE web development framework

My background is .net 2.0 development using web forms. Before I was laid off I was looking into MVC which I enjoy very much. I have a few clients that I am consulting for and I now have to make a decision to either stay the course with ASP.NET MVC or switch to ruby rails or cakephp/codeigniter. If I choose ASP.NET MVC I would have to up...

PHP Frameworks - Layout Dynamic Menu

I am developing a website in PHP and I would like to use a mvc framework to do this as I want to gain experience with PHP frameworks. I have looked at Zend, CakePHP, and CodeIgniter and I have not been able to find an intuitive way to accomplish this. What I need to do is create a layout that will be for example: <html> <head> <!--scr...

CakePHP cache control for asset files (images, CSS, etc)

What's the best way to use CakePHP to control the Expires headers for image and CSS files? My host unfortunately doesn't support mod_expires or mod_headers, so I can't simply set these values in an .htaccess file. Right now there's no cache control for my files and a lot of unnecessary requests are made. What's the most elegant way to ...

solution to index.php in my cakephp application

If i ignore index.php from my url the control not passing to the controller correctly. How to avoid the index.php from the url's. ex:http://localhost/index.php/home/display Thanks, ...

how to get my application directory name

my url is http://localhost/myAppliation/.... I want to get the "myApplication". Which is the key word to get the value? ...

Why doesn't Cache::clear() clear my (view) cache? (CakePHP)

Even though it's documented that CakePHP will automatically clear the view caches when a model is updated, it doesn't. It is important to remember that Cake will clear a cached view if a model used in the cached view is modified. For example, if a cached view uses data from the Post model, and there has been an INSERT, UPDATE, or DEL...

CakePHP Testsuite an ANT

Is it possible to integrate ANT and the CakePHP Test suite? ...

Accessing database from bootstrap.php in CakePHP.

Is there any standard method of accessing the database in the bootstrap.php file with CakePHP? Specifically I want to set "putenv()" to a time zone that's stored in the database. Is there another way of achieving the same thing that I should be using instead? Thanks. ...

CakePHP: Accessing database.php values

I need to retrieve values from CakePHP's config file database.php from one of my controllers. I'm maintaining an ex-employee's code, so I'm not positive how much of this adheres to default structures. I'm hoping this is fairly straightforward, but I can't seem to Google the right info. File: app/config/database.php class DATABASE_CONF...

jquery's ajax not working in facebook apps

Hi, I am trying to create a facebook application, all is working fine except the ajax part that I am using to populate a second box from the item selected in first select box. I am using jquery (v1.3.2) for accomplishing this. This ajax is working absolutely fine on the host where I have taken space for it, but it is not working in fac...

On PHP Error Apache gives 500 Error

Everytime I get an error in any of my PHP, my local Apache server gives me a 500 Internal Server error. I never seem to have problems with any of my CakePHP projects, but this is plain vanilla PHP and it is really slowing down progress having to guess at the error. ...

Problem with cakePhp and nested ajax form in firefox 3.5

Hi, Is it possible to have a nested ajax form in cakephp and firefox ? i.e. $ajax->form(form1...) table row $ajax->form(childForm_rowId) $form->end(childForm_rowId) endrow end table $form->end I found this works in IE7, but not in Firefox 3.5.1 Firefox will omit the childForm declaration, so the child ...

Cakephp, weird performance issues

I've asked this question all over the web, but nobody has replied so far. I have a Cake app on a live server. The problem is everything seems to be cached. Let's say you're on the index page, hit "delete" link to delete a record, and you're redirected back to the index. The "deleted" record is still shown. If you hit the refresh button...

UTF-8 output with CakePHP

Hello! I'm trying to move some Excel-Data to MySQL, but having troubles with encoding. What I did: Data export from OpenOffice 3.1 as csv (utf-8 encoded) Import to phpMyAdmin via file upload (Table encoding: '*utf8_unicode_ci*') In phpMyAdmin's view mode, the data is displayed correctly (it is using utf-8 as charset): <meta http-e...

CakePHP: Find where field is not null

I need to select all rows where User.site_url is not null. It's simple enough to do this in a regular MySQL query but how is this done in CakePHP? The manual mentions the following: array ("not" => array ( "Post.title" => null ) ) I have tried the following but it's still returning everything $this->User->find('all', arr...

cakephp VS codeigniter VS zend framework

Very possibly very related: What PHP framework would you choose for a new application and why? Zend or CakePHP? Which one is better? Some people say CakePHP is better for php 4, what do you think? In my case, I would like the following: Lesser code to write, have really strong library and plugin base. Always have new library ...