Hi, i'm trying CakePHP( 1.2.6 ) and Media plugin( 0.60 ) on shared server with php_5.2.5( safe_mode : On ).
And upload jpeg file by media plugin, following error message apear on attachments.ctp( media plugin's element ).
An error occured while transferring
the file.
How can i fix this error without php cgi_mode on shared server...
where do i put the code for the image, then where would i put the actual image file itself
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $html->charset(); ?>
<title>
<?php __...
I use git as my primary version control system, and have recently started using git on my CakePHP projects. This is my current .gitignore file:
app/tmp
vendors/
As used in the cakephp git repo, but this causes a bit more work for me when deploying the project to a server, because I have to go in and create all the app/tmp/ sub-direct...
Can anyone suggest a scalable design pattern for implementing access control on Photos and Albums, each with individual privacy settings (i.e. owner, group member, public)?
I'm using CakePHP, and the examples I have read on the ACL component seem to control access to controller/actions, not objects themselves. It seems to get out of ha...
I'm just getting familiar with cakephp (thanks to the developer before me), and ran into something funny. I have finally found out what went wrong, but still do not know why. In very pseudo code:
a controller function calls bar() twice in the same scope:
$value = 'A';
$this->foo->bar($value);
// do other stuff
$value = 'B';
$this->foo-...
Hi is there a way to create a subquery while using the Linkable or Containable behavior with CakePHP?
Thanks in advance!
...
Here's what I'm trying to do:
I'm parsing incoming email, and using it to create posts in the system. This works almost completely, but there's a few bugs to work out. The one that's currently giving fits is coming up when an email contains certain characters (for example, ® – “ ”), the email body is being truncated at the special cha...
How do I do a paginator sort and also specify it to go to the first page:
echo $paginator->sort('Make', 'Car.make');
If you're on page 6 and want to sort the list by car make. It sorts the list but puts you on page 6 of the sorted list. When someone clicks on the sort by "make" button, I want the paginator to take them to page 1 of th...
Hi! I am facing a problem while fetching values using paginate function in cakephp. In the "to" field of message I have CSV fields of userid. To search messages for a single user. I am using the code below...
$this->set('message', $this->paginate('Message', array(
'or'=> array(
"Message.to LIKE" => "".$this->Session->read('...
when uploading an image to the server using cakephp
$this->Model->Behaviors->attach('ImageUpload', Configure::read('photo.files'));
photo uploaded successfully, and the database fields also
but shows following error instead of returning to index page.
Notice (8): Undefined index: class [CORE\cake\libs\model\behaviors\upload.php, l...
Tables:
Province hasMany County, County belongsTo Province, County hasMany City, City belongsTo County
So basically something like: City belongsThroughCountyTo Province
Situation:
In a search form I have a select drop down menu with provinces.
The "code":
When I list the results, I first get ids of counties that belong to the speci...
Hey everyon, I was looking at this tutorial and was wondering if anyone has an example of the completed effect.
I just want to know if it filters through the result when using the sliders but also updates the paginated numbers like on the kayak site. So lets say there is 10 pages, then you use the filter and then there are 5 pages.
If ...
I have a few models, all with appropriately named model files.
$this->Property->PropertyImage->Image->read();
All linked accordingly. Problem is, the recursive model is not able to attach to all the relationships and for some reason is returning AppModel data type when i do a var_dump on $this->PropertyImage. When i do a var_dump($thi...
Hi Guys,
I have a CakePHP error and I having a hard time to trace the problem. Hope you can help me.
Here is the error message:
Missing Database Table
Error: Database table cake_errors for model CakeError was not found.
Notice: If you want to customize this error message, create app/views/errors/missing_table.ctp
Am I missing somethi...
I'm trying to build a form dynamically based on the field and its definitions stored in a XML file. In my xml, I have defined 1 checkbox with some label and 1 textfield with some label.
How do I build a form dynamically based on what I have in my xml.
I dont want to create any models.
...
i am trying to do a simple form that adds a new comment using ajax to a blog post (actually this is a part of a cakePHP tutorial)
but the problem is that the submit button do nothing at all
here is the part of code that generates the form in the view.ctp file
<?php echo $ajax->form('/comments/add', 'post', array('url' => '/comments/ad...
I'm following this tutorial for creating automated sitemaps in CakePHP. Everything is easy, but I'm not able to output XML. The controller looks like
function sitemap ()
{
Configure::write ('debug', 0);
$cats = $this->Category->find('all', array('fields' => array('nicename', 'modified')), null, -1);
$posts = $this->Post->fin...
Before displaying user posts I run them though Sanitize::html() to escape all html. But it escapes some of the chars that are used for the Markdown parser.
This is what I want:
I'm testing this markdown. Try clicking here
This is what I get:
I'm testing this markdown. Try [clicking](http://www.google.com) here
So I'm wondering if...
I wish to load some global defaults in my CakePHP application. E.g. app/config/defaults.php
$config['site']['name']='FooBar';
$config['secuity']['somelimit']=-1;
I'm going to use (Configuration::read()) these values across various classes not just in a single controller.
Where is the proper place to call Configuration::load('defaults...
I have a div on the page where the contents change depending on the value selected in a drop down. Because there is a large amount of formatted content in this div I want to have a php script supply html which is stored in a file on the system.
I can't seam to figure out how to have php return the contents of that file, which essentiall...