cakephp

CakePHP and AmazonS3.. getting the included files (JS, CSS, etc) to load from Amazon S3?

I want to make it so that all of my css and JS files are loaded from Amazon s3 since this would make things faster for the end user and save on bandwidth costs since s3 is cheaper than my cloud provider for bandwidth... I am wondering if in my .ctp if I just change this to the full s3 path if cake will have the end user DL it from that u...

CakePHP with Phonegap, can they be used together?

I want to build a phone app using phonegap that can access data on a mysql server that is backing a cakephp app. Can this be done, if yes then how can use phonegap to access data from a mysql server? ...

Changing the default login setup with CakePHP

I have something that I thought was a relatively common problem, but after researching the issue, it appears not to be as easy as thought. I have a CakePHP application (using version 1.2.7) and I am trying to change the standard login procedure using the Auth Component. I would like to use a persistent login screen ( like this Jquery p...

Need some help with the conditions in CakePHP!

I have three models linked in this manner: Item->Order->Payment Order hasMany Item Order hasOne Payment Now, I am paginating Items and want to add a condition in it to find only items of that order which has payment of a particular id. I hope that makes sense :P I added the condition as: array('Payment.id'=>$id) but it doesn't w...

want to do mulitple element hide using ajax helper on getting response

want to do multiple div elements hide using ajax helper on getting response.but not using like this complete=>element.hide(div1),element.hide(div2),element.hide(div3),element.hide(div4) ...

how can i pass and access parameter in $ajax->submit using ajax->helper

how can i pass and parameter in $ajax->submit using ajax->helper and then use that parameter in cakephp using ajax helper ...

CakePHP one to many Combo box

Hey I have two models User and City, where a user belongs to a city and a city has many users. On the city table I have city_id and city_name. I've used used cake bake and created the user model and when I add a new user the combos box under the city field is showing the id of the city instead of the name. I've tried several methods to...

CakePHP, issue with subfolder after creating virtualhost for domain name

I originally installed my cakephp in a subfolder of my localhost folder (so in linux my localhost is set to: /var/www and I installed cakephp to: /var/www/site1 I had been using it at this address, so: http://localhost/site1 But now I am putting it up as a live site and I made a virtual server with apache so now this goes directly...

How to use regex to extract values from a string.(PHP)

I have a string like this \"access_token=103782364732640461|2.ZmElnDTiZlkgXbT8e34Jrw__.3600.1281891600-10000186237005083013|yD4raWxWkDe3DLPJZIRox4H6Q_k.&expires=1281891600&secret=YF5OL_fUXItLJ3dKQpQf5w__&session_key=2.ZmElnDTiZlkgXbT8e34Jrw__.3600.1281891600-10000186237005083013&sig=a2b3fdac30d53a7cca34de924dff8440&uid=10000186237005083...

CakePHP - Fatal error: Call to undefined function

I get the Error Fatal error: Call to undefined function getAvnet() in C:\xampp\htdocs\ems\app\controllers\queries_controller.php on line 23 when accessing the source file attached. The line is: $ret = getAvnet('de', $searchstring); supposably calling function getAvnet($country, $query) The Source File ...

Should someone with no PHP experience use a framework like CakePHP or Symfony?

I have a simple site to develop and would like to learn PHP as I go. I want the site to be secure, scalable, and easy to maintain. Should I learn a framework and PHP simultaneously? If I build off of a framework there will be lots of unfamiliar code in play. Would you say this increases security risks? ...

cakePHP form submission results blank screen

hello friends, I am facing a strange problem in cakePHP. The issue is when ever i submitted a form it results a blank screen. before submission the action work fine. Do any body have any idea on this issue. Thanks in advance ...

PHP starter -sample kit

I am looking for a starter kit- samples for learn web development. my goal is create a ecommerce web site. ...

CakePHP cancel redirect to view after submitting ajax add action

I'm trying to submit a form via AJAX and prevent a redirect after the form is submitted. I don't understand why I'm having this issue since I set autoRender to false. Controller Code function add() { $this->autoRender = false; if (!empty($this->data)) { $this->data['Comment']['user_id'] = $this->Auth->user('id'); ...

cakePHP, retrieving records after now

Hey, I've got an element that does a requestAction to grab records sorted by date. What I haven't been able to workout/find is how to restrict it to only include records who's date is after now. For example, in my element I something similar to: $stuff = $this->requestAction('stuff/get_stuff/sort:my_date/direction:asc'); How should I...

Why use CakePhp AJAX helper instead of jQuery?

Hello, I'm just starting using cakePHP and I saw on that there was an AJAX Helper in it. My question is simple : should I rather use this helper or should I keep doing AJAX with jQuery? Are there any changes I should perform in existing jQuery AJAX calls? Thanks ...

CakePHP - every seen this occuring: database session query repeating over and over and over

This might be tough to read, but essential is does this over and over again (Repeats 14 times): Select session id Count session Update session 16 SELECT Session.id, Session.data, Session.expires FROM cake_sessions AS Session WHERE id = '80f5f4f43334a7bc1446d06d143e6330' LIMIT 1 1 1 1 17 SELECT COUNT(*) AS count FROM cake_...

How to redirect to captcha for x failed attempted without circular redirects in CakePHP?

I am using the core Auth component. I have created a user login that manages all of the permissions. The way I am implementing the login monitoring is by checking for $this->Auth->user() in the app_controller. Each time the app_controller cycles the beforeFilter() function and !$this->Auth->user(), it will increment the Captcha.LoginAtte...

Displaying confirmation page before submitting a form

Within a Cake application, if a user is submitting a form to edit a record, what do you think would be the best way to outline the specific changes made? I would like to display the values to all of the fields that the user is changing and offer them the option to either confirm the changes or go back and change them. I assume that it wi...

Replacing words with tag links in PHP

I have a text ($text) and an array of words ($tags). These words in the text should be replaced with links to other pages so they don't break the existing links in the text. In CakePHP there is a method in TextHelper for doing this but it is corrupted and it breaks the existing HTML links in the text. The method suppose to work like this...