Hi,
i am getting the error as
Array to string conversion [CORE/cake/libs/file.php, line 96]
$path = array(
"name" => "23_50_11[1].gif",
"type" => "image/gif",
"tmp_name" => "/tmp/phpbBWxAT",
"error" => 0,
"size" => 25230
)
$create = false
$mode = 493
dirname - [internal], line ??
File::__construct() - CORE/cake...
I have two tables:
Contestant and Votes
Contestant hasMany Votes
I've tried doing a count(Vote.id) as Votes so I can place it on the
recordset and just paginate them but I have no idea where to place it.
I did it on the fields array but it gave me the total count of votes
regardless of the contestant they belong to.
The votes are link...
Hi,
i m having a doubt regarding which one is better option to use ?
$("<input id="input1"></input>").appendTo("#Form");
OR
using $('<?php echo $form->input();?>').appendTo("#Form");
...
I'm building a site that requires paypal integration. The way it works is I have buyers and sellers, the buyer requests the item, and pays for the item, but the seller needs to accept the money first.
So the money is held in limbo until the seller accepts it. Once accepted the money isn't transferred until the item has been received.
C...
I am creating an 'award' system for my website to encourage a community fealing, much in the same way that stack overflow uses badges.
The site is built in CakePHP, i have created an Award model, controller etc - currently the methods for calculating whether a user has an award are contained within the Award controller.
However, i can'...
Hi all, i need to download the cakephp documentaion pdf for both beginners and expert level.
Does any one know good pdf link, please help ...
Thanks in Advance!!
...
I asked this question on the CakePHP google-group but didn't find any resolution, so hopefully will have better luck here.
I've been developing on CakePHP for a bit and decided to have a
localhost version on MAMP so that I could demo my app to people
without being dependent on an Internet connection.
We have a couple of complex MySQL q...
I need to process an email inbox, monitor it for messages with a particular subject line. If it finds a match I need to get the body content, manipulate, and insert into a database. Ideally would mark the message as read and move it to another IMAP folder as well.
I'm poking around PHP documentation imap_open (http://us2.php.net/imap%...
I'm porting application from custom authentication system to cake's Auth. Everything works fine for logged user (even with smaller privileges), but doesn't for non logged users (who are most users of site). I'm managing privileges for them with $this->Auth->allow() in FooController::beforeFilter (but not with AppController::beforeFilter)...
Hi all!
The following site shows a (kinda hack-ish) way to protect an admin route with .htaccess:
http://snook.ca/archives/servers/password%5Fprotect%5Fadmin/
If I understand it correctly, it only works because CakePHP runs a check for the 'real' file presence before it processes its own URL logic. So, when you request yoursite.com/ad...
I currently have a query that results in the following recordset:
Array ( [Contestant] => Array ( [id] => 1 [name] => test [age] => [city] => atest [telephone] => [email] => [email protected] [why_model_house] => a [highschool] => [photo] => 5329_119145013633_512383633_2487923_7196193_n0.jpg [active] => 1 ) [0] => Array ( [Contestant_votes...
I am having a very curious problem. I am trying to do a find with conditions that work across model relationships. To wit...
$this->Model->find('first', array(
'conditions' => array(
'Model.col1' => 'value',
'RelatedModel.col2' => 'value2')));
...assuming that Model has a hasMany relationship to RelatedModel. Th...
I'm trying to write a simple JSON post and the callback alert does not show up no matter what I do. I used firebugs to see if the post was getting any response and "SHOE" returns. So why is the alert not working in the callback?
view code:
$('#GaragePartAddfrompartlistForm').click(function() {
var item = "CHEESE";
$.post(...
Hi all.
Frankly this is part of my uni assignment, BUT I have already done quite a bit... so please feel comfortable and keep reading since I am not asking for a cheat sheet or so :)
The project is now deployed on my website
Okay, I might have found the reason just minutes ago:
array_push() fails after pushing many items in an ar...
Okay, this is driving me nuts. I’m working through the IBM CakePHP Tutorial, and in the first part, I’m at the section where the author is introducing validation rules for form input:
www.ibm.com/developerworks/opensource/tutorials/os-php-cake1/section5.html#N107E3
For the life of me, I can’t figure out what’s happening in this line of...
I am working on a cakePHP project and have set up my data validation. The problem i have is that i keep getting an error from the core/model of cakePHP.
The error is:
Notice (8): Undefined offset: 0 [CORE/cake/libs/model/model.php, line 2435]
if (is_array($validator['rule'])) {
$rule = ...
Is it possible to use the built-in CakePHP components (eg: EmailComponent) as standalone classes?
I know this probably shows a design flaw, and that I'm not doing it the Cake way or something, but I have a class which is not tied to any Model/Controller and I want that to be able to send emails. Importing the EmailComponent doesn't work...
Let's say I have 3 models: User, Region, Country.
User belongsTo Region
Region belongsTo Country
Each of these models is using the Containable behavior. I'm attempting to find users from the country with code 'US'. Here's what I'm attempting:
$users = $this->User->find('all', array(
'conditions' => array('Country.code' => 'US')...
I can guess that this might sound obvious for some people out there, but i would like to know wether a Framework wich has no complex folder-structure can be used within CakePHP.
...
I'm new to CakePHP and am just running through the configuration process, but am stumped why Cake can't access my MySQL database. The Cake info page says my tmp directory is writable, the FileEngine is being used for caching (don't know what this means), and my database configuration file is present, but that CakePHP cannot connect to th...