Re: CakePHP 3-tier

2015-03-13 Thread Matt Myers
The added security is in that the Presentation layer is what is exposed to 
the world and is more vulnerable. In the event that the Presentation layer 
is hacked, it would not have access to the Database layer. There is added 
security in front of the Application layer (which has access to the 
Database layer). The end user will never have direct access tot he 
Application layer and therefore will essentially never have access to the 
Database layer (which is even more locked down).

On Monday, January 22, 2007 at 9:55:20 AM UTC-7, dkarlson wrote:
>
> What are the perceived security risks involved in having the controller
> & models on the same server as the views?
>
>
> On Jan 22, 10:10 am, "dodik"  wrote:
> > Well, I know this is more a java-type of setup, but for security
> > reasons, I'd like to do this with cakePHP. Any ideas of mwhat I have to
> > do ?
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: belongsTo custom condition not working

2015-01-08 Thread Matt Myers
John,

Thanks for your help.

Yes, the containable behavior is critical. I use it all over.

I have 'persons' and 'organizations' tables. Here's the outcome I'm trying to 
get:

$following = $this->Person->find('all', array(
'contain' => array('Following' => 
array('FollowPerson','FollowOrganization')),
'conditions' => array('Person.id' => 1234),
));

$following will return all the Person and Organization records that are 
following Person 1234.

$followers = $this->Person->find('all', array(
'contain' => array('Follower' => array('Person')),
'conditions' => array('Person.id' => 1234),
));

$followers will return all the Person records that Person 1234 is following.

Same for Organization:

$followers = $this->Organization->find('all', array(
'contain' => array('Follower' => array('Person')),
'conditions' => array('Organization.id' => 5678),
));

The $followers logic currently works correctly. But the $following logic is 
very close, except that it returns all records matching the table_id, not 
filtering on the table_name.

Since is is always a person that is following something else (Person, 
Organization, and more in future), I have:

Person hasMany PersonFollow (tableName='person_follows'; realize not 
alphabetical).
PersonFollow belongsTo Person

The challenging part from here is PersonFollow HABTM Persons and Organizations.

I tried this in the PersonFollow model:

public $hasAndBelongsToMany = array(
'FollowPerson' => array(
'className' => 'Person',
'joinTable' => 'person_follows',
'foreignKey' => 'table_id',
'associationForeignKey' => 'id',
'conditions' => array('PersonFollow.table_name' => 'persons'),
),
'FollowOrganization' => array(
'className' => 'Organization',
'joinTable' => 'person_follows',
'foreignKey' => 'table_id',
'associationForeignKey' => 'id',
'conditions' => array('PersonFollow.table_name' => 'organizations'),
),
);

Seems to make no difference.

Should I be taking an entirely different approach here? 

-- 
Matt Myers
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, January 8, 2015 at 12:17 PM, John Andersen wrote:

> Just an addition to my previous post
> 
> Take a look at the Containable behaviour in the CakePHP book here:
> http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html
> 
> Understand it and then use it - it will make your life so much simpler when 
> you later need to retrieve data.
> Enjoy, John
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
> 
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "CakePHP" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/cake-php/MAW94cc-jeQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> cake-php+unsubscr...@googlegroups.com 
> (mailto:cake-php+unsubscr...@googlegroups.com).
> To post to this group, send email to cake-php@googlegroups.com 
> (mailto:cake-php@googlegroups.com).
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: belongsTo custom condition not working

2015-01-07 Thread Matt Myers
John,

I have another similar challenge I’m working on and I thought you may be able 
to help.

Here’s my stackoverflow: 
http://stackoverflow.com/questions/27826627/cakephp-use-both-foreignkey-and-conditions-in-hasmany

Any help would be appreciated. Thanks.

—
Matt


--  
Matt Myers
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, October 16, 2014 at 9:41 AM, Matt Myers wrote:

> Thanks John! This looks great. I'll give it a try.
>  
> --
> Matt
>  
>  
> On Wednesday, October 15, 2014 12:35:40 PM UTC-6, John Andersen wrote:
> > Hi Matt
> >  
> > Created a test setup and got the result you wanted by defining each model 
> > as follows:
> >  
> > class LinkedinPerson extends AppModel {
> > public $hasMany = array(
> > 'LinkedinRecommendation' => array(
> > 'className' => 'LinkedinRecommendation',
> > 'foreignKey' => 'linkedin_id',
> > )
> > );
> > public $primaryKey = 'linkedin_id';
> > public $actsAs = array('Containable');
> >  
> > class LinkedinRecommendation extends AppModel {
> > public $hasMany = array(
> > 'LinkedinPerson' => array(
> > 'className' => 'LinkedinPerson',
> > )
> > );
> > public $actsAs = array('Containable');
> >  
> > In the LinkedinPeople controller I have the index function retrieve all the 
> > LinkedinPeople as:
> > public function index() {
> > $this->set('people', $this->LinkedinPerson->find('all', array(
> > 'contain' => array('LinkedinRecommendation')
> > )));
> > }
> >  
> > This gives me the following result (debug output):
> > Array ( [0] => Array ( [LinkedinPerson] => Array ( [id] => 1 [name] => test 
> > person1 [linkedin_id] =>  ) [LinkedinRecommendation] => Array ( [0] 
> > => Array ( [id] => 1 [content] => Recommendation 1 [linkedin_id] => 
> >  [by_linkedin_id] =>  ) [1] => Array ( [id] => 2 [content] 
> > => Recommendation 2 [linkedin_id] =>  [by_linkedin_id] =>  
> > ) [2] => Array ( [id] => 3 [content] => Recommendation 3 [linkedin_id] => 
> >  [by_linkedin_id] =>  ) ) ) [1] => Array ( [LinkedinPerson] 
> > => Array ( [id] => 2 [name] => test person2 [linkedin_id] =>  ) 
> > [LinkedinRecommendation] => Array ( [0] => Array ( [id] => 4 [content] => 
> > Recommendation 4 [linkedin_id] =>  [by_linkedin_id] =>  ) 
> > [1] => Array ( [id] => 7 [content] => Recommendation 7 [linkedin_id] => 
> >  [by_linkedin_id] =>  ) ) ) [2] => Array ( [LinkedinPerson] 
> > => Array ( [id] => 3 [name] => test person3 [linkedin_id] =>  ) 
> > [LinkedinRecommendation] => Array ( [0] => Array ( [id] => 5 [content] => 
> > Recommendation 5 [linkedin_id] =>  [by_linkedin_id] =>  ) 
> > [1] => Array ( [id] => 6 [content] => Recommendation 6 [linkedin_id] => 
> >  [by_linkedin_id] =>  ) ) ) [3] => Array ( [LinkedinPerson] 
> > => Array ( [id] => 4 [name] => test person4 [linkedin_id] =>  ) 
> > [LinkedinRecommendation] => Array ( [0] => Array ( [id] => 8 [content] => 
> > Recommendation 8 [linkedin_id] =>  [by_linkedin_id] =>  ) ) 
> > ) )
> >  
> > Hope you can use the above. Please note that I always uses the Containable 
> > behavior.
> > Enjoy, John
> >  
> --  
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> ---  
> You received this message because you are subscribed to a topic in the Google 
> Groups "CakePHP" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/cake-php/MAW94cc-jeQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> cake-php+unsubscr...@googlegroups.com 
> (mailto:cake-php+unsubscr...@googlegroups.com).
> To post to this group, send email to cake-php@googlegroups.com 
> (mailto:cake-php@googlegroups.com).
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: blog tutorial errors

2014-11-30 Thread Matt Murphy
Ah!  Well in that case, please allow me to suggest *not* CakePHP.  For the
moment.  Do something well-structured and bite-sized like the php course on
http://www.codecademy.com/ -- It's free.  Then do it once more (because
repetition aids learning -- corny but true).  *then* go shopping for
cakePHP tutorials.  Learn a little PHP first (and maybe do the javascript
course too!).  You'll be glad you did!

On Sun, Nov 30, 2014 at 10:05 PM, Lorne Dudley  wrote:

> Hello Matt
>
> Thanks for the suggestion.   Can you give me a link to something simpler
> ?  I am really struggling to understand how cakePHP works, coming from a
> raw HTML (with minimal javascript) background. As you suggest, I would
> like to start up simple and then progress to more complicated models once I
> can see how the simple stuff works.
>
> Regards
>
> Lorne
>
> On Sunday, November 30, 2014 9:46:13 PM UTC-5, mbingham wrote:
>>
>> Hello Lorne,
>>
>> Might I suggest working on something that is simpler for the moment?
>> Something that doesn't require both core app logic *and* auth code.  Back
>> off.  Find something that isn't so meaty and ease into it.  Failing that,
>> try to implement this blog tutorial without the auth component and then
>> start over (yes over -- you'll benefit from solving the same problems with
>> different eyes) with it.
>>
>> Good luck!
>> Matt
>>
>> On Sat, Nov 29, 2014 at 12:16 AM, Lorne Dudley  wrote:
>>
>>> Hello John !
>>>
>>> Thanks for responding.   My major problem seems to be interpreting the
>>> tutorial properly and not making typo errors.  The tutorial neglected to
>>> mention that >> some progress since yesterday but still have not got the authorization
>>> stuff completely coded.
>>>
>>> I was hoping someone on the list might have accomplished a clean
>>> installation and would be willing to share their work.
>>>
>>> I will keep working at this and perhaps post later if I encounter more
>>> problems.   I think there might be some design problems in part one of the
>>> tutorial on how
>>> the flow between various screens works but I will hold off detailing
>>> that "problem" until I get the authorization part "completed".
>>>
>>> A download of the completed working code sure would have been nice !
>>>
>>> Regards
>>>
>>> Lorne
>>>
>>>
>>> On Friday, November 28, 2014 12:45:35 PM UTC-5, John Andersen wrote:
>>>>
>>>> Can I understand you correctly, that there are no actual error in the
>>>> blog tutorial, just that it gives you grief?
>>>>
>>>> If I am mistaken, please be so kind and explain to us, how you
>>>> experience the error? How far have you got in the tutorial? What is not
>>>> displayed correctly? ... and provide screenshots if possible.
>>>>
>>>> Thanks in advance
>>>> Enjoy, John
>>>>
>>>> On Thursday, 27 November 2014 21:52:06 UTC+2, Lorne Dudley wrote:
>>>>>
>>>>> Hello !
>>>>>
>>>>> I am a new user to cakePHP (version 2.6.0-RC1) and am attempting to
>>>>> learn by tutorial.
>>>>>
>>>>> The blog tutorial at http://book.cakephp.org/2.0/en
>>>>> /tutorials-and-examples/blog/part-two.html is giving me grief in that
>>>>> it does not display as expected.
>>>>>
>>>>> Does anyone have a properly working example who would be willing to
>>>>> send me copies of the following files ?
>>>>>
>>>>> /app/Config/routes.php
>>>>> /app/view/Posts/edit.ctp
>>>>> /app/view/Posts/add.ctp
>>>>> /app/view/Posts/index.ctp
>>>>> /app/view/Posts/view.ctp
>>>>> /app/Controller-PostsController.php
>>>>> /app/Model/Post.php
>>>>>
>>>>> Regards
>>>>>
>>>>> Lorne Dudley
>>>>> Kingston, Ontario
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  --
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Find us on Twitter http://twitter.com/CakePHP
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to cake-php+u...@googlegroups.com

Re: blog tutorial errors

2014-11-30 Thread Matt Murphy
Hello Lorne,

Might I suggest working on something that is simpler for the moment?
Something that doesn't require both core app logic *and* auth code.  Back
off.  Find something that isn't so meaty and ease into it.  Failing that,
try to implement this blog tutorial without the auth component and then
start over (yes over -- you'll benefit from solving the same problems with
different eyes) with it.

Good luck!
Matt

On Sat, Nov 29, 2014 at 12:16 AM, Lorne Dudley  wrote:

> Hello John !
>
> Thanks for responding.   My major problem seems to be interpreting the
> tutorial properly and not making typo errors.  The tutorial neglected to
> mention that  some progress since yesterday but still have not got the authorization
> stuff completely coded.
>
> I was hoping someone on the list might have accomplished a clean
> installation and would be willing to share their work.
>
> I will keep working at this and perhaps post later if I encounter more
> problems.   I think there might be some design problems in part one of the
> tutorial on how
> the flow between various screens works but I will hold off detailing that
> "problem" until I get the authorization part "completed".
>
> A download of the completed working code sure would have been nice !
>
> Regards
>
> Lorne
>
>
> On Friday, November 28, 2014 12:45:35 PM UTC-5, John Andersen wrote:
>>
>> Can I understand you correctly, that there are no actual error in the
>> blog tutorial, just that it gives you grief?
>>
>> If I am mistaken, please be so kind and explain to us, how you experience
>> the error? How far have you got in the tutorial? What is not displayed
>> correctly? ... and provide screenshots if possible.
>>
>> Thanks in advance
>> Enjoy, John
>>
>> On Thursday, 27 November 2014 21:52:06 UTC+2, Lorne Dudley wrote:
>>>
>>> Hello !
>>>
>>> I am a new user to cakePHP (version 2.6.0-RC1) and am attempting to
>>> learn by tutorial.
>>>
>>> The blog tutorial at http://book.cakephp.org/2.0/
>>> en/tutorials-and-examples/blog/part-two.html is giving me grief in that
>>> it does not display as expected.
>>>
>>> Does anyone have a properly working example who would be willing to send
>>> me copies of the following files ?
>>>
>>> /app/Config/routes.php
>>> /app/view/Posts/edit.ctp
>>> /app/view/Posts/add.ctp
>>> /app/view/Posts/index.ctp
>>> /app/view/Posts/view.ctp
>>> /app/Controller-PostsController.php
>>> /app/Model/Post.php
>>>
>>> Regards
>>>
>>> Lorne Dudley
>>> Kingston, Ontario
>>>
>>>
>>>
>>>
>>>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to put request variables in paginate class property?

2014-11-30 Thread Matt Murphy
You're on the right track with the second code bit.. but i'd abstract that
assignment into its own controller method and then call that from whatever
action you need it set -- or if the request params are avaialble early
enough (i don't know -- i don't do automagical platforms these days -- I'm
on ZF2) then call it on __invoke or __constructor or something.

On Sun, Nov 30, 2014 at 4:23 PM, Sam Clauw  wrote:

> I want to sort an array of data in my index action and one condition
> depends on the id given by the request object (attraction_id). Is there a
> way to set up the paginate component as a controller class method (see
> under)?
>
> 
> class AttractionCommentsController extends CoasterCmsAppController
> {
> public $paginate = array(
> 'AttractionComment' => array(
> 'conditions' => array(
> 'Attraction.id' => *$this*
> *->request->params['named']['attraction_id'**]*,
> 'AttractionComment.deleted' => null
> ),
> 'order' => array(
> 'AttractionComment.created' => 'DESC',
> 'AttractionComment.id' => 'ASC'
> ),
> 'limit' => 15
> )
> );
>
> public function index()
> {
> $this->Paginator->settings = $this->paginate;
>
> $comments = $this->Paginator->paginate('AttractionComment');
>
> $this->set('comments', $comments);
> }
>
> ?>
>
>
> The above code can't handle the request variable (*$this*
> *->request->params['named']['attraction_id'**])* within the class method.
> So... is there a solution for this or is it required to drop the class
> property and do something like this:
>
> 
> class AttractionCommentsController extends CoasterCmsAppController
> {
> public function index()
> {
>
> $this->Paginator->settings = array(
> 'AttractionComment' => array(
> 'conditions' => array(
> 'Attraction.id' => $this->request->params['named'][
> 'attraction_id'],
> 'AttractionComment.deleted' => null
> ),
> 'order' => array(
> 'AttractionComment.created' => 'DESC',
> 'AttractionComment.id' => 'ASC'
> ),
> 'limit' => 15
> )
> );
> $comments = $this->Paginator->paginate('AttractionComment');
>
> $this->set('comments', $comments);
> }
>
> ?>
>
> Thx 4 helping!
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3, getting error referencing relation

2014-11-30 Thread Matt Murphy
from.

On Sun, Nov 30, 2014 at 9:35 PM, Matt Murphy  wrote:

> I don't know crap about Cakephp3, but as i read this, I wonder: What do
> you get form $row->image_path?
>
> On Sun, Nov 30, 2014 at 6:39 PM, frocco  wrote:
>
>> Hello,
>>
>> I took advice on these forums and decided to learn Cake 3.0 instead of 2.
>>
>> In my controller I am getting product items and trying to reference child
>> table brands.
>>
>> $data = $this->Products->find('all')
>> ->where(['Products.is_active' => 0])
>> ->where(['Products.attributes LIKE' => $size.'%'])
>> ->where(['Products.category_id =' => $catid])
>> ->contain(['Brands']);
>>
>> foreach($products as $row):
>> $row->Brands->image_path; // this line is causing an error
>>
>> Trying to get property of non-object
>>
>>  --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cake-php+unsubscr...@googlegroups.com.
>> To post to this group, send email to cake-php@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Cakephp 3, getting error referencing relation

2014-11-30 Thread Matt Murphy
I don't know crap about Cakephp3, but as i read this, I wonder: What do you
get form $row->image_path?

On Sun, Nov 30, 2014 at 6:39 PM, frocco  wrote:

> Hello,
>
> I took advice on these forums and decided to learn Cake 3.0 instead of 2.
>
> In my controller I am getting product items and trying to reference child
> table brands.
>
> $data = $this->Products->find('all')
> ->where(['Products.is_active' => 0])
> ->where(['Products.attributes LIKE' => $size.'%'])
> ->where(['Products.category_id =' => $catid])
> ->contain(['Brands']);
>
> foreach($products as $row):
> $row->Brands->image_path; // this line is causing an error
>
> Trying to get property of non-object
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: belongsTo custom condition not working

2014-10-16 Thread Matt Myers
Thanks John! This looks great. I'll give it a try.

--
Matt


On Wednesday, October 15, 2014 12:35:40 PM UTC-6, John Andersen wrote:
>
> Hi Matt
>
> Created a test setup and got the result you wanted by defining each model 
> as follows:
>
> class LinkedinPerson extends AppModel {
> public $hasMany = array(
> 'LinkedinRecommendation' => array(
> 'className' => 'LinkedinRecommendation',
> 'foreignKey' => 'linkedin_id',
> )
> );
> public $primaryKey = 'linkedin_id';
> public $actsAs = array('Containable');
>
> class LinkedinRecommendation extends AppModel {
> public $hasMany = array(
> 'LinkedinPerson' => array(
> 'className' => 'LinkedinPerson',
> )
> );
> public $actsAs = array('Containable');
>
> In the LinkedinPeople controller I have the index function retrieve all 
> the LinkedinPeople as:
> public function index() {
> $this->set('people', $this->LinkedinPerson->find('all', array(
> 'contain' => array('LinkedinRecommendation')
> )));
> }
>
> This gives me the following result (debug output):
>
> Array
> (
> [0] => Array
> (
> [LinkedinPerson] => Array
> (
> [id] => 1
> [name] => test person1
> [linkedin_id] => 
> )
> [LinkedinRecommendation] => Array
> (
> [0] => Array
> (
> [id] => 1
> [content] => Recommendation 1
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> [1] => Array
> (
> [id] => 2
> [content] => Recommendation 2
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> [2] => Array
> (
> [id] => 3
> [content] => Recommendation 3
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> )
> )
> [1] => Array
> (
> [LinkedinPerson] => Array
> (
> [id] => 2
> [name] => test person2
> [linkedin_id] => 
> )
> [LinkedinRecommendation] => Array
> (
> [0] => Array
> (
> [id] => 4
> [content] => Recommendation 4
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> [1] => Array
> (
> [id] => 7
> [content] => Recommendation 7
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> )
> )
> [2] => Array
> (
> [LinkedinPerson] => Array
> (
> [id] => 3
> [name] => test person3
> [linkedin_id] => 
> )
> [LinkedinRecommendation] => Array
> (
> [0] => Array
> (
> [id] => 5
> [content] => Recommendation 5
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> [1] => Array
> (
> [id] => 6
> [content] => Recommendation 6
> [linkedin_id] => 
> [by_linkedin_id] => 
> )
> )

Re: belongsTo custom condition not working

2014-10-14 Thread Matt Myers
CakePHP 2.4.5

LinkedinPerson.linkedin_id (actual ID from Linkedin)

LinkedinRecommendation.linkedin_id (actual ID from Linkedin)

Both tables share the same foreignKey - which is the unique identifier from 
LinkedinIn. That is it. Another example of this would be if I had two 
tables that shared the same email address, so I keyed off of that. Instead 
of the more typical primary key/ foreign key relationship.

--
Matt

On Tuesday, October 14, 2014 11:04:39 AM UTC-6, John Andersen wrote:
>
> How are your tables defined?
>
> What is the primary key for the table used by the model "LinkedinPerson"?
> What is the primary key for the table used by the model 
> "LinkedinRecommendation"?
>
> In each of the tables, what is the definition of the column "linkedin_id" 
> - I hear mean the purpose of the column?
>
> What version of CakePHP are you using?
>
> Kind regards
> John
>
> On Monday, 13 October 2014 22:09:11 UTC+3, Matt Myers wrote:
>>
>> // in LinkedinPerson
>> public $hasMany = array(
>> 'LinkedinRecommendation' => array(
>> 'className' => 'LinkedinRecommendation',
>> 'foreignKey' => false,
>> 'dependent' => true,
>> ),
>> )
>>
>>
>> // in LinkedinRecommendation
>> public $belongsTo = array(
>> 'LinkedinPerson' => array(
>> 'className' => 'LinkedinPerson',
>> 'foreignKey' => false,
>> 'conditions' => array('LinkedinPerson.linkedin_id = 
>> LinkedinRecommendation.linkedin_id'),
>> ),
>> );
>>
>> When I query these out with find() the LinkedinPerson returns ALL 
>> recommendations. Not just those associated by linkedin_id. I've tried a 
>> variety of different things, and I'm stumped. Can someone help?
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


belongsTo custom condition not working

2014-10-13 Thread Matt Myers
// in LinkedinPerson
public $hasMany = array(
'LinkedinRecommendation' => array(
'className' => 'LinkedinRecommendation',
'foreignKey' => false,
'dependent' => true,
),
)


// in LinkedinRecommendation
public $belongsTo = array(
'LinkedinPerson' => array(
'className' => 'LinkedinPerson',
'foreignKey' => false,
'conditions' => array('LinkedinPerson.linkedin_id = 
LinkedinRecommendation.linkedin_id'),
),
);

When I query these out with find() the LinkedinPerson returns ALL 
recommendations. Not just those associated by linkedin_id. I've tried a 
variety of different things, and I'm stumped. Can someone help?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Auth Component

2014-06-27 Thread Matt Myers
I've been hitting my head over this for quite some time now. When I login 
using the Auth Component as such:

$this->Auth->login()

It will login just fine and define the following authUser:

User
User.Person
User.Company

But when I login in another situation like so:

$this->Auth->login($user['User'])

This will log them in just fine, but define the following authUser:

User

* Without User.Person or User.Company

Does anyone know why this is? How can I get the same behavior across the 
board? I would like he User.Person and User.Company in both instances.

Thanks in advance.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Can HTTP POST response size be minimized?

2014-02-12 Thread Matt Murphy
Have you looked at what is specifically in the response?  And have you read
about CakeResponse?
http://book.cakephp.org/2.0/en/controllers/request-response.html#CakeResponse




On Wed, Feb 12, 2014 at 8:24 AM, Sam  wrote:

> I have an application which sends plenty of HTTP POST to add records to a
> cakephp 2.3 application which was cake baked. I noticed that the HTTP
> response from cakephp is quite big. Can HTTP POST response size be
> minimized? I don't really care about the response. Please note that I am
> not sending HTTP POST through a form but through an external app written in
> python.
>
>
> Thank you.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


CakePHP v2.4.3 / PHP 5.5.3 Crashing on IIS 8.5 Windows 2008 R2

2013-12-10 Thread Matt Grofsky
Having an issue where I'm using PHP 5.5.3 Crashing on IIS 8.5 Windows 2008 
R2 using the php_pdo_sqlsrv_55_nts.dll and cakePHP v2.4.3

This problem does not occur outside of CakePHP

Driving me crazy and can't figure out whats going on.  There is no specific 
error generated fro this.  Someone mentioned to place int he SP SET NOCOUNT 
ON  but it already has that setting.

{
"code": 500,
"url": "\/test\/process",
"name": "SQLSTATE[IMSSP]: The active result for the query contains no 
fields.",
"error": {
"errorInfo": [
"IMSSP",
-15,
"The active result for the query contains no fields."
]
}
}

Below is an example of what causes the 500

DECLARE @RC int 
DECLARE @CustomerID varchar(15) 
DECLARE @FirstName varchar(50) 
DECLARE @LastName varchar(50) 
DECLARE @PlaceOfWork varchar(100) 
DECLARE @Active bit 
DECLARE @NoActivityStatement bit 
DECLARE @CustomerClassID varchar(15) 
DECLARE @CustomerType tinyint 
DECLARE @PenaltyType varchar(15) 
DECLARE @CollectionExempt bit 
DECLARE @ZoneID varchar(15) 
DECLARE @Source tinyint 

EXECUTE @RC = [dbo].[test_spCreate] 
   @CustomerID = '{$nextCustomerID}'
  ,@FirstName = '{$this->request->data['first_name']}'
  ,@LastName = '{$this->request->data['last_name']}'
  ,@PlaceOfWork = '{$this->request->data['company']}'
  ,@Active = '1'
  ,@NoActivityStatement = '0'
  ,@CustomerClassID = 'COMMERCIAL'
  ,@CustomerType = '2'
  ,@PenaltyType = ''
  ,@CollectionExempt = '0'
  ,@ZoneID = ''
  ,@Source = ''

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Automatically Serialize All View Variables

2013-10-28 Thread Matt Bowden
No question here, just thought I'd share a solution to a problem I needed 
to solve.

I'm working on a decoupled application where the back-end is all CakePHP 
and the front-end is all Javascript. The front-end communicates with the 
back-end as a RESTful API. I could write a handful of posts in here about 
some of the problems I ran into, but right now, I just want to share a 
trick I developed with serializing view variables.

I use jQuery AJAX functions to get json from CakePHP. I got tired of 
writing this all over my controllers:

$this->set('_serialize', array('omg', 'so' 'many', 'view', 'vars'));

So I decided to automatically serialize all my view variables in my app 
controller's beforeRender callback. (beforeRender is called after all the 
application logic is finished, right before the view is rendered. Good name 
for it huh?)

// AppController.php
public function beforeRender(){

// When setting _serialize, you pass in a list of variable names.

// array_keys($this->viewVars) returns an array of the names of the view 
variables 

$this->set('_serialize', array_keys($this->viewVars));

}

That works, but if I need a way to ignore some view variables, I would have 
to do something a little more elaborate.

// AppController.php
public function beforeRender(){

// When setting _serialize, you pass in a list of variable names.
// array_keys($this->viewVars) returns an array of the names of the view 
variables

$viewVars = array_keys($this->viewVars);

 

// I include _serialize to prevent the possibility of a _serialize inside 
another _serialize 

$varsToIgnore = array('_serialize', 'debugToolbarPanels', 
'varThatOnlyAppliesToBackEnd');

 

foreach($varsToIgnore as $varToIgnore){

// Might be a better way of doing this, but it works and seems safe

// in_array checks if a value exists in an array

// unset removes an array or array index in this case

// array_search returns the index of where a value is found 

if(in_array($varToIgnore, $viewVars)) 
unset($viewVars[array_search($varToIgnore, $viewVars)]);

}

 

// Reindex the viewVars array after removing variables from above

// I don't know if this is really necessary, but I did it anyway.

$viewVars = array_values($viewVars);

 

$this->set('_serialize', $viewVars);

}

My beforeRender method is getting a little too long for my liking, so I 
decided to clean it up a bit, by moving the variables to ignore into a 
private property and the logic to serialize the view variables into its own 
private method.

// AppController.php
// A shorter name would be easier to type
private var $viewVariablesNotToSerialize = array('_serialize', 
'debugToolbarPanels', 'varThatOnlyAppliesToBackEnd');

public function beforeRender(){

$this->__serializeViewVars();

}

private function __serializeViewVars(){

// When setting _serialize, you pass in a list of variable names.
// array_keys($this->viewVars) returns an array of the names of the view 
variables

$viewVars = array_keys($this->viewVars);

 

foreach($this->__viewVarsNotToSerialize as $varToIgnore){

// Might be a better way of doing this, but it works and seems safe

// in_array checks if a value exists in an array

// unset removes an array or array index in this case

// array_search returns the index of where a value is found 

if(in_array($varToIgnore, $viewVars)) 
unset($viewVars[array_search($varToIgnore, $viewVars)]);

}

 

// Reindex the viewVars array after remove variables from above

// I don't know if this is really necessary, but I did it anyway. 

$viewVars = array_values($viewVars);

 

$this->set('_serialize', $viewVars); 

}

I hope someone finds this useful.

Matt Bowden
Web Application Developer
Skybrick

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Wordpress blog archive look like in CakePHP

2013-08-03 Thread Matt Bowden
The CakeDC utils plugin has an Archive components that sounds like what 
you're trying to do.

https://github.com/CakeDC/utils

On Tuesday, July 30, 2013 4:19:54 PM UTC-7, Helder Lucas wrote:
>
> I'm building and application with cakePHP and I'm trying to achieve 
> something like a Wordpress blog archive.
>
> Let's imagine that i have this table in my database:
>
>- Posts
>   - id
>   - title
>   - body
>   - created
>   - modified
>
> and i want the output something like this:
>
> 2013
>  Post Title
>  Post Title
>  Post Title
>
> 2012
>  Post Title
>  Post Title
>  Post Title
>
> etc etc 
>
> I have searched and tried by myself but unfortunately with no success.
>
> Thanks in advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Wordpress blog archive look like in CakePHP

2013-08-01 Thread Matt Bowden
Try creating a virtual field for the year (
http://book.cakephp.org/2.0/en/models/virtual-fields.html) and using the 
group option in your find method (
http://api.cakephp.org/2.3/class-Model.html#_find).

On Tuesday, July 30, 2013 4:19:54 PM UTC-7, Helder Lucas wrote:
>
> I'm building and application with cakePHP and I'm trying to achieve 
> something like a Wordpress blog archive.
>
> Let's imagine that i have this table in my database:
>
>- Posts
>   - id
>   - title
>   - body
>   - created
>   - modified
>
> and i want the output something like this:
>
> 2013
>  Post Title
>  Post Title
>  Post Title
>
> 2012
>  Post Title
>  Post Title
>  Post Title
>
> etc etc 
>
> I have searched and tried by myself but unfortunately with no success.
>
> Thanks in advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Wordpress blog archive look like in CakePHP

2013-08-01 Thread Matt Bowden
One way to approach this is to use a virtual field (
http://book.cakephp.org/2.0/en/models/virtual-fields.html). In your Post 
model, create a virtual field called year that gets the year out of the 
created field.

On Tuesday, July 30, 2013 4:19:54 PM UTC-7, Helder Lucas wrote:
>
> I'm building and application with cakePHP and I'm trying to achieve 
> something like a Wordpress blog archive.
>
> Let's imagine that i have this table in my database:
>
>- Posts
>   - id
>   - title
>   - body
>   - created
>   - modified
>
> and i want the output something like this:
>
> 2013
>  Post Title
>  Post Title
>  Post Title
>
> 2012
>  Post Title
>  Post Title
>  Post Title
>
> etc etc 
>
> I have searched and tried by myself but unfortunately with no success.
>
> Thanks in advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery validation helper not working in 2.2.4

2013-01-10 Thread Matt
Hi,

That's a helper I created a while back and it will work on 2.2.4, although 
you might want to get the latest version from GitHub

https://github.com/vz28bh/CakePHP-JqueryValidationHelper

In that version I recommend opening the form like below, just to make 
things a little cleaner.

JqueryValidation->createHorizontal('User'); ?>

Also, make sure you include Jquery itself 

echo $this->Html->script('jquery.min');

and have defined some validation criteria in your models

'username' => array(
'notempty' => array(
'rule' => array('notempty'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
),
),

If you can get Firefox with Firebug installed you can see if there are any 
Javascript problems.

I assume "server side" means you only get validation after clicking submit, 
which would be using the Cake model validation instead of Javascript.

Matt

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake 2.0 NOT IN array is not working

2012-10-24 Thread Matt
If that was just a typo in your email, maybe this would work

$this->set('people', $this->Scout->Person->find('
list', array('conditions' => array('Person.id NOT' => array($scouts));

Matt


On Wednesday, October 24, 2012 3:54:46 PM UTC-5, Matt wrote:
>
> Shouldn't it be
>
> $scouts = array(1,2,3);
>
> Matt
>
> On Wednesday, October 24, 2012 12:44:28 PM UTC-5, Nicholas Flint wrote:
>>
>> I am using two tables with a one-to-one relationship.
>>
>> Tables:
>> people (id,first_name,last_name)
>> scouts(id,rank,den,person_id)
>>
>> When creating a new Scout the people.id is selected from a dropbox. I 
>> need this dropbox to only populate with people.id that are not already 
>> in a scout.person_id. I'm trying to use:
>>
>> $scouts = (1,2,3);
>>
>> $this->set('people', $this->Scout->Person->find('list', 
>> array('conditions' => array('NOT' => array('Person.id' => 
>> array($scouts));
>>
>> The SQL that is generated by cake only checks the first element in the 
>> array:
>> SELECT `Person`.`id` FROM `db`.`people` AS `Person` WHERE NOT 
>> (`Person`.`id` = ('1,2'))
>>
>> So my dropbox displays 2 and 3 when it should only be displaying 3.
>>
>> Thank you in advance for any help you can provide.
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake 2.0 NOT IN array is not working

2012-10-24 Thread Matt
Shouldn't it be

$scouts = array(1,2,3);

Matt

On Wednesday, October 24, 2012 12:44:28 PM UTC-5, Nicholas Flint wrote:
>
> I am using two tables with a one-to-one relationship.
>
> Tables:
> people (id,first_name,last_name)
> scouts(id,rank,den,person_id)
>
> When creating a new Scout the people.id is selected from a dropbox. I 
> need this dropbox to only populate with people.id that are not already in 
> a scout.person_id. I'm trying to use:
>
> $scouts = (1,2,3);
>
> $this->set('people', $this->Scout->Person->find('list', array('conditions' 
> => array('NOT' => array('Person.id' => array($scouts));
>
> The SQL that is generated by cake only checks the first element in the 
> array:
> SELECT `Person`.`id` FROM `db`.`people` AS `Person` WHERE NOT 
> (`Person`.`id` = ('1,2'))
>
> So my dropbox displays 2 and 3 when it should only be displaying 3.
>
> Thank you in advance for any help you can provide.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: 3.0: a peek into CakePHP's future

2012-08-12 Thread Matt
I just read a lot of the replies and noticed major pushback on the change 
to the model layer (data array to object).  Now I'm sitting here completely 
perplexed as to why anyone would think that data arrays are a good choice 
for accessing the model over traditional objects?!  I've worked with 
CakePHP for about 4 months now and everyday I bang my head against the wall 
because of how these darn data arrays pervade EVERYTHING.

Look, using data arrays the way Cake does now, you are coupling your 
database schema to your model, your view, and usually your controller. 
 Change one name in your schema and now you have to go change every other 
artifact that comes into contact with that data (yes I know you can bake 
stuff but maybe I don't want to lose all that hand-coded view 
functionality, or maybe I just don't feel like rebaking my app because 
"user_name" just became "username").  

Perhaps the problem is that many people have forgotten why OOP exists in 
the first place.  One comment event mentioned how arrays can be accessed 
via object notation so who cares about using objectsseriously?  Objects 
don't exist so you can use dot notation, they exist to separate 
dependencies on behavior from dependencies on data.  Business logic should 
depend on other business logic, not architecture logic.  

Changing queries to return objects is an absolutely necessary upgrade, IMO. 
 I would even go further to say that the term "model" in CakePHP is grossly 
mis-used.  A "model" right now in Cake just means a query machine...but a 
"model" should be any object of significant business purpose which 
abstracts the behavior of the application (because if its not a View and 
its not a Controller, it must be a Model).  I have all sorts of "models" in 
my apps that I can't call models because their job is not to run CRUD 
operations.  I believe the current concept of a "model" in Cake should be 
shrunk to something like a model.data package so that we can more easily 
include pure models which focus on business behavior over the very specific 
task of querying databases and other data sources.  Said differently, we 
should be able to think of our models only in terms of their interface and 
still have a perfect understanding of what the system does.

Anyway, BIG thanks to the Cake team for understanding the importance of 
object based queries.  I can't applaud that enough.  The one thing I might 
suggest is a little bit of public effort to educate everyone about the 
reasoning behind this changeit seems to me that a lot of people are 
reacting on some emotional attachment to data arrays instead of thinking 
about how this actually makes our lives easier without adding work.

On Thursday, July 5, 2012 10:36:03 PM UTC-4, José Lorenzo wrote:
>
> Since its creation, more than 7 years ago, CakePHP has grown with a life 
> of its own. Its main goal has always been to empower developers with tools 
> that are both easy to learn and use, leverage great libraries requiring low 
> documentation and low dependencies too. We've had several big releases 
> along these years and an ever growing community. Being one of the most 
> popular frameworks out there and probably the first one (!) we have also 
> gotten a lot of criticism from the developer community in general. We have, 
> though, accepted it and learnt from our mistakes to keep building the best 
> PHP framework there is.
>
> CakePHP is known for having a very slow pace of adopting new stuff and it 
> has served very well to its community. Back when we were doing version 2.0 
> we decided to hold on version 5.2 of PHP for multiple reasons and despite 
> it didn't let us innovate as much as we wished to, it was an excellent 
> choice given the general environment regarding hosting solutions and 
> general adoption of PHP 5.3. A look back into the past reminded us that we 
> were big innovators in PHP, bringing features to developers that few dreamt 
> possible to do in this language. Now, it's time to look ahead in future and 
> decide on staying in our comfort zone or take back our leading position as 
> innovators.
>
> So it is with great excitement that we announce we are putting our our 
> efforts in bringing you the next major release of CakePHP. Version 3.0 will 
> leverage the new features in PHP 5.4 and will include an important change 
> in our models and database system. CakePHP 3.0 will not be ready less than 
> 6 or 8 months and we reckon that, given the rise of cheap cloud hosting 
> solutions and upcoming release of new operating system versions, there is 
> no better time to jump on the most current stable version of PHP.
>
> As you may already know, PHP 5.4 offers awesome features that would 
> introduce useful new concepts and interesting solutions to old problems. 
> Closure binding, traits, multibyte support are tools we see of great 
> usefulness for properly implemented advanced framework features we've had 
> in mind for a long time. Also new syn

Re: Passing an email address as param with a plus(+) sign

2012-07-17 Thread Matt Brooks
So I know this post happened nearly 3 years ago, but this really stumped me 
for a good while.  The final solution I came up with was to triple encode 
the email address before passing it to the URL like so:

$enc_email = urlencode(urlencode(urlencode('foo+...@example.com')));

This in turn would get put into the URL:

http://example.com/email/confim/foo%25252Bbar%252540example.com/

After all of the URL processing magic, the email finally gets put into 
CakePHP correctly.

Now why CakePHP requires this be done is somewhat a mystery to me, but the 
best thing I can come up with is that it's not all CakePHP's fault.  The 
best thing I can come up with is that this maybe http server or apache 
configuration specific.  It could even be different from distro of linux to 
distro of linux.  It seems that some installs of apache require you to 
double encode the '+', '\', or '/' variables in order to process them 
correctly.  This was probably designed to prevent some sort of security 
breach.  Please see the following link for more info:  
http://www.jampmark.com/web-scripting/5-solutions-to-url-encoded-slashes-problem-in-apache.html

The final encoding is probably required for CakePHP.  Although I can't find 
it in the code, I am sure CakePHP decodes all URL variables again somewhere.

Hopefully this will help prevent any frustration for someone in the future.

-Matt Brooks


On Monday, January 26, 2009 10:19:01 PM UTC-6, Jon Molesa wrote:
>
> I'm trying to pass a valid email address as a parameter in the url.
>
> foo+...@example.com
>
> in my model it strips the + sign.
>
> function confirm($email){
> $this->set('email',$email);
> }
>
> confirm.ctp
>
> 
>
> outputs
>
> foo b...@example.com
>
> I believe this is happening prior to the controller function getting
> ahold of the string as I've tried various encoding functions including
> Security::cipher() at the beginning of the function upon decoding I
> still get the above output.  Can anyone suggest how I might be able to
> retain the + sign in my controller logic and back out to the view?
>
> -- 
> Jon Molesa
> rjmol...@gmail.com
> if you're bored or curious
> http://rjmolesa.com
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Biiling System with Cakephp

2012-07-04 Thread Matt Murphy
All the interface stuff you described is going to be JavaScript.  All the
backend stuff can be most anything you like.  I suspect the Javascript
Framework that fits best with what you describe is EXTJS, though perhaps
someone else has a better suggestion.  If you want to use cakephp as the
backend, rock on.  Good luck.

M

On Tue, Jul 3, 2012 at 9:30 PM, Mr. Manager  wrote:

> Dear All,
>
> I would like to create billing system with cakephp that is similar to
> window app, which show the data in datagridview and add record in datagrid,
> especially behind the sense modify record. In short we want to work with
> data like desktop application.
>
> And one more in this system i want to track all user activity, including
> which user modify on what record or data and if they want to restore to the
> original one.
>
> I am looking forward to hearing solution from all as soon as possible.
>
> Best Regard,
> Mr. Manager,
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Creating full url from CakePHP 2.1.2 Console Shell

2012-06-22 Thread Matt
Aha, I figured it out!  I had to hack the ShellDispatcher.php to change the 
define statement  This works if I just have one shell, but if I add others 
I'll just have to create another global to use instead of having it 
hardcoded.   Actually, that might be a good idea for adding to the core 
code.

if (!defined('FULL_BASE_URL')) {
define('FULL_BASE_URL', 'http://localhost/ReportMonitor');
}

Thanks!

On Friday, June 22, 2012 11:08:51 AM UTC-5, AD7six wrote:
>
>
>
> On Friday, 22 June 2012 17:44:27 UTC+2, Matt wrote:
>>
>> I am trying to send an email from CakePHP 2.1.2 via console shell 
>> (eventually by a cron job).  The view I am sending is a calendar with links 
>> back to the applications web page.  The problem I am finding is that the 
>> urls do not include the correct path and from what I have read it is 
>> because there is no request object since I am using the console.  For 
>> example, if I create the view in my browser I get links like this:
>>
>> 
>> http://localhost/ReportMonitor/scheduledReports/index/show_date:2012-06-10/result:GOOD
>>
>> but in the email using the same code I get this:
>>
>> 
>> http://localhost/scheduledReports/index/show_date:2012-06-10/result:GOOD
>>
>> which is close, but no cigar.
>>
>> I have been trying to find the global that I can set somewhere
>
>
> Since the cli doen't know what domain it's on, that's the right thing to 
> do.
>
>   define('FULL_BASE_URL', "http://mydomain.com/subfolder";);
>
> Will allow you to generate urls on the cli.
>
> AD
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Creating full url from CakePHP 2.1.2 Console Shell

2012-06-22 Thread Matt
That's the direction I was thinking, but adding that code causes an error 
about it already being defined.  I echoed the current value and it is 
http://localhost as expected.  I'm assuming it gets set in the console 
startup so I don't think I can redefine it.

Thanks

On Friday, June 22, 2012 11:08:51 AM UTC-5, AD7six wrote:
>
>
>
> On Friday, 22 June 2012 17:44:27 UTC+2, Matt wrote:
>>
>> I am trying to send an email from CakePHP 2.1.2 via console shell 
>> (eventually by a cron job).  The view I am sending is a calendar with links 
>> back to the applications web page.  The problem I am finding is that the 
>> urls do not include the correct path and from what I have read it is 
>> because there is no request object since I am using the console.  For 
>> example, if I create the view in my browser I get links like this:
>>
>> 
>> http://localhost/ReportMonitor/scheduledReports/index/show_date:2012-06-10/result:GOOD
>>
>> but in the email using the same code I get this:
>>
>> 
>> http://localhost/scheduledReports/index/show_date:2012-06-10/result:GOOD
>>
>> which is close, but no cigar.
>>
>> I have been trying to find the global that I can set somewhere
>
>
> Since the cli doen't know what domain it's on, that's the right thing to 
> do.
>
>   define('FULL_BASE_URL', "http://mydomain.com/subfolder";);
>
> Will allow you to generate urls on the cli.
>
> AD
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Creating full url from CakePHP 2.1.2 Console Shell

2012-06-22 Thread Matt
I am trying to send an email from CakePHP 2.1.2 via console shell 
(eventually by a cron job).  The view I am sending is a calendar with links 
back to the applications web page.  The problem I am finding is that the 
urls do not include the correct path and from what I have read it is 
because there is no request object since I am using the console.  For 
example, if I create the view in my browser I get links like this:


http://localhost/ReportMonitor/scheduledReports/index/show_date:2012-06-10/result:GOOD

but in the email using the same code I get this:

http://localhost/scheduledReports/index/show_date:2012-06-10/result:GOOD

which is close, but no cigar.

I have been trying to find the global that I can set somewhere to just hard 
code the app subdirectory but haven't found anything that works yet.  The 
links are made by a code like this:

$newUrl = array();
$newUrl['controller'] = 'scheduledReports';
$newUrl['action'] = 'index';
$newUrl['url'] = array();

foreach ($data as $key => $value) {
  $newUrl['show_date'] = "$year-$month-$key";
  $newUrl['result'] = 'GOOD';
  $data[$key]['num_complete'] = $this->Html->link(__('Complete: ') . 
$value['num_complete'], Router::reverse($newUrl, true), array('class' => 
'green'));

I would think this is a common function (sending valid urls in console 
generated email) but I just can't figure it out.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Url rewrite not working, CakePHP 2.1.2 IIS 6 Helicon ISAPI_rewrite 3

2012-06-04 Thread Matt
) 
Gecko/20100101 Firefox/12.0',
'HTTP_X_REWRITE_URL' => '/report_monitor/scheduled_reports/showMonth',
'AUTH_TYPE' => '',
'AUTH_PASSWORD' => '',
'AUTH_USER' => '',
'CERT_COOKIE' => '',
'CERT_FLAGS' => '',
'CERT_ISSUER' => '',
'CERT_SERIALNUMBER' => '',
'CERT_SUBJECT' => '',
'CONTENT_LENGTH' => '0',
'CONTENT_TYPE' => '',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'HTTPS' => 'off',
'HTTPS_KEYSIZE' => '',
'HTTPS_SECRETKEYSIZE' => '',
'HTTPS_SERVER_ISSUER' => '',
'HTTPS_SERVER_SUBJECT' => '',
'INSTANCE_ID' => '1',
'LOCAL_ADDR' => 'x.x.x.x',
'LOGON_USER' => '',
'PATH_INFO' => '/scheduled_reports/showMonth',
'PATH_TRANSLATED' => 
'D:\WebSites\cakephp-2.1.2\report_monitor\webroot\index.php\scheduled_reports\showMonth',
'QUERY_STRING' => '',
'REMOTE_ADDR' => 'x.x.x.x',
'REMOTE_HOST' => 'x.x.x.x',
'REMOTE_USER' => '',
'REQUEST_METHOD' => 'GET',
'SCRIPT_NAME' => '/report_monitor/index.php',
'SERVER_NAME' => 'reyfis01',
'SERVER_PORT' => '80',
'SERVER_PORT_SECURE' => '0',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'SERVER_SOFTWARE' => 'Microsoft-IIS/6.0',
'UNMAPPED_REMOTE_USER' => '',
'ORIG_PATH_INFO' => 
'/report_monitor/index.php/scheduled_reports/showMonth',
'SCRIPT_FILENAME' => 
'D:\WebSites\cakephp-2.1.2\report_monitor\webroot\index.php',
'PHP_SELF' => '/report_monitor/index.php/scheduled_reports/showMonth',
'REQUEST_TIME_FLOAT' => (float) 1338835824.5241,
'REQUEST_TIME' => (int) 1338835824
)

So once again I am asking for help.  I hope I'm not getting orphaned due to 
using such an old server!

Thanks
Matt



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Object name collisions

2012-05-03 Thread Matt
Cool, sounds a bit like Tcl.

On Thursday, May 3, 2012 12:44:55 PM UTC-5, stork wrote:
>
> The answer is CakePHP 3.0 (namespaces) 
> http://cakephp.lighthouseapp.com/projects/42648/development-roadmap

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Object name collisions

2012-05-03 Thread Matt
Hi, I thought about posting this as a ticket at Lighthouse as a future 
"wish" item, but I'll post here instead.  One of the things that has 
bothered me about Cake has been that some of the built-in object names take 
names that would be very common for the user to want to use, for example 
"Model".  I was trying to whip up a quick demo for coworkers and created a 
database with automotive themed tables Makes, Models, Colors, and 
ColorsModels to show how "easy" it would be to do this in Cake.  Of course, 
after trying to bake I figured out that having a model named "Model" was 
probably not going to work!  Obviously my model "Model" was colliding with 
the base model.  Same thing happens if you want to create a model "Element" 
since the view folder Elements is for elements, or "Emails", etc...  
Obviously I can rename my models to not be the same as a built in, but it 
seems like a structural problem that is always going to cause issues with 
someone.  For example, future CakePHP versions could release a new object 
that collides with one I already have.  

My initial idea is that perhaps the built in objects should be prefixed so 
even if you use the same name (without the prefix) everything is happy.  So 
Model would be _Model, AppModel=_AppModel, AppController=_AppController, 
etc... and then the user is free to use any model name he wants.  Or is 
there another way to solve the problem that I am not aware of?

Thanks for your time!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Best IDE for CakePHP 2.1

2012-04-19 Thread Matt Murphy
@Greg Skerman:  Thank you!  Very useful.

MM

On Wed, Apr 18, 2012 at 11:14 PM, Greg Skerman  wrote:

> Netbeans for me. There are a few tricks required to get the code
> completion to work (especially in views) but nothing drastic.
>
> Has nice integration with subversion, unit testing, jira, etc. Code
> templates and code snippets are also nice. Free is a major bonus too.
>
> Have tried others (eclipse, komodo, Codelobster) and they didn't do it for
> me.
>
> To get Netbeans to code complete for you:
>
> 1) right click the project in the project explorer tree and select
> "properties"
> 2) go to PHP Include Path
> 3) add the cake folder to the include path and click OK
> 4) in all your models/controllers you need to add some helper properties
> to the doc comments so that netbeans is aware of what is going on:
> /**
>  * Registration Model
>  *
>  * @property Location $Location
>  * @property Status $Status
>  */
>
> This basically tells netbeans that when you go $this->Location to go
> looking at the Location model (since Location isn't defined in the class).
> Same goes for helpers/components/behaviors etc. The bake scripts actually
> add all this for you which is great.
>
> 5) in your views it gets a tiny bit trickier... before you use the $this
> variable in a view you need to place a comment immediately before it:
>
> /* @var $this View */
>
> After you do all that you get code completion/hints/suggestions
> everywhere. The core cake source is well commented and you can mine down
> into the entire class structure with ease.
>
> As for integrated cake console... what's wrong with opening up putty and
> having it running in the back ground all the time?
>
>
>
>
>
>
> On Thu, Apr 12, 2012 at 3:23 PM, Reza Talamkhani <
> reza.talamkh...@gmail.com> wrote:
>
>> Hi,
>> I Need an IDE for CakePHP 2.1 that integerated with cake console and
>> suggestion...
>> I test eclipse, netbeans & Codelobster but it did not meet any...
>>
>> Please help me to choose the best IDE.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to redirect two pages back?

2012-04-15 Thread Matt Murphy
You need to capture your post array for the form and feed it back into the
new loaded form.

Cheers,
Matt
On Sun, Apr 15, 2012 at 4:15 PM, Daniel  wrote:

> I am using the following code to go back a page, but the problem is
> that the action is an "add" one so it just goes back to an empty "add"
> form:
>
> if ($this->request->is('post')) {
>// blah blah ...
>if ($this->Inemail->save($this->request->data)) {
>// blah blah ...
>$this->redirect($this->referer());
>
> I think what I need to do is go back two pages.  Is this possible?
>
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
And that's the wrong URL.  I'm such a big help.

http://stackoverflow.com/questions/6802359/cakephp-with-phprtflite

M

On Sun, Jan 29, 2012 at 6:35 PM, Matt Murphy  wrote:
> Scratch that...
> Try:
> http://ask.cakephp.org/questions/view/phprtflite_with_cake
>
> M
> On Sun, Jan 29, 2012 at 3:01 PM, Matt Murphy  wrote:
>> There's LiveDocx. http://www.phplivedocx.org/.  I think it's in Beta.
>> I'm not sure if it will handle the header modification, but that's not
>> exactly rocket surgery...
>>
>> Cheers,
>> M
>>
>> On Sun, Jan 29, 2012 at 2:40 PM, supp...@deep-coding.net
>>  wrote:
>>> Hey,
>>>
>>> thanks for your reply.
>>> I totally forgot to say, that I am using Cakephp 2.
>>> I read the text from ur link, but I think theres only an example how
>>> to link to this file.
>>> I need to save the code from my layout .ctp to an .rtf file
>>> Do u know what I mean?
>>>
>>> Thanks
>>>
>>>
>>> On 29 Jan., 14:51, euromark  wrote:
>>>> what version are you using? that is the most crucial information when
>>>> asking for help^^
>>>>
>>>> anyway, for 2.x I use 
>>>> this:http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2/
>>>>
>>>> On 29 Jan., 13:28, "supp...@deep-coding.net" 
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> > Hey,
>>>>
>>>> > I have a problem, I have a layout for an .rtf file, called data.ctp,
>>>> > in this file I have my rtf code (I justed opened my rtf in editor and
>>>> > copied out the code...).
>>>> > And now I want to create a .rtf file in my controller and replace some
>>>> > vars from my template and then I want to save this, that the user can
>>>> > download this file and open it with Word.
>>>> > Can anyone help me please?
>>>>
>>>> > Thanks
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials 
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>>> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
Scratch that...
Try:
http://ask.cakephp.org/questions/view/phprtflite_with_cake

M
On Sun, Jan 29, 2012 at 3:01 PM, Matt Murphy  wrote:
> There's LiveDocx. http://www.phplivedocx.org/.  I think it's in Beta.
> I'm not sure if it will handle the header modification, but that's not
> exactly rocket surgery...
>
> Cheers,
> M
>
> On Sun, Jan 29, 2012 at 2:40 PM, supp...@deep-coding.net
>  wrote:
>> Hey,
>>
>> thanks for your reply.
>> I totally forgot to say, that I am using Cakephp 2.
>> I read the text from ur link, but I think theres only an example how
>> to link to this file.
>> I need to save the code from my layout .ctp to an .rtf file
>> Do u know what I mean?
>>
>> Thanks
>>
>>
>> On 29 Jan., 14:51, euromark  wrote:
>>> what version are you using? that is the most crucial information when
>>> asking for help^^
>>>
>>> anyway, for 2.x I use 
>>> this:http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2/
>>>
>>> On 29 Jan., 13:28, "supp...@deep-coding.net" 
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> > Hey,
>>>
>>> > I have a problem, I have a layout for an .rtf file, called data.ctp,
>>> > in this file I have my rtf code (I justed opened my rtf in editor and
>>> > copied out the code...).
>>> > And now I want to create a .rtf file in my controller and replace some
>>> > vars from my template and then I want to save this, that the user can
>>> > download this file and open it with Word.
>>> > Can anyone help me please?
>>>
>>> > Thanks
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
There's LiveDocx. http://www.phplivedocx.org/.  I think it's in Beta.
I'm not sure if it will handle the header modification, but that's not
exactly rocket surgery...

Cheers,
M

On Sun, Jan 29, 2012 at 2:40 PM, supp...@deep-coding.net
 wrote:
> Hey,
>
> thanks for your reply.
> I totally forgot to say, that I am using Cakephp 2.
> I read the text from ur link, but I think theres only an example how
> to link to this file.
> I need to save the code from my layout .ctp to an .rtf file
> Do u know what I mean?
>
> Thanks
>
>
> On 29 Jan., 14:51, euromark  wrote:
>> what version are you using? that is the most crucial information when
>> asking for help^^
>>
>> anyway, for 2.x I use 
>> this:http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2/
>>
>> On 29 Jan., 13:28, "supp...@deep-coding.net" 
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Hey,
>>
>> > I have a problem, I have a layout for an .rtf file, called data.ctp,
>> > in this file I have my rtf code (I justed opened my rtf in editor and
>> > copied out the code...).
>> > And now I want to create a .rtf file in my controller and replace some
>> > vars from my template and then I want to save this, that the user can
>> > download this file and open it with Word.
>> > Can anyone help me please?
>>
>> > Thanks
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using REST In CakePHP 2.0

2011-11-14 Thread Matt Kaufman
Me too.  It doesn't work the way that it does in 1.3.  

It used to work but does not in Cake 2.  Look at my mailing list posts from a 
few days ago on this topic.

Matt Kaufman
Http://mkfmn.com

Sent from my iPhone

On Nov 14, 2011, at 10:58 AM, Will <000w.s.s@gmail.com> wrote:

> Hi all,
> 
> I am trying to activate the REST functionality in CakePHP 2.0 for one
> of my models called "Employee".  In my controller, I have:
> 
> function index(){
>$this->set('employees', $this->paginate('Employee'));
> }
> 
> In my view for the XML (/app/View/Employees/xml/index.ctp), I have:
> 
> 
>$xml = Xml::build($employees);
>echo $xml->saveXML();
>?>
> 
> 
> I keep getting an "Invalid input.  Error: An Internal Error Has
> Occurred." message.  I looked through the code a bit and found that
> the Xml class appears to be expected an array with 1 and only one
> element and an alphanumeric key.  This makes me think that the example
> in the book (http://book.cakephp.org/2.0/en/development/rest.html?
> highlight=rest), which describes passing the result of $this->Recipe-
>> find('all') to Xml::build(), is wrong because $this->Recipe-
>> find('all') will return an array with numeric indices and multiple
> elements.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning

2011-11-07 Thread Matt Murphy
I think you're looking at a Microsoft regex issue.  That is the proper rule
for apache.  Although, I've not found use of ? to be mistaken in, to pick a
Microsoft Regex library at random, VBscript Regex 5.5.  I don't know what
is in use by ISAPI_rewrite.

Matt Murphy



On Mon, Nov 7, 2011 at 8:46 PM, Matt  wrote:

> Arrg
>
> This was the htaccess from my webroot:
>
> 
>RewriteEngine On
>RewriteCond %{REQUEST_FILENAME} !-d
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
> 
>
> The error is the ? after index.php.  I removed that and from the
> ISAPI_rewrite and it works.  The problem was that this is the file as
> distributed with Cake and I think Jose Lorenzo had used the same line
> in his comments so I wasn't sure which was correct.  So that brings up
> the question, should the "?" be in the distribution htaccess?  If not,
> then at least one thing will get fixed out of all this!
>
> Thanks for your patience!!!
>
>
> Thanks
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning

2011-11-07 Thread Matt
Arrg

This was the htaccess from my webroot:


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]


The error is the ? after index.php.  I removed that and from the
ISAPI_rewrite and it works.  The problem was that this is the file as
distributed with Cake and I think Jose Lorenzo had used the same line
in his comments so I wasn't sure which was correct.  So that brings up
the question, should the "?" be in the distribution htaccess?  If not,
then at least one thing will get fixed out of all this!

Thanks for your patience!!!


Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


CakePHP v2.0.2 on IIS 5.1 (Win2k) ISAPI_rewrite not functioning

2011-11-06 Thread Matt
I'm trying to get CakePHP 2 to work on an older laptop with Win2k/IIS
5.1.  Previous versions of CakePHP worked fine, 1.2, 1.3 but 2.0 isn't
working.  I think I've tried just about every combination (except the
correct one, of course!) Here is the htaccess from my webroot folder,
should be equal to the unmodified distribution file


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]


I would think this is the config I should have in ISAPI_rewrite

RewriteEngine on
RewriteBase /cake2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

And the base url is commented out in core.cfg

 //Configure::write('App.baseUrl', env('SCRIPT_NAME'));

This doesn't work, I just get some churning and then the Pages view
comes up no matter what url I type in (ex: cake2/widgets/index).  I
did some poking around in the core code and it appears it never reads
the url so it defaults to / every time.

The interesting thing is that I can't turn mod rewrite *off* either.
If I un-comment the baseUrl, and delete the 3 htaccess files, I get
the same page but with no css and this message:

URL rewriting is not properly configured on your server. 1) Help me
configure it 2) I don't / can't use URL rewriting

Inspecting the source shows that the link to the css is:

href="/cake2/matt/webroot/css/cake.generic.css"

when it should be:

href="/cake2/css/cake.generic.css"

So, all in all, I'm stuck. Luckily my Win7 computer at work is OK, but
my laptop is still running on Win2k.  It appears the new version of
cake wants the url to be 'localhost/cake2/index.php?/widgets/index'
while the previous versions wanted 'localhost/cake2/index.php?url=/
widgets/index' so something doesn't like the new format.

Any help would be appreciated. Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I hate CLI

2011-11-01 Thread Matt Murphy
The earlier messages were correct.  It is a parameter order option.

On Tue, Nov 1, 2011 at 7:02 AM, Ma'moon  wrote:

> Will you try without -R option
>
>
> On Tue, Nov 1, 2011 at 12:38 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> /Sites/mysitename/app
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 1 Nov 2011, at 10:33, Ma'moon wrote:
>>
>> Are you executing the command from the directory that contains the
>> webroot folder?, please run pwd to make sure of the location that you are
>> executing this command from
>>
>> On Tue, Nov 1, 2011 at 12:24 PM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> Running that command from app I get:
>>>
>>> chmod: -R: No such file or directory
>>>
>>> chmod a+rwX webroot/media/{transfer,filter} -R
>>>
>>> ... returns the same result too.
>>>
>>> The directories do exist.
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> Tel: +44 (0) 208 123 3822
>>> Mob: +44 (0) 7973 481949
>>> Skype: jeremy_burns
>>> http://www.classoutfit.com
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 1 Nov 2011, at 10:02, Ma'moon wrote:
>>>
>>> try this chmod a+rwX -R webroot/media/{transfer,filter}
>>>
>>> On Tue, Nov 1, 2011 at 11:26 AM, Jeremy Burns <
>>> jeremybu...@classoutfit.com> wrote:
>>>
 I'm a GUI man me. CLI stuff just makes me go blank. It's like staring
 into a black hole. Give me something I can point at and click and I'm
 a happy man.

 I'm following the tutorial for setting up David Persson's media
 plugin. Each time I run this:

 chmod -R a+rwX webroot/media/{transfer,filter}

 ... in Terminal I get this error:

 chmod: Invalid file mode: -R

 I have Googled but can't find the answer. Can any of you CLI junkies
 help me out please?

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and
 help others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php

>>>
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>> group at http://groups.google.com/group/cake-php
>>>
>>>
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>> group at http://groups.google.com/group/cake-php
>>>
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth password encryption

2011-10-21 Thread Matt Kaufman
It is very fast to crack MD5 hashed with any Nvidia Video card with a GPU chip 
on it or FPGA.

Matthew M. Kaufman
Http://mkfmn.com

1-503-881-6906

Sent from my iPhone

On Oct 21, 2011, at 10:49 AM, Nate  wrote:

> MD5 is only one way.  It cannot be reversed...However, it has been
> "cracked" and is considered insecure by itself.
> 
> Why? Rainbow tables have billions of hashes. They contain any and
> every password combination you can come up with. All an attacker has
> to do is take an MD5 hash and compare it to what's in a rainbow table
> - and that table will show you the original value (a password).
> 
> Here's a great analogy I learned:
> You're a chef and you make spaghetti and sauce. You serve the meal to
> 5 people. Those 5 people then add salt to their spaghetti.  No matter
> how hard you try, you will never re-create their modification to the
> meal. You don't know how much or how little they put on.
> 
> Hope that kinda clears things up :)
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 2.0 view folders naming convention

2011-10-21 Thread Matt Kaufman
Great; Ditch PHP 5 Standards too

Sent from my iPhone

On Oct 21, 2011, at 12:08 AM, Miles J  wrote:

> Oh my that is a god awful format. Looks like I am not upgrading.
> 
> On Oct 20, 11:28 pm, Andras Kende  wrote:
>> Directories Capitalized, files lowercase :)
>> 
>> Andras Kende
>> 
>> On Oct 21, 2011, at 1:18 AM, Miles J wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Wait, so is uppercase folder names for views standard now?
>> 
>>> :/
>> 
>>> Not upgrading if so.
>> 
>>> On Oct 20, 11:13 pm, Jeremy Burns | Class Outfit
>>>  wrote:
 How bad was my English/typing there? Poor form...let me redo that one.
>> 
 This is an upgraded application that I am working on that still has 
 remnants of old code. The users controller still contains var $name = 
 'User', which was causing the error. Worth pointing out for others who are 
 doing an upgrade as the upgrade shell didn't remove it.
>> 
 There, that's better.
>> 
 Jeremy Burns
 Class Outfit
>> 
 Tel: +44 (0) 208 123 3822
 Mob: +44 (0) 7973 481949
 Skype: jeremy_burnshttp://www.classoutfit.com
>> 
 Jeremy Burns
 Class Outfit
>> 
 http://www.classoutfit.com
>> 
 On 21 Oct 2011, at 07:03, Jeremy Burns | Class Outfit wrote:
>> 
> No caching enabled, but I worked it out.
>> 
> This is an upgraded application that I working that still lots of 
> remnants of old code. The users controller still var $name = 'User', 
> which was causing the error. Worth pointing out for others who are doing 
> an upgrade as the upgrade shell didn't remove it.
>> 
> Jeremy Burns
> Class Outfit
>> 
> http://www.classoutfit.com
>> 
> On 21 Oct 2011, at 06:54, Andras Kende wrote:
>> 
>> app/View/Users/add.ctp is correct.
>> 
>> Maybe cache is mixed up, try with debug=2  ..
>> 
>> Andras
>> 
>> On Oct 21, 2011, at 12:43 AM, Jeremy Burns wrote:
>> 
>>> In the tutorial, the add user form is called  (in other words, in a Users folder). When you run it the
>>> code complains that it can't find app/View/User/add.ctp (in other
>>> words, its looking in the User folder). The documentation around
>>> naming convention is not clear on this subject. Which is correct?
>> 
>>> --
>>> Our newest site for the community: CakePHP Video 
>>> Tutorialshttp://tv.cakephp.org
>>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
>>> others with their CakePHP related questions.
>> 
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this 
>>> group athttp://groups.google.com/group/cake-php
>> 
>> --
>> Our newest site for the community: CakePHP Video 
>> Tutorialshttp://tv.cakephp.org
>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
>> others with their CakePHP related questions.
>> 
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> athttp://groups.google.com/group/cake-php
>> 
> --
> Our newest site for the community: CakePHP Video 
> Tutorialshttp://tv.cakephp.org
> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
> others with their CakePHP related questions.
>> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php
>> 
>>> --
>>> Our newest site for the community: CakePHP Video 
>>> Tutorialshttp://tv.cakephp.org
>>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
>>> others with their CakePHP related questions.
>> 
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.0.0 release

2011-10-18 Thread Matt Kaufman
Awesome image!!! 

Sent from my iPhone

On Oct 18, 2011, at 12:05 PM, pedro rojo  wrote:

> hi zero  try this 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Fwd: Running Bake for Database Configuration File Setup

2011-10-17 Thread Matt Kaufman

> Hello,
> 
> I have always been worried about releases between Cake versions; however I 
> have/had/have the feeling that Cake 2.0 Stable is finally what I have been 
> waiting for: However, it is late at night and I am slightly tired [not 
> common]; and I just wanted to post this for documentation purposes.
> 
> Am I doing something stupid or is there a bug here?
> 
> root@mkfmnweb:/var/www/cake_2_0# ./lib/Cake/Console/cake bake
> 
> Welcome to CakePHP v2.0.0 Console
> ---
> App : app
> Path: /var/www/cake_2_0/app/
> ---
> Interactive Bake Shell
> ---
> [D]atabase Configuration
> [M]odel
> [V]iew
> [C]ontroller
> [P]roject
> [F]ixture
> [T]est case
> [Q]uit
> What would you like to Bake? (D/M/V/C/P/F/T/Q) 
> > D
> ---
> Database Configuration:
> ---
> Name:  
> [default] > 
> Driver: (Mysql/Postgres/Sqlite/Sqlserver) 
> [Mysql] > Mysql
> Persistent Connection? (y/n) 
> [n] > n
> Database Host:  
> [localhost] > 
> Port?  
> [n] > 
> User:  
> [root] > root
> Password:  
> > [removed]
> Database Name:  
> [cake] > cake_2_0
> Table Prefix?  
> [n] > n
> Table encoding?  
> [n] > n
> 
> ---
> The following database configuration will be created:
> ---
> Name: default
> Driver:   Mysql
> Persistent:   false
> Host: localhost
> User: root
> Pass: ***
> Database: cake_2_0
> ---
> Look okay? (y/n) 
> [y] > y
> Do you wish to add another database configuration?  
> [n] > n
> PHP Fatal error:  Class 'DATABASE_CONFIG' not found in 
> /var/www/cake_2_0/lib/Cake/Console/Command/Task/DbConfigTask.php on line 262
> 
> Fatal error: Class 'DATABASE_CONFIG' not found in 
> /var/www/cake_2_0/lib/Cake/Console/Command/Task/DbConfigTask.php on line 262
> root@mkfmnweb:/var/www/cake_2_0# 
> 
> 
> Am I running the correct path to bake or is this a bug?
> 
> Thanks.
> 
> Matthew M. Kaufman
> http://mkfmn.com/
> 
> 503-881-6906

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 2.0 Released

2011-10-16 Thread Matt Kaufman
Yes, Also --- Does this bring a lot of opportunity to come for rewriting and 
enhancing the quality of many of the major and or popular plugins out there for 
< 2.0 Stable?

I love the new file naming (Config/, etc,) and Structure of it entirely!

Matt Kaufman
http://mkfmn.com/

Sent from my iPhone

On Oct 16, 2011, at 10:40 PM, DerekGardiner  wrote:

> How long with cake 1.3* be supported? We've just spent a significant
> amount of time writing an application in 1.3* and would be gutted to
> find out if we have to port to 2.0 already.
> 
> On Oct 16, 11:40 pm, "O.J. Tibi"  wrote:
>> Yeah! Rave party everywhere for CakePHP 2.0! Wuzah!
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Lol- yeah I was taken back by this!  'good tip' is all I could come up with.

Sent from my iPhone

On Oct 4, 2011, at 5:46 PM, "Larry E. Masters"  wrote:

> You have got to be kidding me. You would not seriously suggest this to 
> someone would you?
> 
> --
> Larry E. Masters
> 
> 
> On Mon, Oct 3, 2011 at 11:34 PM, vaibhav pathak  
> wrote:
> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
>  vaibhav pathak
> 
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread Matt Kaufman
What is BOM?

Sent from my iPhone

On Oct 4, 2011, at 2:27 AM, BLABLABLA  wrote:

> HI..
> 
> The problem was the encoding. I have had the encoding UTF8, but needed the
> encoding UTF8 without BOM. 
> 
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
> Sent from the CakePHP mailing list archive at Nabble.com.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Nice tip

Sent from my iPhone

On Oct 3, 2011, at 9:34 PM, vaibhav pathak  wrote:

> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
> vaibhav pathak
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-03 Thread Matt Kaufman
Argh, I remember having this problem myself on a production deployment.

Thanks for the tip on debugkit

Sent from my iPhone
Matt Kaufman
http://mkfmn.com/

On Oct 3, 2011, at 6:14 PM, Sam Sherlock  wrote:

> It could be that you have some whitepace after a php closing tag (does the 
> cats controller have any whitespace before the opening of php - very first 
> line)
> 
> the debugkit plugin has a command to search for whitespace
>  - S
> 
> 
> 
> 
> On 1 October 2011 21:30, Dragana Kuzmanovic  wrote:
> failure:
> Warning (2): Cannot modify header information - headers already sent
> by (output started at /var/customers/webs/usr05/mkn151/app/controllers/
> categories_controller.php:1) [CORE/cake/libs/controller/controller.php
> 
> my controller:
>  class CategoriesController extends AppController {
>var $name = 'Categories';
>// Zugriff ohne Login
>function beforeFilter(){
>parent::beforeFilter();
>$this->Auth->allow('choosecategories');
>}
>// Liste der Kategorien
>function index() {
>$this->Category->recursive = 0;
>$this->set('categories', $this->paginate());
>}
>// Detailansicht
>function view($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie', 
> true));
>$this->redirect(array('action' => 'index'));
>}
>$this->set('category', $this->Category->read(null, $id));
>}
>// Kategorie hinzufügen
>function add() {
>if (!empty($this->data)) {
>$this->Category->create();
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie konnte 
> nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie bearbeiten
>function edit($id = null) {
>if (!$id && empty($this->data)) {
>$this->Session->setFlash(__('Ungültige Kategorie', 
> true));
>$this->redirect(array('action' => 'index'));
>}
>if (!empty($this->data)) {
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie konnte 
> nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>if (empty($this->data)) {
>$this->data = $this->Category->read(null, $id);
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie löschen
>function delete($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie Id', 
> true));
>$this->redirect(array('action'=>'index'));
>}
>if ($this->Category->delete($id)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gelöscht.', true));
>$this->redirect(array('action'=>'index'));
>}
>$this->Session->setFlash(__('Kategorie wurden nicht gelöscht.',
> true));
>$this->redirect(array('action' => 'index'));
>}
>// Kategorien auswählen
>function choosecategories() {
>//S

Re: Which is the better IDE for cakePHP?

2011-09-26 Thread Matt Kaufman
I love the Padre IDE for Perl.  Can someone build a Cake plugin on top of its 
Php plugin? 

Matt Kaufman
Http://mkfmn.com/

Sent from my iPhone

On Sep 26, 2011, at 12:16 PM, Hugo M  wrote:

> NetBeans is nice.
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: best open source development software 2011

2011-09-23 Thread Matt Kaufman
Cool, Thanks for the (translation?) and Great post!

Sent from my iPhone

On Sep 23, 2011, at 2:22 PM, euromark  wrote:

> the German magazine "computerwoche" (computer week) just announced
> cakephp the best "Best of Open Source 2011" this year:
> http://www.computerwoche.de/software/software-infrastruktur/2495763/index2.html
> 
> quick google translation:
> "Among the PHP web framework CakePHP offered according to Infoworld,
> the best balance between quantity of features and ease of use. CakePHP
> applications require only minimal configuration effort and the
> excellent selection of command-line tools reduces the time required to
> build an application to a minimum. That means the only configuration
> step is to define the connection parameters to the database server.
> Cake PHP assigns to the models database tables and creates the
> framework methods. If desired, tests can even be created for
> individual areas.
> CakePHP offers shortcuts for code reuse, helpers that simplify the use
> of AJAX, and recommendations for securing your Web page. It is thus
> clear why delighted Cake PHP in the user community so popular."
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp screws up all other php work

2011-09-18 Thread Matt Murphy
...Exactly as Larry puts it.  I'd suggest you play with *any* new
framework out of your webroot directory, which will have the salutary
effect of forcing you to learn how to use some aspect of .htaccess
files (because you'll need to do a RewriteBase directive for that
directory with cakephp, for example).

Matt Murphy
On Sat, Sep 17, 2011 at 7:02 PM, Larry E. Masters  wrote:
> CakePHP did not screw it up, check for the .htaccess file you probably left
> behind when you deleted to code. The "error" message tells you exactly what
> you need to do and gives you the basic code you need to copy and paste it
> into the file that you are being told to create.
> --
> Larry E. Masters
>
> On Sat, Sep 17, 2011 at 11:38 AM, rhkennerly  wrote:
>>
>> system is MBP/OSX/MAMP all latest updates
>>
>> a customer wanted me to look at a CakePHP product he was evaluating.
>> Once I installed CakePHP in the root of localhost, all I get for any
>> other production in php on localhost is internal 500 errors. I can fix
>> this by removing cake and mamp restarting and reinstalling mamp, but
>> there has to be a way to coexist that I am just not getting.
>>
>> While I have your attention, I'm also getting a CakePHP error that I
>> don't know how to fix
>>
>>
>> Missing Controller
>>
>> Error: CoopController could not be found.
>>
>> Error: Create the class CoopController below in file: app/Controller/
>> CoopController.php
>>
>> > class CoopController extends AppController {
>>
>> }
>> ?>
>>
>> This file does not exist in the code at all.  What am I missing?
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-12 Thread Matt Murphy
Ah. Well, in that case,I'd look into the particulars of the
Suhosin-Patch.  That seems a very likely culprit.

M

On Mon, Sep 12, 2011 at 7:59 PM, Tom Belknap  wrote:
> Apache/2.2.8 (Ubuntu) DAV/2 PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch
> Cake 1.3.11
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-12 Thread Matt Murphy
Or perhaps thats just the error dump format.  Hmm.

M

On Mon, Sep 12, 2011 at 8:15 AM, Matt Murphy  wrote:
> Although, your title has 3 dots instead of two and that alone would
> screw your fopen up.  I assume that's just a typo?
>
> M
>
> On Mon, Sep 12, 2011 at 8:14 AM, Matt Murphy  wrote:
>> If this wasn't your server, I'd check to see the status of the PHP
>> value allow_url_fopen.
>>
>> M
>>
>> On Sun, Sep 11, 2011 at 10:37 PM, Tom Belknap
>>  wrote:
>>> Hmm... No luck, any other ideas? I've been using CakePHP for over a year and
>>> never had this problem. I upgraded to the latest version of CakePHP, maybe
>>> that's the problem, somehow? But I don't have a similar problem on my dev
>>> server, so that's strange.
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
>>> http://groups.google.com/group/cake-php
>>>
>>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-12 Thread Matt Murphy
Although, your title has 3 dots instead of two and that alone would
screw your fopen up.  I assume that's just a typo?

M

On Mon, Sep 12, 2011 at 8:14 AM, Matt Murphy  wrote:
> If this wasn't your server, I'd check to see the status of the PHP
> value allow_url_fopen.
>
> M
>
> On Sun, Sep 11, 2011 at 10:37 PM, Tom Belknap
>  wrote:
>> Hmm... No luck, any other ideas? I've been using CakePHP for over a year and
>> never had this problem. I upgraded to the latest version of CakePHP, maybe
>> that's the problem, somehow? But I don't have a similar problem on my dev
>> server, so that's strange.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
>> http://groups.google.com/group/cake-php
>>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-12 Thread Matt Murphy
If this wasn't your server, I'd check to see the status of the PHP
value allow_url_fopen.

M

On Sun, Sep 11, 2011 at 10:37 PM, Tom Belknap
 wrote:
> Hmm... No luck, any other ideas? I've been using CakePHP for over a year and
> never had this problem. I upgraded to the latest version of CakePHP, maybe
> that's the problem, somehow? But I don't have a similar problem on my dev
> server, so that's strange.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Email Question

2011-08-19 Thread Matt Murphy
Perfection.  Well, as much perfection as we're allowed, anyway.  Maybe
tack on a BS image extension to the messageID that you lop off before
processing in order to complete the illusion.  I am quite sure that
will be permissible with default a default .htaccess file.

Oh, the call to get the image.  We need actual image file contents and
a proper image header:
in the action:
$this->view->image = file_get_contents($realimageURL);
I may be hosing that object reference.  Get the file contents into a
view object property.  Sorry, I'm rusty on my cakephp.
...and then maybe a view with the following might do it:
image?>
but i may be wrong about being able to set the header in the view. so
you may just want to cheat and do:
(in the action again)
header('content-type: image/png'); //assuming png image here
echo file_get_contents($realimageURL); //whatever that is -- this will
be a live web url
exit;

which is maybe a little kludgy, but will absolutely positively maybe work.

M
On Sat, Aug 20, 2011 at 12:28 AM, Krissy Masters
 wrote:
>
> Yeah I figured with all the email clients security settings saying "click 
> here to download images in the message" type stuff there is no guarantee the 
> image would be pulled. But for now some information on the ones who do is 
> better than none at all.
>
>
>
> So my next question is how do I go about this? How do I turn the fetching of 
> an image into a function thru the url? something like this in the HTML email 
> 
>
>
>
>  and then that url would hit message controller
>
>
>
> fetch($message_id ){
>
> do the record keeping based on the message id
>
>
>
> return '/images/the_image.jpg';
>
> }
>
>
>
> Am I far off here?
>
>
>
> Thanks everyone,
>
>
>
> K
>
>
>
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf 
> Of Matt Murphy
> Sent: Friday, August 19, 2011 7:12 PM
> To: cake-php@googlegroups.com
> Subject: Re: Email Question
>
>
>
> In an HTML layout, you can reference an image calling to a unique image URL.  
> When that gets hit in your logs, you know they opened it.  Unfortunately, 
> they might not display images, because this is a classic way to confirm that 
> an email is active employed by spambots, but it's the best *automatic* method 
> I know of.
>
> I'm eager to hear what everyone else has!
>
> Matt Murphy
>
> On Fri, Aug 19, 2011 at 5:15 PM, Krissy Masters  
> wrote:
>
> I am sending out emails and I want to know that the person has opened it. How 
> does one go about this? I have a link in the email they can click to view in 
> browser and I can tell when that happens but as for straight email viewing 
> I'm stumped.
>
> Not much detail in the question but I figure its rather straight to the point 
> J
>
>
>
> Thanks everyone as I wait in anticipation for any help.
>
>
>
> K
>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Email Question

2011-08-19 Thread Matt Murphy
True.  But I find myself wondering how to request a return receipt in
cake-php.  I've not mucked about with php email classes in a while, but I
can't remember seeing one that supported it.  Is it something people are
implementing these days?

MM

On Fri, Aug 19, 2011 at 5:53 PM, Zaky Katalan-Ezra wrote:

> I think you need to use some desktop client that support "read receipt" in
> order to do that
>
>
> On Sat, Aug 20, 2011 at 12:15 AM, Krissy Masters <
> naked.cake.ba...@gmail.com> wrote:
>
>>  I am sending out emails and I want to know that the person has opened
>> it. How does one go about this? I have a link in the email they can click to
>> view in browser and I can tell when that happens but as for straight email
>> viewing I'm stumped.
>>
>> Not much detail in the question but I figure its rather straight to the
>> point J
>>
>> ** **
>>
>> Thanks everyone as I wait in anticipation for any help.
>>
>> ** **
>>
>> K
>>
>> ** **
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Email Question

2011-08-19 Thread Matt Murphy
that was image TAG calling to a unique image url...
On Fri, Aug 19, 2011 at 5:42 PM, Matt Murphy  wrote:

> In an HTML layout, you can reference an image calling to a unique image
> URL.  When that gets hit in your logs, you know they opened it.
> Unfortunately, they might not display images, because this is a classic way
> to confirm that an email is active employed by spambots, but it's the best
> *automatic* method I know of.
>
> I'm eager to hear what everyone else has!
>
> Matt Murphy
>
>
> On Fri, Aug 19, 2011 at 5:15 PM, Krissy Masters <
> naked.cake.ba...@gmail.com> wrote:
>
>>  I am sending out emails and I want to know that the person has opened
>> it. How does one go about this? I have a link in the email they can click to
>> view in browser and I can tell when that happens but as for straight email
>> viewing I'm stumped.
>>
>> Not much detail in the question but I figure its rather straight to the
>> point J
>>
>> ** **
>>
>> Thanks everyone as I wait in anticipation for any help.
>>
>> ** **
>>
>> K
>>
>> ** **
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Email Question

2011-08-19 Thread Matt Murphy
In an HTML layout, you can reference an image calling to a unique image
URL.  When that gets hit in your logs, you know they opened it.
Unfortunately, they might not display images, because this is a classic way
to confirm that an email is active employed by spambots, but it's the best
*automatic* method I know of.

I'm eager to hear what everyone else has!

Matt Murphy

On Fri, Aug 19, 2011 at 5:15 PM, Krissy Masters
wrote:

>  I am sending out emails and I want to know that the person has opened it.
> How does one go about this? I have a link in the email they can click to
> view in browser and I can tell when that happens but as for straight email
> viewing I'm stumped.
>
> Not much detail in the question but I figure its rather straight to the
> point J
>
> ** **
>
> Thanks everyone as I wait in anticipation for any help.
>
> ** **
>
> K
>
> ** **
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Do you have Paypal Credit Card Payment Gateway code in php

2011-08-09 Thread Matt Murphy
Paypal has it extensive examples in several languages.  I've seen CakePHP
developers just directly include their PHP-SDK, in fact.  Go to Paypal's dev
site and make an account -- you'll need it for your API login anyway.

MM

On Wed, Aug 10, 2011 at 12:30 AM, rrvasanth wrote:

> Dear Friends,
>
>  Any body have sample paypal credit card payment code in php ...?
>
> Thanks
> Vasanth
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: submitting empty form gives HTTP 404 page not found error

2011-08-04 Thread Matt Murphy
Your view can run some javascript to prevent submission unless the form is
filled out.  The javascript event is onsubmit().  Are you using a javascript
framework or will you only have bare javascript?

M

On Thu, Aug 4, 2011 at 6:49 AM, varai  wrote:

> Hi,
>
> How do I prevent my user from submitting an empty form?
> When I do that, I'm getting a HTTP 404 not found error in IE and a
> blank page in Firefox.
> None of the validation errors are showing up.
>
> I even tried putting an else stmt in the StudentsController's add
> function and that too is not firing. Nothing shows up for
> die(debug($this->Student->validationErrors)) either:
>
> [CODE]if (!empty($this->data)){
>[COLOR="red"]die(debug($this->Student->validationErrors)); [/COLOR]
> $student=$this->Student->saveAll($this->data);
>
>if (!empty($student))
>   {
> $this->Session->setFlash('Your child\'s admission has been
> received. We will send you an email shortly.');
>
>  $this->redirect(array('controller'=>'pages',
> 'action'=>'home'));
>
>}
> else{
> [COLOR="Red"]$this->Session->setFlash(__('Your admission could
> not be saved. Please, try again.', true));[/COLOR]
>   }
>  } //for if (!empty
> [/CODE]
>
> thank you.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: how to convert data from controller to xml format in view

2011-07-25 Thread Matt Murphy
Good find!

On Mon, Jul 25, 2011 at 8:17 PM, taq  wrote:

> this is answer
>
> http://www.ninjacodermonkey.co.uk/2010/11/cakephp-array-to-xml-from-within-controller/
>
> On Jul 26, 6:56 am, taqman filler  wrote:
> > hello I'm new of cake
> > I need snippet to display data form controller in xml format
> > I  know is use xml helper but I don't understand example in book
> > some body can example to teach me pls
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Please help with htaccess

2011-07-05 Thread Matt Murphy
If you have a RewriteBase in your .htaccess files in /cake/ /cake/app/ and
/cake/app/webroot/ you'll need to be sure (after the move) that they no
longer refer to /cake/.  I think that's all that matters in .htaccess --
provided you don't have any references to /cake in your redirects.

As for other  references, may I suggest doing a big grep for all instances
of "/cake" in your files.  Maybe do it on a sql dump of your database as
well.  Cakephp won't have it, but you may have put it in your app or data.
Grep it, and change what needs to be changed.

MM

On Tue, Jul 5, 2011 at 9:36 AM, heohni  wrote:

> Hi,
>
> my webserver structure is
>
> root/cake/app/ <- here are all my files
>
> My url is: mydoain.com/cake/
>
> How and what can I change to get the entire project also under the
> domain
> mydoain.com/
> ?
>
> IO think I read once about it, I think I have to change the /cake/app/
> webroot/.htaccess file, but I cant find this information anymore and
> are quite unsure about it.
>
> Please advice!
> Thanks
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: application not Caching , why ?

2011-07-05 Thread Matt Murphy
Threat:  So long as you don't have anything that uploads, you'll be OK.
It's only a problem if someone can place a file.  If they can't, you can't
be hurt.  Review what you have installed...  Good luck!

MM

On Tue, Jul 5, 2011 at 12:43 PM, Ritesh R Aryal wrote:

> Thank you for your suggestion.
> Yes, u r right, it is shared hosting.
> But it may cause the security risk. IF I assign the folder permission
> as 0777 the any one hack.
> So, worrying about it.
>
>
>
> On Jul 4, 1:34 pm, Matt Murphy  wrote:
> > Your're probably on shared hosting.  You log in as X, Apache runs as Y.
>  It
> > needs the "others" "write" bit set if it is to write to the filesystem.
> >
> > Or that's my best guess...
> >
> > MM
> > On Mon, Jul 4, 2011 at 7:12 AM, Ritesh R Aryal  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi everyone,
> >
> > > My application is not caching why ?
> >
> > > What could be the reason. If the permission of the tmp folder set to
> > > 0777 then it does caching and if it is set to 0755 it stop caching.
> >
> > > Furthermore, my application is creating a text file into server and it
> > > has stop working dont know why. If i set the permission to 0777 then
> > > it works straight away otherwise not.
> >
> > > WHAT COULD BE THE BEST SOLUTION ON CAKE ??
> >
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > > others with their CakePHP related questions.
> >
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cacheQueries and memory usage

2011-07-04 Thread Matt Murphy
Ugh!  But bear in mind that cakePHP (and all MVCs -- or at least all the
ones using 'Active Record') attempt to keep as much database logic in the
background and still in PHP as possible.  That's *not* a large capacity
environment, when compared to MySQL itself.  Do you have any interest in
investigating a MySQL stored procedure as an alternative?   I have exactly 0
experience with this sort of thing in MySQL, but I have found occasion in
MSSQL to do this -- usually to get memory-intensive work *out* of my page
and into the DB server.
I'd imagine a custom model built to access such a construct would be fairly
trim...

MM

On Mon, Jul 4, 2011 at 9:21 AM, DanielMedia  wrote:

> I definitely would have been ok with just using the query() method.
> The problem is that the save() method also accumulates memory in each
> iteration. I ran the script for a while with the save() method
> commented out and the memory remained low and constant. Once I try to
> save, the memory jumps up again on each iteration. I was hoping I
> wouldn't have to write a huge SQL statement for the save as well.
> Kinda goes against the whole point of using CakePHP to begin with  : (
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cacheQueries and memory usage

2011-07-04 Thread Matt Murphy
I  mean, I get the urge to keep things canonically correct!  But you're
parsing 5M records from a file.  You're outside the bell curve, so to speak.

M

On Mon, Jul 4, 2011 at 9:15 AM, Matt Murphy  wrote:

> Yeah... Looks like you've run up against the limits of the native Model,
> DEFINITELY of findall() -- possibly of the "Active Record" pattern itself.
> If there's a sensible way to do it, you could LIMIT your returns and work
> your way through the whole set piece by piece...  But if your use of query()
> is working, then why bother doing something else?
>
> M
>
>
> On Mon, Jul 4, 2011 at 9:06 AM, DanielMedia wrote:
>
>> The data file has a little over 5 million records.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cacheQueries and memory usage

2011-07-04 Thread Matt Murphy
Yeah... Looks like you've run up against the limits of the native Model,
DEFINITELY of findall() -- possibly of the "Active Record" pattern itself.
If there's a sensible way to do it, you could LIMIT your returns and work
your way through the whole set piece by piece...  But if your use of query()
is working, then why bother doing something else?

M

On Mon, Jul 4, 2011 at 9:06 AM, DanielMedia  wrote:

> The data file has a little over 5 million records.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cacheQueries and memory usage

2011-07-04 Thread Matt Murphy
How big is the data file?

MM

On Mon, Jul 4, 2011 at 8:55 AM, DanielMedia  wrote:

> Here's the entire shell script if that helps:
>
> 
> class ParseCusipAttributesTask extends Shell {
>
>var $uses = array('MasterIssue');
>
>function execute($args = array()) {
>
>$file = '/home/dan/cusip_master/CUMASTER_ATTRIBUTE.PIP';
>
>$record_count = explode(' ', exec("wc -l $file"));
>$record_count = number_format($record_count[0]);
>
>$handle = @fopen($file, 'r');
>
>if($handle) {
>
>$i = 0;
>
>while(!feof($handle)) {
>
>$buffer = fgets($handle, 4096);
>
>$segments = explode('|', $buffer);
>
>$cusip_prefix = $segments[0] . $segments[1];
>
>$data = array();
>$data['MasterIssue']['alternative_min_tax']
> = $segments[2];
>$data['MasterIssue']['bank_q'] =
> $segments[3];
>$data['MasterIssue']['callable'] =
> $segments[4];
>$data['MasterIssue']['activity_date'] =
> $segments[5];
>$data['MasterIssue']['first_coupon_date'] =
> $segments[6];
>$data['MasterIssue']['init_pub_off'] =
> $segments[7];
>$data['MasterIssue']['payment_frequency'] =
> $segments[8];
>$data['MasterIssue']['currency_code'] =
> $segments[9];
>$data['MasterIssue']['domicile_code'] =
> $segments[10];
>$data['MasterIssue']['underwriter'] =
> $segments[11];
>$data['MasterIssue']['us_cfi_code'] =
> $segments[12];
>$data['MasterIssue']['closing_date'] =
> $segments[13];
>$data['MasterIssue']['ticker_symbol'] =
> $segments[14];
>$data['MasterIssue']['iso_cfi'] =
> $segments[15];
>$data['MasterIssue']['depos_eligible'] =
> $segments[16];
>$data['MasterIssue']['pre_refund'] =
> $segments[17];
>$data['MasterIssue']['refundable'] =
> $segments[18];
>$data['MasterIssue']['remarketed'] =
> $segments[19];
>$data['MasterIssue']['sinking_fund'] =
> $segments[20];
>$data['MasterIssue']['taxable'] =
> $segments[21];
>$data['MasterIssue']['form'] =
> $segments[22];
>$data['MasterIssue']['enhancements'] =
> $segments[23];
>$data['MasterIssue']['fund_distrb_policy'] =
> $segments[24];
>$data['MasterIssue']['fund_inv_policy'] =
> $segments[25];
>$data['MasterIssue']['fund_type'] =
> $segments[26];
>$data['MasterIssue']['guarantee'] =
> $segments[27];
>$data['MasterIssue']['income_type'] =
> $segments[28];
>$data['MasterIssue']['insured_by'] =
> $segments[29];
>$data['MasterIssue']['ownership_restr'] =
> $segments[30];
>$data['MasterIssue']['payment_status'] =
> $segments[31];
>$data['MasterIssue']['preferred_type'] =
> $segments[32];
>$data['MasterIssue']['putable'] =
> $segments[33];
>$data['MasterIssue']['rate_type'] =
> $segments[34];
>$data['MasterIssue']['redemption'] =
> $segments[35];
>$data['MasterIssue']['source_doc'] =
> $segments[36];
>$data['MasterIssue']['sponsoring'] =
> $segments[37];
>$data['MasterIssue']['voting_rights'] =
> $segments[38];
>$data['MasterIssue']['warrant_assets'] =
> $segments[39];
>$data['MasterIssue']['warrant_status'] =
> $segments[40];
>$data['MasterIssue']['warrant_type'] =
> $segments[41];
>$data['MasterIssue']['where_traded'] =
> $segments[42];
>$data['MasterIssue']['auditor'] =
> $segments[43];
>$data['MasterIssue']['paying_agent'] =
> $segments[44];
>$data['MasterIssue']['tender_agent'] =
> $segments[45];
>$data['MasterIssue']['xfer_agent'] =
> $segments[46];
>$data['MasterIssue']['bond_counsel'] =
> $segments[47];
>   

Re: application not Caching , why ?

2011-07-04 Thread Matt Murphy
Hmm.  I should continue briefly.  If I'm correct, you need either 6 or 7 on
the last number... If I'm wrong and you share a group with apache, then it's
the middle number that matters, so 766 or 777 for those parts of the app
that must be modified by apache. (cache directory, any location you plan to
upload to via http, etc)

MM

On Mon, Jul 4, 2011 at 8:34 AM, Matt Murphy  wrote:

> Your're probably on shared hosting.  You log in as X, Apache runs as Y.  It
> needs the "others" "write" bit set if it is to write to the filesystem.
>
> Or that's my best guess...
>
> MM
>
> On Mon, Jul 4, 2011 at 7:12 AM, Ritesh R Aryal 
> wrote:
>
>> Hi everyone,
>>
>> My application is not caching why ?
>>
>> What could be the reason. If the permission of the tmp folder set to
>> 0777 then it does caching and if it is set to 0755 it stop caching.
>>
>> Furthermore, my application is creating a text file into server and it
>> has stop working dont know why. If i set the permission to 0777 then
>> it works straight away otherwise not.
>>
>> WHAT COULD BE THE BEST SOLUTION ON CAKE ??
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: application not Caching , why ?

2011-07-04 Thread Matt Murphy
Your're probably on shared hosting.  You log in as X, Apache runs as Y.  It
needs the "others" "write" bit set if it is to write to the filesystem.

Or that's my best guess...

MM
On Mon, Jul 4, 2011 at 7:12 AM, Ritesh R Aryal wrote:

> Hi everyone,
>
> My application is not caching why ?
>
> What could be the reason. If the permission of the tmp folder set to
> 0777 then it does caching and if it is set to 0755 it stop caching.
>
> Furthermore, my application is creating a text file into server and it
> has stop working dont know why. If i set the permission to 0777 then
> it works straight away otherwise not.
>
> WHAT COULD BE THE BEST SOLUTION ON CAKE ??
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using CakePHP for the first time

2011-06-04 Thread Matt Murphy
Obviously, some of this response is useless to you, as you didn't give an
address as he believes and the path you provided was from an error dump...
However, he is of the opinion that you're loading something in the library
tree itself, which is clearly sort of correct.  Since (i'm guessing) you
don't have a theme in your own tree, you're loading the theme from the
library (the fallback choice).  Hopefully, you're not pointing at your cake
tree directly.  Maybe take a moment to be sure you aren't (IE he's right
about this being a problem if you are).
I still suspect you have some sort of incorrectly defined (path) constant,
even if it isn't one of the ones I thought it was.

M

On Sat, Jun 4, 2011 at 1:05 PM, kdubya  wrote:

> In the error message you gave, it looks like you entered the address
> of the view file (home.ctp) directly - this is incorrect for an
> application built with CakePHP. It should have been something like:
> http://localhost//home
>
> Note: there is no .ctp extension. CakePHP knows where to find the .ctp
> file (if you have configured the app correctly).
>
> It also looks like you tried to access the home.ctp in CakePHP core
> path. This also is not correct. If you are modifying files under cake/
> libs you are making your changes in the wrong place. All files you
> modify should be under app/ e.g.
> C:\Users\Public\public_html\\app\views
> \\home.ctp
> (assuming that you Document_root in your Apache httpd.conf file is C:
> \Users\Public\public_html\
>
> Go back to the Book on the CakePHP site and read it from the
> beginning:
> http://book.cakephp.org/
>
> Also, I highly recommend you follow the blog tutorial:
> http://book.cakephp.org/#!/view/1528/Blog
>
> Use the resources that have been provided to get off on the right
> foot.
>
> Good luck,
> Ken
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using CakePHP for the first time

2011-06-03 Thread Matt Murphy
I'm thinking you are not including the cake library correctly.  I'm thinking
you should check the actual location of your cake library against
CAKE_CORE_INCLUDE_PATH and CAKE_CORE.

MM

On Fri, Jun 3, 2011 at 7:08 AM, Dominik Gajewski  wrote:

> Are you sure that you set correctly .htaccess file?
>
> 2011/6/2 larawebworks :
> > Hello there,
> > I welcome myself to the group and write away a run into trouble. I
> > can't tell what I did wrong but here is the error I get, trying to
> > load the cake index from my localhost with my apache server. Note that
> > I have the latest version of Apache, PHP and MySQL. I have completed
> > and tested more than once project using my local server so I can't
> > think that is the reason for my error.
> > Any help?
> >
> > Fatal error: Class 'Debugger' not found in C:\Users\Public\public_html
> > \cakephp\cake\libs\view\pages\home.ctp on line 26
> >
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> > Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
> >
> >
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
> >
>
>
>
> --
> Pozdrawiam
> Dominik Gajewski
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Welcome Page not finding CSS/Images

2011-05-15 Thread Matt Murphy
Do post it!  I'm most curious and it will surely help the next guy...

On Sun, May 15, 2011 at 5:51 PM, Marco Pais  wrote:

> Hehe, thanks anyway. I'll struggle until I find something..
>
>
> 2011/5/15 Matt Murphy 
>
>> Cogent.  You, sir, have stumped the chump!
>>
>> Sorry :(  out of ideas.  If I find something, I'll reply again.
>>
>> MM
>>
>>
>> On Sun, May 15, 2011 at 5:47 PM, Marco Pais  wrote:
>>
>>> Yep, is on and is All. Plus, some configurations that I've made on these
>>> 3 files resulted on Internal Errors, i.e, this .htaccess files are making
>>> effect,,,
>>>
>>>
>>> 2011/5/15 Matt Murphy 
>>>
>>>> What's the AllowOverrides setting for the vhost this thing is on?  Maybe
>>>> try it on All?
>>>>
>>>> MM
>>>>
>>>>
>>>> On Sun, May 15, 2011 at 5:15 PM, Marco Pais wrote:
>>>>
>>>>> Thanks again Matt.
>>>>>
>>>>> I've tried several configs of the 3 .htaccess files. Right now, I have
>>>>> cakephp in a subdirectory of htdocs:
>>>>>
>>>>>- htdocs - c:\xampp\htdocs
>>>>>- cake site - c:\xampp\htdocs\subdir\cakephp
>>>>>
>>>>> So, my 3 .htaccess files follows like this:
>>>>>
>>>>> --- subdir/cakephp/.htaccess 
>>>>>
>>>>> 
>>>>>RewriteEngine on
>>>>>RewriteBase /subdir/cakephp/
>>>>>RewriteRule^$ app/webroot/[L]
>>>>>RewriteRule(.*) app/webroot/$1 [L]
>>>>> 
>>>>>
>>>>> --- subdir/cakephp/app/.htaccess ----
>>>>>
>>>>> 
>>>>> RewriteEngine on
>>>>> RewriteBase /subdir/cakephp/app/
>>>>> RewriteRule^$ webroot/[L]
>>>>> RewriteRule(.*) webroot/$1[L]
>>>>>  
>>>>>
>>>>> --- subdir/cakephp/app/webroot/.htaccess 
>>>>>
>>>>> 
>>>>> RewriteEngine On
>>>>> RewriteBase /subdir/cakephp/app/webroot/
>>>>> RewriteCond %{REQUEST_FILENAME} !-d
>>>>> RewriteCond %{REQUEST_FILENAME} !-f
>>>>> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>>>>> 
>>>>>
>>>>> It doesn't work :(
>>>>>
>>>>> 2011/5/15 Matt Murphy 
>>>>>
>>>>>> you could try adding a RewriteBase for each .htaccess file of the 3
>>>>>> index directories which directs to that directory.  (again, / /app, and
>>>>>> /app/webroot).
>>>>>> Might need terminating slashes...  Can't remember.
>>>>>>
>>>>>> MM
>>>>>> On Sun, May 15, 2011 at 4:44 PM, marcopais wrote:
>>>>>>
>>>>>>>  Yes, .htaccess files are there. Plus, I have tried without
>>>>>>> mod_rewrite, as explained 
>>>>>>> here<http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_rewrite/>
>>>>>>>  (is
>>>>>>> somewhere on cakephp book also), but no luck.
>>>>>>>
>>>>>>> I read that, although this problem is mainly caused by mod_rewrite
>>>>>>> issues, it can happen also due to some other problems, like whitespaces.
>>>>>>>
>>>>>>> 2011/5/15 Matt Murphy [via CakePHP] <[hidden 
>>>>>>> email]<http://user/SendEmail.jtp?type=node&node=4398501&i=0>
>>>>>>> >
>>>>>>>
>>>>>>>  You may have failed to transfer the hidden files, namely .htaccess.
>>>>>>>> -- the relevant ones live in / /app and /app/webroot.  Are they there?
>>>>>>>>
>>>>>>>> MM
>>>>>>>>
>>>>>>>> On Sun, May 15, 2011 at 4:22 PM, marcopais <[hidden 
>>>>>>>> email]<http://user/SendEmail.jtp?type=node&node=4398497&i=0>
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Hi there, Sorry to undig this old thread, but I'm running exactly
>>>>>>>>> the same problem as @ajoberstar. My

Re: Welcome Page not finding CSS/Images

2011-05-15 Thread Matt Murphy
Cogent.  You, sir, have stumped the chump!

Sorry :(  out of ideas.  If I find something, I'll reply again.

MM

On Sun, May 15, 2011 at 5:47 PM, Marco Pais  wrote:

> Yep, is on and is All. Plus, some configurations that I've made on these 3
> files resulted on Internal Errors, i.e, this .htaccess files are making
> effect,,,
>
>
> 2011/5/15 Matt Murphy 
>
>> What's the AllowOverrides setting for the vhost this thing is on?  Maybe
>> try it on All?
>>
>> MM
>>
>>
>> On Sun, May 15, 2011 at 5:15 PM, Marco Pais  wrote:
>>
>>> Thanks again Matt.
>>>
>>> I've tried several configs of the 3 .htaccess files. Right now, I have
>>> cakephp in a subdirectory of htdocs:
>>>
>>>- htdocs - c:\xampp\htdocs
>>>- cake site - c:\xampp\htdocs\subdir\cakephp
>>>
>>> So, my 3 .htaccess files follows like this:
>>>
>>> --- subdir/cakephp/.htaccess 
>>>
>>> 
>>>RewriteEngine on
>>>RewriteBase /subdir/cakephp/
>>>RewriteRule^$ app/webroot/[L]
>>>RewriteRule(.*) app/webroot/$1 [L]
>>> 
>>>
>>> --- subdir/cakephp/app/.htaccess 
>>>
>>> 
>>> RewriteEngine on
>>> RewriteBase /subdir/cakephp/app/
>>> RewriteRule^$ webroot/[L]
>>> RewriteRule(.*) webroot/$1[L]
>>>  
>>>
>>> --- subdir/cakephp/app/webroot/.htaccess 
>>>
>>> 
>>> RewriteEngine On
>>> RewriteBase /subdir/cakephp/app/webroot/
>>> RewriteCond %{REQUEST_FILENAME} !-d
>>> RewriteCond %{REQUEST_FILENAME} !-f
>>> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>>> 
>>>
>>> It doesn't work :(
>>>
>>> 2011/5/15 Matt Murphy 
>>>
>>>> you could try adding a RewriteBase for each .htaccess file of the 3
>>>> index directories which directs to that directory.  (again, / /app, and
>>>> /app/webroot).
>>>> Might need terminating slashes...  Can't remember.
>>>>
>>>> MM
>>>> On Sun, May 15, 2011 at 4:44 PM, marcopais wrote:
>>>>
>>>>>  Yes, .htaccess files are there. Plus, I have tried without
>>>>> mod_rewrite, as explained 
>>>>> here<http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_rewrite/>
>>>>>  (is
>>>>> somewhere on cakephp book also), but no luck.
>>>>>
>>>>> I read that, although this problem is mainly caused by mod_rewrite
>>>>> issues, it can happen also due to some other problems, like whitespaces.
>>>>>
>>>>> 2011/5/15 Matt Murphy [via CakePHP] <[hidden 
>>>>> email]<http://user/SendEmail.jtp?type=node&node=4398501&i=0>
>>>>> >
>>>>>
>>>>>  You may have failed to transfer the hidden files, namely .htaccess.
>>>>>> -- the relevant ones live in / /app and /app/webroot.  Are they there?
>>>>>>
>>>>>> MM
>>>>>>
>>>>>> On Sun, May 15, 2011 at 4:22 PM, marcopais <[hidden 
>>>>>> email]<http://user/SendEmail.jtp?type=node&node=4398497&i=0>
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi there, Sorry to undig this old thread, but I'm running exactly the
>>>>>>> same problem as @ajoberstar. My welcome page doesn't load any css and 
>>>>>>> some
>>>>>>> other include files, like the site mainmenu. This problem occurs on a 
>>>>>>> site
>>>>>>> that I've imported from a online server, where it's working fine. I 
>>>>>>> need to
>>>>>>> get it working locally so I can make a few changes. I'm running XAMPP on
>>>>>>> Windows 7. I ran this script 
>>>>>>> <http://bin.cakephp.org/saved/33005>mentioned on this thread, but still 
>>>>>>> no luck. I have mod_rewrite running, as
>>>>>>> I have installed a fresh cakephp site, which works fine. Only the 
>>>>>>> imported
>>>>>>> site don't work... Any help?
>>>>>>> --
>>>>>>> View this message in context: Re: Welcome Pa

Re: Welcome Page not finding CSS/Images

2011-05-15 Thread Matt Murphy
What's the AllowOverrides setting for the vhost this thing is on?  Maybe try
it on All?

MM

On Sun, May 15, 2011 at 5:15 PM, Marco Pais  wrote:

> Thanks again Matt.
>
> I've tried several configs of the 3 .htaccess files. Right now, I have
> cakephp in a subdirectory of htdocs:
>
>- htdocs - c:\xampp\htdocs
>- cake site - c:\xampp\htdocs\subdir\cakephp
>
> So, my 3 .htaccess files follows like this:
>
> --- subdir/cakephp/.htaccess 
>
> 
>RewriteEngine on
>RewriteBase /subdir/cakephp/
>RewriteRule^$ app/webroot/[L]
>RewriteRule(.*) app/webroot/$1 [L]
> 
>
> --- subdir/cakephp/app/.htaccess 
>
> 
> RewriteEngine on
> RewriteBase /subdir/cakephp/app/
> RewriteRule^$ webroot/[L]
> RewriteRule(.*) webroot/$1[L]
>  
>
> --- subdir/cakephp/app/webroot/.htaccess 
>
> 
> RewriteEngine On
> RewriteBase /subdir/cakephp/app/webroot/
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> 
>
> It doesn't work :(
>
> 2011/5/15 Matt Murphy 
>
>> you could try adding a RewriteBase for each .htaccess file of the 3 index
>> directories which directs to that directory.  (again, / /app, and
>> /app/webroot).
>> Might need terminating slashes...  Can't remember.
>>
>> MM
>> On Sun, May 15, 2011 at 4:44 PM, marcopais  wrote:
>>
>>>  Yes, .htaccess files are there. Plus, I have tried without mod_rewrite,
>>> as explained 
>>> here<http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_rewrite/>
>>>  (is
>>> somewhere on cakephp book also), but no luck.
>>>
>>> I read that, although this problem is mainly caused by mod_rewrite
>>> issues, it can happen also due to some other problems, like whitespaces.
>>>
>>> 2011/5/15 Matt Murphy [via CakePHP] <[hidden 
>>> email]<http://user/SendEmail.jtp?type=node&node=4398501&i=0>
>>> >
>>>
>>>  You may have failed to transfer the hidden files, namely .htaccess.  --
>>>> the relevant ones live in / /app and /app/webroot.  Are they there?
>>>>
>>>> MM
>>>>
>>>> On Sun, May 15, 2011 at 4:22 PM, marcopais <[hidden 
>>>> email]<http://user/SendEmail.jtp?type=node&node=4398497&i=0>
>>>> > wrote:
>>>>
>>>>> Hi there, Sorry to undig this old thread, but I'm running exactly the
>>>>> same problem as @ajoberstar. My welcome page doesn't load any css and some
>>>>> other include files, like the site mainmenu. This problem occurs on a site
>>>>> that I've imported from a online server, where it's working fine. I need 
>>>>> to
>>>>> get it working locally so I can make a few changes. I'm running XAMPP on
>>>>> Windows 7. I ran this script 
>>>>> <http://bin.cakephp.org/saved/33005>mentioned on this thread, but still 
>>>>> no luck. I have mod_rewrite running, as
>>>>> I have installed a fresh cakephp site, which works fine. Only the imported
>>>>> site don't work... Any help?
>>>>> --
>>>>> View this message in context: Re: Welcome Page not finding 
>>>>> CSS/Images<http://cakephp.1045679.n5.nabble.com/Welcome-Page-not-finding-CSS-Images-tp1328476p4398451.html>
>>>>> Sent from the CakePHP mailing list 
>>>>> archive<http://cakephp.1045679.n5.nabble.com/>at Nabble.com.
>>>>>
>>>>> --
>>>>> Our newest site for the community: CakePHP Video Tutorials
>>>>> http://tv.cakephp.org
>>>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>>>> help others with their CakePHP related questions.
>>>>>
>>>>>
>>>>> To unsubscribe from this group, send email to
>>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4398497&i=1>For 
>>>>> more options, visit this group at
>>>>> http://groups.google.com/group/cake-php
>>>>>
>>>>
>>>>  --
>>>> Our newest site for the community: CakePHP Video Tutorials
>>>> http://tv.cakephp.org
>>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>>> help ot

Re: Welcome Page not finding CSS/Images

2011-05-15 Thread Matt Murphy
you could try adding a RewriteBase for each .htaccess file of the 3 index
directories which directs to that directory.  (again, / /app, and
/app/webroot).
Might need terminating slashes...  Can't remember.

MM
On Sun, May 15, 2011 at 4:44 PM, marcopais  wrote:

> Yes, .htaccess files are there. Plus, I have tried without mod_rewrite, as
> explained 
> here<http://wwdj.wijndaele.com/getting-started-with-cakephp-without-mod_rewrite/>
>  (is
> somewhere on cakephp book also), but no luck.
>
> I read that, although this problem is mainly caused by mod_rewrite issues,
> it can happen also due to some other problems, like whitespaces.
>
> 2011/5/15 Matt Murphy [via CakePHP] <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4398501&i=0>
> >
>
>> You may have failed to transfer the hidden files, namely .htaccess.  --
>> the relevant ones live in / /app and /app/webroot.  Are they there?
>>
>> MM
>>
>> On Sun, May 15, 2011 at 4:22 PM, marcopais <[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4398497&i=0>
>> > wrote:
>>
>>> Hi there, Sorry to undig this old thread, but I'm running exactly the
>>> same problem as @ajoberstar. My welcome page doesn't load any css and some
>>> other include files, like the site mainmenu. This problem occurs on a site
>>> that I've imported from a online server, where it's working fine. I need to
>>> get it working locally so I can make a few changes. I'm running XAMPP on
>>> Windows 7. I ran this script <http://bin.cakephp.org/saved/33005>mentioned 
>>> on this thread, but still no luck. I have mod_rewrite running, as
>>> I have installed a fresh cakephp site, which works fine. Only the imported
>>> site don't work... Any help?
>>> --
>>> View this message in context: Re: Welcome Page not finding 
>>> CSS/Images<http://cakephp.1045679.n5.nabble.com/Welcome-Page-not-finding-CSS-Images-tp1328476p4398451.html>
>>> Sent from the CakePHP mailing list 
>>> archive<http://cakephp.1045679.n5.nabble.com/>at Nabble.com.
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4398497&i=1>For 
>>> more options, visit this group at
>>> http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4398497&i=2> For
>> more options, visit this group at http://groups.google.com/group/cake-php
>>
>>
>> --
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://cakephp.1045679.n5.nabble.com/Welcome-Page-not-finding-CSS-Images-tp1328476p4398497.html
>>  To unsubscribe from Welcome Page not finding CSS/Images, click here.
>>
>
>
> --
> View this message in context: Re: Welcome Page not finding 
> CSS/Images<http://cakephp.1045679.n5.nabble.com/Welcome-Page-not-finding-CSS-Images-tp1328476p4398501.html>
> Sent from the CakePHP mailing list 
> archive<http://cakephp.1045679.n5.nabble.com/>at Nabble.com.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Welcome Page not finding CSS/Images

2011-05-15 Thread Matt Murphy
You may have failed to transfer the hidden files, namely .htaccess.  -- the
relevant ones live in / /app and /app/webroot.  Are they there?

MM

On Sun, May 15, 2011 at 4:22 PM, marcopais  wrote:

> Hi there, Sorry to undig this old thread, but I'm running exactly the same
> problem as @ajoberstar. My welcome page doesn't load any css and some other
> include files, like the site mainmenu. This problem occurs on a site that
> I've imported from a online server, where it's working fine. I need to get
> it working locally so I can make a few changes. I'm running XAMPP on Windows
> 7. I ran this script  mentioned on
> this thread, but still no luck. I have mod_rewrite running, as I have
> installed a fresh cakephp site, which works fine. Only the imported site
> don't work... Any help?
> --
> View this message in context: Re: Welcome Page not finding 
> CSS/Images
> Sent from the CakePHP mailing list 
> archiveat Nabble.com.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Future Development Planning

2011-05-15 Thread Matt Murphy
Why not make 10k fake users now on your dev site?  (Maybe write a controller
to iterate through a set of fake creds using your existing user controller
to put them in -- or just do it by hand in SQL)  Do you need to create any
scripting of actions across alot of accounts as well (to simulate use)?

MM

On Sun, May 15, 2011 at 12:05 AM, Krissy Masters  wrote:

> I am working on a rather large project that will expand overtime as the
> site
> grows. So as I have never done this with Cake I was wondering how does one
> go about this.
>
> I know in 3 months we will be adding some new features once there are more
> users (10k Users)
> Now there is no way to test the functionality of these new features without
> the users / db records so we need to wait until we actually have this to
> start testing these new site options. But how? Once we have the base
> membership goal reached how do we add in new features / controllers and so
> on in an already live environment. We need to test it using the database
> yet
> also allow only developers to be able to see it as if it were a live
> account
> but not to actual live users?
>
> Thanks,
>
> K
>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Force redirect to be SSL

2011-05-14 Thread Matt Murphy
Apologies!  You were very detailed in your first email, to which I did not
read down.  :(

MM

On Fri, May 13, 2011 at 11:44 PM, Krissy Masters  wrote:

> Thanks for your detailed help but still not what I am referring to. I have
> a force / unforce ssl for urls but that usually is forced by general surfing
> on the site if user is on a page requiring SSL then the function
> redirects….pretty simple.
>
>
>
> What I am saying is in the controller, in an action itself you have
> redirect() for whatever reason so send user to another url, now if this url
> your sending them to requires SSL for example your redirecting them once
> with the controller redirect…..and beforeRender hits them with a second
> redirect to force the ssl. It would be easier to simply say in the
> controller redirect that im sending you to a https url if needed rather than
> double redirects.
>
>
>
> Look at firebug to inspect the requests and the way you mention you get 2
> requests fired off resulting in 302 redirects.
>
>
>
> Controller sends to http://site.com/page (302 redirect #1)
>
> Gets to http://site.com/page hit with the second redirect 302 since it
> should be ssl for this example
>
> So finally after the second redirect you end up at https://site.com/page.
>
>
>
> All I was asking is there was a way to simply call the redirect() in the
> controller to force the ssl right there and then.
>
>
>
>
>
>
>
>
>
>
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
> Behalf Of *Matt Murphy
> *Sent:* Saturday, May 14, 2011 12:21 AM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Force redirect to be SSL
>
>
>
> I've done this before with a component which i'd include in relevant
> controllers and call in needed methods.
>
> 
>  class SslComponent extends Object {
>
> var $controller;
>
> function startup(&$controller) {
> $this->controller =& $controller;
> }
>
> function force() {
> if(!$this->__isSSL()) {
> $this->controller->redirect('https://'.$this->__url());
> }
> }
>
> function unforce($path = '') {
> if($this->__isSSL()) {
> $this->controller->redirect('http://'.$this->__url($path));
> }
> }
>
> function __url( $path = '') {
> $path = $path ? $path : env('REQUEST_URI');
> return env('SERVER_NAME').$path;
> }
>
> function __isSSL() {
> if (env('SERVER_PORT')==443) {
> return true;
> } else {
> return false;
> }
> }
> }
> --
> In my controllers, I htink I'd call $this->Ssl->force(); on the methods I
> wanted to be in SSL and ->unforce() in the rest (which is grossly inferior
> to using the .htaccess method!).  Warning:  It was not possible, using this,
> to go from ssl to non-ssl or visa versa with POST values intact (something
> this shares with the .htaccess rewrite method.).  Sorry if the above is off
> , but the idea should be clear enough.
>
> Er, this is also old as hell.  Written for 1.1, I think.
>
>
> MM
> On Fri, May 13, 2011 at 6:43 PM, Krissy Masters <
> naked.cake.ba...@gmail.com> wrote:
>
> Not using any htaccess files.
> I only have 2 redirects that I need to force to SSL I was just curious if
> there was a way.
>
> Maybe this is something future versions of cake might incorporate?
>
> Allow an additional param for SSL => true to force the redirect to be ssl
> rather than a double redirect.
>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org

Re: Force redirect to be SSL

2011-05-14 Thread Matt Murphy
Oh yeah!  I tried that once too and ended up writing a helper to extend
HtmlHelper and override the behavior of link based on, in one case, extra
passed params, and, in another, a record in the DB for records to be pushed
into SSL.  What the hell did I do with that thing??

MM

On Fri, May 13, 2011 at 11:49 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Just a thought... So ideally you want the link on the page to be
> https/http, so that it goes straight there when clicked? Could you extend
> the Html helper to achieve this so that when you use $this->Html->link it
> does the logic and issues either a secure or an insecure link? This would
> avoid the logic + redirect on arrival at the target page...I think.
>
> Jeremy Burns
> *Class Outfit*
> *
> *
> jeremybu...@classoutfit.com 
> http://www.classoutfit.com
>
> On 14 May 2011, at 04:44, Krissy Masters wrote:
>
> Thanks for your detailed help but still not what I am referring to. I have
> a force / unforce ssl for urls but that usually is forced by general surfing
> on the site if user is on a page requiring SSL then the function
> redirects….pretty simple.
>
> What I am saying is in the controller, in an action itself you have
> redirect() for whatever reason so send user to another url, now if this url
> your sending them to requires SSL for example your redirecting them once
> with the controller redirect…..and beforeRender hits them with a second
> redirect to force the ssl. It would be easier to simply say in the
> controller redirect that im sending you to a https url if needed rather than
> double redirects.
>
> Look at firebug to inspect the requests and the way you mention you get 2
> requests fired off resulting in 302 redirects.
>
> Controller sends to http://site.com/page (302 redirect #1)
> Gets to http://site.com/page hit with the second redirect 302 since it
> should be ssl for this example
> So finally after the second redirect you end up at https://site.com/page.
>
> All I was asking is there was a way to simply call the redirect() in the
> controller to force the ssl right there and then.
>
>
>
>
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
> Behalf Of *Matt Murphy
> *Sent:* Saturday, May 14, 2011 12:21 AM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Force redirect to be SSL
>
> I've done this before with a component which i'd include in relevant
> controllers and call in needed methods.
>
> 
>  class SslComponent extends Object {
>
> var $controller;
>
> function startup(&$controller) {
> $this->controller =& $controller;
> }
>
> function force() {
> if(!$this->__isSSL()) {
> $this->controller->redirect('https://'.$this->__url());
> }
> }
>
> function unforce($path = '') {
> if($this->__isSSL()) {
> $this->controller->redirect('http://'.$this->__url($path));
> }
> }
>
> function __url( $path = '') {
> $path = $path ? $path : env('REQUEST_URI');
> return env('SERVER_NAME').$path;
> }
>
> function __isSSL() {
> if (env('SERVER_PORT')==443) {
> return true;
> } else {
> return false;
> }
> }
> }
> --
> In my controllers, I htink I'd call $this->Ssl->force(); on the methods I
> wanted to be in SSL and ->unforce() in the rest (which is grossly inferior
> to using the .htaccess method!).  Warning:  It was not possible, using this,
> to go from ssl to non-ssl or visa versa with POST values intact (something
> this shares with the .htaccess rewrite method.).  Sorry if the above is off
> , but the idea should be clear enough.
>
> Er, this is also old as hell.  Written for 1.1, I think.
>
> MM
> On Fri, May 13, 2011 at 6:43 PM, Krissy Masters <
> naked.cake.ba...@gmail.com> wrote:
> Not using any htaccess files.
> I only have 2 redirects that I need to force to SSL I was just curious if
> there was a way.
>
> Maybe this is something future versions of cake might incorporate?
>
> Allow an additional param for SSL => true to force the redirect to be ssl
> rather than a double redirect.
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroup

Re: Force redirect to be SSL

2011-05-13 Thread Matt Murphy
I've done this before with a component which i'd include in relevant
controllers and call in needed methods.


controller =& $controller;
}

function force() {
if(!$this->__isSSL()) {
$this->controller->redirect('https://'.$this->__url());
}
}

function unforce($path = '') {
if($this->__isSSL()) {
$this->controller->redirect('http://'.$this->__url($path));
}
}

function __url( $path = '') {
$path = $path ? $path : env('REQUEST_URI');
return env('SERVER_NAME').$path;
}

function __isSSL() {
if (env('SERVER_PORT')==443) {
return true;
} else {
return false;
}
}
}
--
In my controllers, I htink I'd call $this->Ssl->force(); on the methods I
wanted to be in SSL and ->unforce() in the rest (which is grossly inferior
to using the .htaccess method!).  Warning:  It was not possible, using this,
to go from ssl to non-ssl or visa versa with POST values intact (something
this shares with the .htaccess rewrite method.).  Sorry if the above is off
, but the idea should be clear enough.

Er, this is also old as hell.  Written for 1.1, I think.

MM
On Fri, May 13, 2011 at 6:43 PM, Krissy Masters
wrote:

> Not using any htaccess files.
> I only have 2 redirects that I need to force to SSL I was just curious if
> there was a way.
>
> Maybe this is something future versions of cake might incorporate?
>
> Allow an additional param for SSL => true to force the redirect to be ssl
> rather than a double redirect.
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with Ajax submit URLs using string vs array notation

2011-05-12 Thread Matt W.
Hi.  I'm still somewhat new, and tinkering around with the tutorial
blog application, and having some trouble when trying to create an
ajax-ified comment submission form, specifically with the url that the
form ends up submitting to.  This is the code I'm using for the form:

create('Comment',
array('url'=>array('controller'=>'comments', 'action'=>'add'))); ?>
input('Comment.name');?>
input('Comment.content');?>
input('Comment.post_id', array('type'=>'hidden', 'value'=>
$post['Post']['id']));?>
Js->submit('Add
Comment',array('update'=>'comments','url'=>array('controller'=>'comments',
'action'=>'add')),false);?>
Js->writeBuffer();?>

When I use this (with the jQuery JS engine), this JS is generated:
$(document).ready(function () {$("#submit-1025595286").bind("click",
function (event) {$.ajax({data:$
("#submit-1025595286").closest("form").serialize(), dataType:"html",
success:function (data, textStatus) {$("comments").html(data);},
type:"post", url:"\/posts\/comments\/add"});

The issue is the url there; that should be just /comments/add , rather
than /posts/comments/add . When I use a string instead for the URL in
the code ('url' => '/comments/add'), the URL is what I expect.  Is
there something I'm missing with the array notation?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: an appointment system...

2011-04-28 Thread Matt Murphy
I gotta agree.

On Thu, Apr 28, 2011 at 12:37 PM, Miloš Vučinić wrote:

> Why don't you just use google calendar or some other management
> support software ? Comparing to what he has to pay you to do it, plus
> the time you will not be working on something useful it pays off.
>
> On Apr 28, 5:14 pm, Tran Cao Thai  wrote:
> > i used to play around with full calendar (a plugin of jquery) when doing
> my
> > bachelor. It is good, but we still had to configure a lot (3000 lines of
> > javascript). In my  opinion, building everything from scratch is a lot
> > better than trying to hack some complex systems. So if you still have
> time,
> > build your own
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Apr 28, 2011 at 11:04 PM, Tan Cheng 
> wrote:
> > > Hi folks,
> >
> > > My boss ask me to create an "appointment system", basically, I need a
> > > calendar that I can add events, and maybe a message system.
> >
> > > I haven't found any good plug-in for this. So anybody has any related
> > > experience doing this with php? Where should I start looking at?
> >
> > > Any input will be greatly appreciated!
> >
> > > Thank you!
> >
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > > others with their CakePHP related questions.
> >
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: On the road to Da Vinci 2.0

2011-03-02 Thread Matt Murphy
If I were the owner of the list, I'd have banned him on the basis of him
having started off with "mercy, peace and love".

On Wed, Mar 2, 2011 at 8:29 PM, Larry E. Masters  wrote:

> He should email me, I am the one who banned him. And since I am the "owner"
> of the list I think that gives me the right to ban for content I consider
> spam and as mentioned in this thread it was cross posted in a lot of other
> places.
>
> --
> Larry E. Masters
>
>
> On Wed, Mar 2, 2011 at 7:26 PM, Sam Bernard  wrote:
>
>> This guy just emailed me pissed that he got banned... he accused us of
>> being ignorant patricians oppressing the brilliant ideas of uppity
>> plebes pride much?
>>
>> On Mar 2, 4:56 pm, Sam Bernard  wrote:
>> > It's a spam post- do a google searchb on the title... its been posted
>> everywhere.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: how decrypt password in view?

2011-02-04 Thread Matt Murphy
There are other better solutions :)  But my hope is to discourage another
from doing far worse.

MM

On Fri, Feb 4, 2011 at 6:35 AM, AD7six  wrote:

>
>
> On Feb 4, 12:21 pm, Matt Murphy  wrote:
> > It is never necessary to decrypt a password -- both from a technical
> > standpoint and from a security standpoint.  If you need to check an
> entered
> > password vs the stored has, you hash the entered password and compare
> with
> > the stored hash.  If your user forgets theirs, simply generate a new one,
> > email it to them
>
> FWIW that's a hideous practice. don't mail passwords.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: how decrypt password in view?

2011-02-04 Thread Matt Murphy
It is never necessary to decrypt a password -- both from a technical
standpoint and from a security standpoint.  If you need to check an entered
password vs the stored has, you hash the entered password and compare with
the stored hash.  If your user forgets theirs, simply generate a new one,
email it to them and store the hash.

I hope you won't be tempted to store unencrypted...  And I hope you're
hashing using salted SHA1.

Cheers,
MM
On Fri, Feb 4, 2011 at 5:56 AM, andy_the ultimate baker <
anandghaywankar...@gmail.com> wrote:

> its really harsh to hear,
> we need to find out something for this becz somtime it become
> necessary
>
> On Feb 4, 3:53 pm, Jeremy Burns | Class Outfit
>  wrote:
> > No, it's a one way encryption.
> >
> > Jeremy Burns
> > Class Outfit
> >
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > On 4 Feb 2011, at 10:50, andy_the ultimate baker wrote:
> >
> > > i have made all validations but when user view he/her profile the
> > > password get encrypted in view, there is not any way to fix it,
> >
> > > can i convert that encrypted password in actual one?
> >
> > > On Feb 4, 3:43 pm, Jeremy Burns | Class Outfit
> > >  wrote:
> > >> It's a one way encryption, so that's not possible. The only thing you
> can do is how the user the text they are currently inputting (only useful
> really when setting or entering a password) or, if they forget, to put in
> place a system of resetting and validating a new password.
> >
> > >> Might sound like a pain, but it's the most secure way.
> >
> > >> Jeremy Burns
> > >> Class Outfit
> >
> > >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
> >
> > >> On 4 Feb 2011, at 10:36, andy_the ultimate baker wrote:
> >
> > >>> hi,
> > >>> friends i want to show the password in view to user but its coming
> > >>> hash encoded,
> > >>> can any one tell me how to display password decrypted in view?
> >
> > >>> --
> > >>> Our newest site for the community: CakePHP Video Tutorialshttp://
> tv.cakephp.org
> > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> others with their CakePHP related questions.
> >
> > >>> To unsubscribe from this group, send email to
> > >>> cake-php+unsubscr...@googlegroups.comFor
> > >>>  more options, visit this group athttp://
> groups.google.com/group/cake-php
> >
> > > --
> > > Our newest site for the community: CakePHP Video Tutorialshttp://
> tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> others with their CakePHP related questions.
> >
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group athttp://
> groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Generic Question: Keeping the session alive.

2011-01-30 Thread Matt Murphy
Naah, I was just confused.  Thought you were saying the server would ping
the client.  Sorry for the distraction.

MM

On Sun, Jan 30, 2011 at 2:11 PM, Stephen wrote:

> I guess not, do you have any feedback on the question at hand?
>
>
> On 30 January 2011 19:01, Matt Murphy  wrote:
>
>> Er... I've not contested that.  Perhaps you didn't notice which message I
>> replied to.
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Generic Question: Keeping the session alive.

2011-01-30 Thread Matt Murphy
Er... I've not contested that.  Perhaps you didn't notice which message I
replied to.

Cheers,
MM

On Sun, Jan 30, 2011 at 1:09 PM, Stephen wrote:

> On 30 January 2011 17:59, Matt Murphy  wrote:
>
>> Check.
>>
>>
> I didn't find a reason not to do it, that's why I am asking in the google
> group.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Generic Question: Keeping the session alive.

2011-01-30 Thread Matt Murphy
Check.

MM

On Sun, Jan 30, 2011 at 12:41 PM, Stephen wrote:

> I use javascript to execute a remote function every 60 seconds.
>
> On 30 January 2011 17:35, Matt Murphy  wrote:
>
>> Am I wrong, or wouldn't it be the other way around (in order to perform
>> what you describe)...  the client sends a periodic ping to the server?
>>
>> MM
>>
>> On Sun, Jan 30, 2011 at 11:38 AM, Stephen > > wrote:
>>
>>> I did change it in CakePHP, but due to server complications, this still
>>> wasn't long enough.
>>>
>>> Besides, if need be, I could concentrate on editing the php.ini but I
>>> would prefer to leave that alone, is there any reason why the AJAX method is
>>> a bad method?
>>>
>>> Besides leaving the website logged in and going away for long periods of
>>> time.
>>>
>>>
>>> On 30 January 2011 16:31, Ryan Schmidt wrote:
>>>
>>>> On Jan 30, 2011, at 10:27, Stephen wrote:
>>>>
>>>> > Every so often, the website will send a 1-way request to a generic
>>>> "ping" function, this will keep the session alive indefinately (if the user
>>>> opted for this feature on sign in)
>>>>
>>>> Why don't you just increase the session lifetime in your php.ini?
>>>>
>>>>
>>>>
>>>> --
>>>> Our newest site for the community: CakePHP Video Tutorials
>>>> http://tv.cakephp.org
>>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>>> help others with their CakePHP related questions.
>>>>
>>>>
>>>> To unsubscribe from this group, send email to
>>>> cake-php+unsubscr...@googlegroups.comFor
>>>>  more options, visit this group at
>>>> http://groups.google.com/group/cake-php
>>>>
>>>
>>>
>>>
>>> --
>>> Kind Regards
>>>  Stephen @ NinjaCoderMonkey
>>>
>>>  www.ninjacodermonkey.co.uk
>>>
>>>
>>>  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php
>>
>
>
>
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Generic Question: Keeping the session alive.

2011-01-30 Thread Matt Murphy
Am I wrong, or wouldn't it be the other way around (in order to perform what
you describe)...  the client sends a periodic ping to the server?

MM

On Sun, Jan 30, 2011 at 11:38 AM, Stephen wrote:

> I did change it in CakePHP, but due to server complications, this still
> wasn't long enough.
>
> Besides, if need be, I could concentrate on editing the php.ini but I would
> prefer to leave that alone, is there any reason why the AJAX method is a bad
> method?
>
> Besides leaving the website logged in and going away for long periods of
> time.
>
>
> On 30 January 2011 16:31, Ryan Schmidt  wrote:
>
>> On Jan 30, 2011, at 10:27, Stephen wrote:
>>
>> > Every so often, the website will send a 1-way request to a generic
>> "ping" function, this will keep the session alive indefinately (if the user
>> opted for this feature on sign in)
>>
>> Why don't you just increase the session lifetime in your php.ini?
>>
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php
>>
>
>
>
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How do i restrict access to the Admin Page

2011-01-09 Thread Matt Murphy
Use ACLs to check the user that's logged in at the beginning of your admin
methods.

On Sun, Jan 9, 2011 at 10:24 AM, tubiz  wrote:

> Please i am already done creating a CakePhp Application but the
> problem i am having presently is how to restrict users access to the
> admin area. I am using the users table both for my site users and also
> for the administrator as well. I have already created a field called
> role in the Users table and i have given the administrator the role of
> admin.
> Please how do i allow access to the administrator area to only the
> users who have an admin role.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: how to use ssl to secure subdomains of a cakephp app

2010-12-24 Thread Matt Murphy
In order to get to user1.domain.com, your user would have to log in.  Am I
right in thinking that is on the list of encrypted events?  And certainly
there must be a few others like user management functions?  Ok, shutting up
now.

Unless you have a wildcart cert, you'll have to use method a.  Obviously,
the wildcard cert solution would be way sexier (enabling method b), but
those things are expensive.

Matt

On Fri, Dec 24, 2010 at 7:06 PM, Zeu5  wrote:

> Hi there,
>
>
> my cakephp app allows users to create subdomains.
>
> for eg,
>
> user1 creates subdomain1.example.com and
> user2 creates subdomain2.example.com and so on...
>
> all subdomains are pointing to the same app folder.
>
> if a new subdomain is created, i merely keep track of it by inserting
> new record in subdomains table. no new copies of `app` folder are
> created.
>
> i have a action common in all subdomains called orders/checkout
>
> i want to ssl secure this page.
>
> Do I
>
> a)
> create a separate subdomain such that all visitors to the different
> subdomains are redirected to it?
>
> eg, visitors at subdomain1.example.com or subdomain2.example.com will
> ALL be directed to https://secure.example.com/orders/checkout when
> they run the orders/checkout action
>
>
> OR
>
> b)
>
> all the visitors at subdomain1.example.com are directed to
> https://subdomain1.example.com/orders/checkout
>
> all the visitors at subdomain2.example.com are directed to
> https://subdomain2.example.com/orders/checkout
>
> and so on..
>
>
> if it is a) how do i achieve that?
>
> if it is b) how do i achieve that?
>
> is there an alternative to a) and b)? if so, how do i achieve that?
>
> Thank you .
>
> Happy holidays
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Simple jquery script

2010-11-08 Thread Matt Murphy
Sorry, I ask this because you generally write your javascript in the CTP,
but if you don't make the right include call, jQuery won't be able to run.

MM

On Mon, Nov 8, 2010 at 1:26 PM, Matt Murphy  wrote:

> Look at the generated code at the URL from which you're testing cakephp.
> Is jquery being included in the header?
>
> MM
>
>
> On Mon, Nov 8, 2010 at 12:00 PM, Dobrogor  wrote:
>
>> Yes, I working with jQuery helper that i can use in Cake. Because
>> original jquery code dont working in files with extensions .ctp.
>> I files with extensions .html or .php jquery work perfecty.
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Simple jquery script

2010-11-08 Thread Matt Murphy
Look at the generated code at the URL from which you're testing cakephp.  Is
jquery being included in the header?

MM

On Mon, Nov 8, 2010 at 12:00 PM, Dobrogor  wrote:

> Yes, I working with jQuery helper that i can use in Cake. Because
> original jquery code dont working in files with extensions .ctp.
> I files with extensions .html or .php jquery work perfecty.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Help with array

2010-11-03 Thread Matt Murphy
Yeah.  Sorry you got yourself in a huff over that.  Let me expand slightly.
The idea is to arrange the data using a model, then call the model in the
controller and it will be formatted in the expected way.  I believe there
are actually examples of this in the bakery, and I'm sure I've seen them in
PAKT Publishing's 2 or 3 CakePHP books.
Or don't.  It just strikes me as the "MVC" way to do it.

Cheers,
Matt

On Wed, Nov 3, 2010 at 9:57 PM, Dave Maharaj  wrote:

>  I think so!
>
>
>
> It has a model. Im using a jquery plugin and where the user slides
> something I have a #id which corresponds to a field and a value so I want to
> save it but it has no built in way to save that data so that’s what im
> trying to do!
>
>
>
> So I want to mimic what that looks like. I only asked a question! If you
> want to be a comic maybe you should give that a try. It is a help forum is
> it not? If we were all as skilled as you then who would you insult?
>
>
>
> *From:* Matt Murphy [mailto:mattyh...@gmail.com]
> *Sent:* November-03-10 11:21 PM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Help with array
>
>
>
> Am I being moronic, everyone?
>
> Matt
>
> On Wed, Nov 3, 2010 at 9:50 PM, Matt Murphy  wrote:
>
> It's your data.  Make a model for it.
>
>
>
> On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj  wrote:
>
> Does anyone know how to manually create an array in js that would mimic the
> data sent normally?
>
> I simply need to send off 1 key => value pair  so it looks like
> data[‘model’][‘field’] => 0 since that is what the controller is expecting
>
>
>
> Not using a form as what is being done is not possible….
>
>
>
> The js has field value passed to it…just cant seem to get the array right.
>
>
>
>
>
> SCRIPT (NOT CONTROLLER)
>
> function update ( field , value ) {
>
>
>
> var user_data= new Array()
>
> 
>
>
>
> $.ajax({
>
> type: "POST",
>
> cache:false,
>
> url: '/user/update',
>
> data:   user_data
>
> });
>
> }
>
>
>
> Thanks,
>
>
>
> Dave
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>
>
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Help with array

2010-11-03 Thread Matt Murphy
Am I being moronic, everyone?

Matt

On Wed, Nov 3, 2010 at 9:50 PM, Matt Murphy  wrote:

> It's your data.  Make a model for it.
>
>
> On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj  wrote:
>
>>  Does anyone know how to manually create an array in js that would mimic
>> the data sent normally?
>>
>> I simply need to send off 1 key => value pair  so it looks like
>> data[‘model’][‘field’] => 0 since that is what the controller is expecting
>>
>>
>>
>> Not using a form as what is being done is not possible….
>>
>>
>>
>> The js has field value passed to it…just cant seem to get the array right.
>>
>>
>>
>>
>>
>> SCRIPT (NOT CONTROLLER)
>>
>> function update ( field , value ) {
>>
>>
>>
>> var user_data= new Array()
>>
>> 
>>
>>
>>
>> $.ajax({
>>
>> type: "POST",
>>
>> cache:false,
>>
>> url: '/user/update',
>>
>> data:   user_data
>>
>> });
>>
>> }
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Dave
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Help with array

2010-11-03 Thread Matt Murphy
It's your data.  Make a model for it.

On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj  wrote:

>  Does anyone know how to manually create an array in js that would mimic
> the data sent normally?
>
> I simply need to send off 1 key => value pair  so it looks like
> data[‘model’][‘field’] => 0 since that is what the controller is expecting
>
>
>
> Not using a form as what is being done is not possible….
>
>
>
> The js has field value passed to it…just cant seem to get the array right.
>
>
>
>
>
> SCRIPT (NOT CONTROLLER)
>
> function update ( field , value ) {
>
>
>
> var user_data= new Array()
>
> 
>
>
>
> $.ajax({
>
> type: "POST",
>
> cache:false,
>
> url: '/user/update',
>
> data:   user_data
>
> });
>
> }
>
>
>
> Thanks,
>
>
>
> Dave
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP high CPU utilization

2010-10-24 Thread Matt Murphy
oh for pete's sake, I forgot you described your test.  ignore me.   was
suffering from the sleepies.

On Sun, Oct 24, 2010 at 8:25 AM, Matt Murphy  wrote:

> No need to play with maxclients yet... You shouldn't have any, right?   :)
>
> By something interesting, I was referring to bullshit URLs being hit by
> russian (or chinese or whatever) robots attempting to crack your apache
> install or somesuch.
>
> IMHO, your problem isn't going to have anything to do with cake.   It's
> going to be an illicit client or a buggy version of something *actually*
> executable.  The reason I say this is that PHP has a per script memory use
> limit.  Either you have many illicit clients eating up no more than 32 (or
> 64, whatever) MB per illicit URI (unlikely -- if this is the scenario,
> they're most likely taking up only a few hundred K per thread because your
> view is bare) or you have something executable installed that has a memory
> leak or some such silliness.
>
> Read your logs (read more logs).  Take cake out of your web tree and see
> what happens to utilization.  Take a look at the per-process memory usage
> (i'm a little rusty on this stuff or I'd say what to use, but I'm currently
> an *ex* developer/administrator).
>
> Matt Murphy
>
>
> On Sun, Oct 24, 2010 at 7:43 AM, Ervin Hegedüs  wrote:
>
>> Hello Matt,
>>
>> thanks for the reply,
>>
>> On Sun, Oct 24, 2010 at 1:26 PM, Matt Murphy  wrote:
>> > I'd be curious to know what your apache logs are reporting during a high
>> > utilization period...
>>
>> nothing... there are just client querys, nothing else.
>> May be do you think about "increasing maxclients", but no - currently
>> maxclients is 150, and I've tested with 100 client with ab.
>>
>> > Obviously, it isn't google indexing your empty view
>> > over and over, but there might be something interesting.
>>
>> yes, but what is that?
>>
>> I'm suspecting to the rendering code of default layout - but I'm new
>> in cake and don't have any free time to debug that code...
>>
>> How can I find that part of Cake (config, rendering...)?
>>
>>
>> Thank you:
>>
>>
>> a.
>> > Matt Murphy
>> >
>> > On Sat, Oct 23, 2010 at 1:49 PM, airween  wrote:
>> >>
>> >> Hello Cake Users,
>> >>
>> >> I'm new in Cake - exactly I'm not a Cake user/developer, I'm a system
>> >> administrator.
>> >>
>> >> System is a LAMP enviroment, hardware is a HP DL380, with two CPU,
>> >> every CPU has 2 cores.
>> >>
>> >> I've a site since few weeks ago - since then the CPU utilization isn't
>> >> above 100%, but usually over 200%.
>> >>
>> >> I've created a controller, which does "nothing": it contains just a
>> >> simple index() method, which's empty. Also I configured the routes,
>> >> and when I get the URL:
>> >>
>> >> http://mysite/foo
>> >>
>> >> the default layout rendered, which has a header and a footer.
>> >>
>> >> I tested this controller on an another HW, which has 8 core; the
>> >> client was ab (apache benchmark), and until the test I've monitored
>> >> the system:
>> >>
>> >> sar -P ALL 1 1000
>> >>
>> >> (client: ab -n 100 -c 100  http://mysite/foo)
>> >>
>> >> Until the test sar reported this values:
>> >>
>> >> 19.27.17CPU %user %nice   %system   %iowait
>> >> %steal %idle
>> >> 19.27.18all 88,38  0,00 10,88  0,00
>> >> 0,00  0,75
>> >> 19.27.18  0 89,00  0,00  9,00  0,00
>> >> 0,00  2,00
>> >> 19.27.18  1 83,00  0,00 17,00  0,00
>> >> 0,00  0,00
>> >> 19.27.18  2 91,00  0,00  9,00  0,00
>> >> 0,00  0,00
>> >> 19.27.18  3 90,00  0,00 10,00  0,00
>> >> 0,00  0,00
>> >> 19.27.18  4 90,10  0,00  9,90  0,00
>> >> 0,00  0,00
>> >> 19.27.18  5 86,87  0,00 13,13  0,00
>> >> 0,00  0,00
>> >> 19.27.18  6 91,00  0,00  9,00  0,00
>> >> 0,00  0,00
>> >> 19.27.18  7 87,00  0,00 10,00  0,00
>&g

Re: CakePHP high CPU utilization

2010-10-24 Thread Matt Murphy
No need to play with maxclients yet... You shouldn't have any, right?   :)

By something interesting, I was referring to bullshit URLs being hit by
russian (or chinese or whatever) robots attempting to crack your apache
install or somesuch.

IMHO, your problem isn't going to have anything to do with cake.   It's
going to be an illicit client or a buggy version of something *actually*
executable.  The reason I say this is that PHP has a per script memory use
limit.  Either you have many illicit clients eating up no more than 32 (or
64, whatever) MB per illicit URI (unlikely -- if this is the scenario,
they're most likely taking up only a few hundred K per thread because your
view is bare) or you have something executable installed that has a memory
leak or some such silliness.

Read your logs (read more logs).  Take cake out of your web tree and see
what happens to utilization.  Take a look at the per-process memory usage
(i'm a little rusty on this stuff or I'd say what to use, but I'm currently
an *ex* developer/administrator).

Matt Murphy

On Sun, Oct 24, 2010 at 7:43 AM, Ervin Hegedüs  wrote:

> Hello Matt,
>
> thanks for the reply,
>
> On Sun, Oct 24, 2010 at 1:26 PM, Matt Murphy  wrote:
> > I'd be curious to know what your apache logs are reporting during a high
> > utilization period...
>
> nothing... there are just client querys, nothing else.
> May be do you think about "increasing maxclients", but no - currently
> maxclients is 150, and I've tested with 100 client with ab.
>
> > Obviously, it isn't google indexing your empty view
> > over and over, but there might be something interesting.
>
> yes, but what is that?
>
> I'm suspecting to the rendering code of default layout - but I'm new
> in cake and don't have any free time to debug that code...
>
> How can I find that part of Cake (config, rendering...)?
>
>
> Thank you:
>
>
> a.
> > Matt Murphy
> >
> > On Sat, Oct 23, 2010 at 1:49 PM, airween  wrote:
> >>
> >> Hello Cake Users,
> >>
> >> I'm new in Cake - exactly I'm not a Cake user/developer, I'm a system
> >> administrator.
> >>
> >> System is a LAMP enviroment, hardware is a HP DL380, with two CPU,
> >> every CPU has 2 cores.
> >>
> >> I've a site since few weeks ago - since then the CPU utilization isn't
> >> above 100%, but usually over 200%.
> >>
> >> I've created a controller, which does "nothing": it contains just a
> >> simple index() method, which's empty. Also I configured the routes,
> >> and when I get the URL:
> >>
> >> http://mysite/foo
> >>
> >> the default layout rendered, which has a header and a footer.
> >>
> >> I tested this controller on an another HW, which has 8 core; the
> >> client was ab (apache benchmark), and until the test I've monitored
> >> the system:
> >>
> >> sar -P ALL 1 1000
> >>
> >> (client: ab -n 100 -c 100  http://mysite/foo)
> >>
> >> Until the test sar reported this values:
> >>
> >> 19.27.17CPU %user %nice   %system   %iowait
> >> %steal %idle
> >> 19.27.18all 88,38  0,00 10,88  0,00
> >> 0,00  0,75
> >> 19.27.18  0 89,00  0,00  9,00  0,00
> >> 0,00  2,00
> >> 19.27.18  1 83,00  0,00 17,00  0,00
> >> 0,00  0,00
> >> 19.27.18  2 91,00  0,00  9,00  0,00
> >> 0,00  0,00
> >> 19.27.18  3 90,00  0,00 10,00  0,00
> >> 0,00  0,00
> >> 19.27.18  4 90,10  0,00  9,90  0,00
> >> 0,00  0,00
> >> 19.27.18  5 86,87  0,00 13,13  0,00
> >> 0,00  0,00
> >> 19.27.18  6 91,00  0,00  9,00  0,00
> >> 0,00  0,00
> >> 19.27.18  7 87,00  0,00 10,00  0,00
> >> 0,00  3,00
> >>
> >> When test has finished, the %user has gone 0,00, and %idle about 99,9%
> >> again.
> >>
> >> On that machine another MVC frameworks and another sites (CMS's)
> >> (which uses Codeigniter, Drupal...) I _can't_ create this effect.
> >>
> >> I don't use .htaccess.
> >>
> >> Cake version is 1.2.8, I downloaded it today.
> >>
> >> What could be the problem?
> >>
> >>
> >> Thank you:
> >>
> >>
>

  1   2   3   4   >