Re: Help me design the database structure

2016-04-01 Thread mike karthauser
information about google docs can be found in their support section.
http://lmgtfy.com/?q=google+docs+version+control

On Fri, Apr 1, 2016 at 1:55 PM, Clement Crownrise <
clementcrownr...@gmail.com> wrote:

> @Mike, does google has this type of feature? please do enlighten me the
> more
>
> On Fri, Apr 1, 2016 at 1:51 PM, mike karthauser 
> wrote:
>
>> probably best to look at something like google docs which already has
>> this functionality before you start building something from scratch to
>> handle this.
>>
>> --
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>
>> We will soon be closing this Google Group. But don't worry, we have
>> something better coming. Stay tuned for an updated from the CakePHP Team
>> soon.
>>
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow 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/mKJ3a07u1wg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> cake-php+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> http://www.clementcrownrise.name/images/nameing.gif
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow 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.
For more options, visit https://groups.google.com/d/optout.


Re: Help me design the database structure

2016-04-01 Thread Clement Crownrise
@Mike, does google has this type of feature? please do enlighten me the more

On Fri, Apr 1, 2016 at 1:51 PM, mike karthauser 
wrote:

> probably best to look at something like google docs which already has this
> functionality before you start building something from scratch to handle
> this.
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow 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/mKJ3a07u1wg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow 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.
For more options, visit https://groups.google.com/d/optout.


Re: Help me design the database structure

2016-04-01 Thread mike karthauser
probably best to look at something like google docs which already has this
functionality before you start building something from scratch to handle
this.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow 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.
For more options, visit https://groups.google.com/d/optout.


Help me design the database structure

2016-03-30 Thread Clement Crownrise
Hello Everyone, 

I am working on an application, a document management/versioning system.

The admin will need to add a user to a document before the user will be 
able to see the document, Furthermore, the admin will add a maximum number 
of 3 different reviewer to a particular document.

How do I design this database table? your help would be appreciated.

Thanks

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow 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.
For more options, visit https://groups.google.com/d/optout.


Anyone have done cakephp 3.x integration with angularjs 1.4.x, please help for the setup and directory structure

2016-02-07 Thread Ashish Raj
I have to implement angularjs 1.4.x with cakephp 3.x for a fully customise 
shopping cart. I am totally new in cakephp 3.x (studying from last one week 
) and angularjs 1.4.x

I am thinking what should be the directory structure for merging cakephp 
3.x to angularjs 1.4.x for a shopping website, please help.

And help me about the integration process and work flow... I have searched 
alot in past days but found old code of cakephp 2.x and confused ...

Currently I have found below link as best output of my search about this...

https://medium.com/@ranostaj/login-with-cakephp3-and-angularjs-b4b124708086#.jpn8jqrhl

But above link seems to be for API in cakephp and angular... Is this 
suitable in my context... Please 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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Help me abount transaction (begin, commit, rollback) in cakephp 3 version

2016-01-29 Thread Somsubhra Saha
Hi,

I am coded from ref link - 
http://book.cakephp.org/3.0/en/orm/database-basics.html#using-transactions.
But my code is running perfectly. But data is not updated or inserted into 
database. 

Below is my code (controller) -

$conn = ConnectionManager::get('default');

$conn->begin();
try {

// here is my code //

$conn->commit();
} catch(Exception $e) {
// do exception handling
$conn->rollback();
}


When I used exit before commit line the database is updated and as well as 
insert values. But when the exit remove the rollback is working (I think).

Please help or guide me.

-- 
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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-29 Thread Clement Crownrise
Thanks @John

On Tue, Dec 29, 2015 at 8:53 AM, John Andersen 
wrote:

> As Matthew wrote, use the Neighbor function. See the CakePHP book in this
> page:
>
> http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-neighbors
>
> Enjoy, John
>
>
> On Tuesday, 29 December 2015 00:54:37 UTC+2, Clement Crownrise wrote:
>>
>> Thanks for your response, but please what is the neighbour function?
>>
>> Can you please paste the sytax here.
>>
>> Thanks
>>
>>
>> On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>>>
>>> Use the get neighbors function.
>>>
>>> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise <
>>> clementc...@gmail.com> wrote:
>>>
 Hello everyone, below is the first page of my list page, The first
 attachment..

 On clicking on any of the data on the first page, it will open up and
 show like the second attachment.

 Now the problem is, I want to add a "Next " and "Previous" button to
 the second attachment, so that I will not need to go to the first
 page(first attachment ) in order to access the next or previous record.

 HOW CAN I ACHIEVE THIS?

 --
 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.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at https://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 a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/HYSgunvislo/unsubscribe.
> To unsubscribe from this group and all its topics, 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 https://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread Matthew Kaufman
Use the get neighbors function.

On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise <
clementcrownr...@gmail.com> wrote:

> Hello everyone, below is the first page of my list page, The first
> attachment..
>
> On clicking on any of the data on the first page, it will open up and show
> like the second attachment.
>
> Now the problem is, I want to add a "Next " and "Previous" button to the
> second attachment, so that I will not need to go to the first page(first
> attachment ) in order to access the next or previous record.
>
> HOW CAN I ACHIEVE THIS?
>
> --
> 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 https://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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread Clement Crownrise
Thanks for your response, but please what is the neighbour function?

Can you please paste the sytax here.

Thanks


On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>
> Use the get neighbors function.
>
> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise  > wrote:
>
>> Hello everyone, below is the first page of my list page, The first 
>> attachment..
>>
>> On clicking on any of the data on the first page, it will open up and 
>> show like the second attachment. 
>>
>> Now the problem is, I want to add a "Next " and "Previous" button to the 
>> second attachment, so that I will not need to go to the first page(first 
>> attachment ) in order to access the next or previous record.
>>
>> HOW CAN I ACHIEVE THIS? 
>>
>> -- 
>> 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 .
>> To post to this group, send email to cake...@googlegroups.com 
>> .
>> Visit this group at https://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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread John Andersen
As Matthew wrote, use the Neighbor function. See the CakePHP book in this 
page:
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-neighbors

Enjoy, John

On Tuesday, 29 December 2015 00:54:37 UTC+2, Clement Crownrise wrote:
>
> Thanks for your response, but please what is the neighbour function?
>
> Can you please paste the sytax here.
>
> Thanks
>
>
> On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>>
>> Use the get neighbors function.
>>
>> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise > > wrote:
>>
>>> Hello everyone, below is the first page of my list page, The first 
>>> attachment..
>>>
>>> On clicking on any of the data on the first page, it will open up and 
>>> show like the second attachment. 
>>>
>>> Now the problem is, I want to add a "Next " and "Previous" button to the 
>>> second attachment, so that I will not need to go to the first page(first 
>>> attachment ) in order to access the next or previous record.
>>>
>>> HOW CAN I ACHIEVE THIS? 
>>>
>>> -- 
>>> 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.
>>> To post to this group, send email to cake...@googlegroups.com.
>>> Visit this group at https://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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Can someone please help with the syntax necessary to create the following query in Cake 3

2015-12-11 Thread heavyKevy
This is the target query:
SELECT 
  Players.id AS `Players__id`, 
  Players.user_id AS `Players__user_id`, 
  Players.opt_out AS `Players__opt_out`, 
  Users.email AS `Users__email`, 
  Users.first_name AS `Users__first_name`, 
  s.searches AS `Players__search_count`, 
  v.views AS `view_count`, 
  p.prospects AS `prospect_count` 
FROM 
  players Players 
  LEFT JOIN ( SELECT player_id, COUNT(id) searches FROM 
player_recruiter_searches WHERE created >= '2015-12-10 11:14:48' group by 
player_id )s ON (
s.player_id = Players.id 
  ) 
  LEFT JOIN ( SELECT player_id, COUNT(id) views FROM player_recruiter_views 
WHERE  created >= '2015-12-10 11:14:48' group by player_id) v ON (
v.player_id = Players.id 
  ) 
  LEFT JOIN ( SELECT player_id, COUNT(id) prospects FROM 
player_recruiter_prospects WHERE  created >= '2015-12-10 11:14:48' group by 
player_id)p ON (
p.player_id = Players.id
  ) 
  INNER JOIN users Users ON Users.id = (Players.user_id) 
WHERE 
  Players.opt_out != 1 

Here is the code that I am trying to use to get the query:

$yesterday = new DateTime('-1 days');
$SearchCount = $this->PlayerRecruiterSearches->find()
  ->select([ 'player_id'=>'player_id','searches'=> 'COUNT(id)' ])
  ->where(['created >='=> $yesterday])
  ->group('player_id');
$ViewCount = $this->PlayerRecruiterViews->find()
  ->select([ 'player_id'=>'player_id','views'=> 'COUNT(id)' ])
  ->where(['created >='=> $yesterday])
  ->group('player_id');
$ProspectCount = $this->PlayerRecruiterProspects->find()
  ->select([ 'player_id'=>'player_id','prospects'=> 'COUNT(id)' ])
  ->where(['created >='=> $yesterday])
  ->group('player_id');

$qry = $this->find('all',['contain' => ['Users']]) 
  ->join([
's' => [$SearchCount,
  'type' => 'LEFT',
  'conditions'=> ['s.player_id = Players.id']],
'v' => [$ViewCount,
  'type' => 'LEFT',
  'conditions'=> ['v.player_id = Players.id']],
'p' => [$ProspectCount,
  'type' => 'LEFT',
  'conditions'=> ['p.player_id = Players.id']]
  ])
  ->select($this)
  ->select($this->Users)
  ->select(['search_count'=>'s.searches','view_count' => 'v.views', 
'prospect_count' => 'p.prospects'])
  ->where(["Players.opt_out !=" => true]);

The query spit out is missing the 3 aliased subqueries such as this one:
SELECT player_id, COUNT(id) searches FROM player_recruiter_searches WHERE 
created >= '2015-12-10 11:14:48' group by player_id

What did I miss or do wrong?

according to the 
documentation: http://book.cakephp.org/3.0/en/orm/query-builder.html#subqueries
Subqueries are accepted anywhere a query expression can be used. For 
example, in the select() and join()methods.

However, there is little or no detail instructing how this would be done...

Thanks in advance for any help...
--Kevin

-- 
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 someone please help with the syntax necessary to create the following query in Cake 3

2015-12-11 Thread heavyKevy
Never mind... I got it.
I discovered that the join ('table') must be set
changed the following:
join([
's' => [$SearchCount,
  'type' => 'LEFT',
  'conditions'=> ['s.player_id = Players.id']],
'v' => [$ViewCount,
  'type' => 'LEFT',
  'conditions'=> ['v.player_id = Players.id']],
'p' => [$ProspectCount,
  'type' => 'LEFT',
  'conditions'=> ['p.player_id = Players.id']]

to:
join([
's' => ['table' => $SearchCount,
  'type' => 'LEFT',
  'conditions'=> ['s.player_id = Players.id']],
'v' => ['table' => $ViewCount,
  'type' => 'LEFT',
  'conditions'=> ['v.player_id = Players.id']],
'p' => ['table' => $ProspectCount,
  'type' => 'LEFT',
  'conditions'=> ['p.player_id = Players.id']]

and it is now working.


On Friday, December 11, 2015 at 8:43:16 PM UTC+7, heavyKevy wrote:
>
> This is the target query:
> SELECT 
>   Players.id AS `Players__id`, 
>   Players.user_id AS `Players__user_id`, 
>   Players.opt_out AS `Players__opt_out`, 
>   Users.email AS `Users__email`, 
>   Users.first_name AS `Users__first_name`, 
>   s.searches AS `Players__search_count`, 
>   v.views AS `view_count`, 
>   p.prospects AS `prospect_count` 
> FROM 
>   players Players 
>   LEFT JOIN ( SELECT player_id, COUNT(id) searches FROM 
> player_recruiter_searches WHERE created >= '2015-12-10 11:14:48' group by 
> player_id )s ON (
> s.player_id = Players.id 
>   ) 
>   LEFT JOIN ( SELECT player_id, COUNT(id) views FROM 
> player_recruiter_views WHERE  created >= '2015-12-10 11:14:48' group by 
> player_id) v ON (
> v.player_id = Players.id 
>   ) 
>   LEFT JOIN ( SELECT player_id, COUNT(id) prospects FROM 
> player_recruiter_prospects WHERE  created >= '2015-12-10 11:14:48' group by 
> player_id)p ON (
> p.player_id = Players.id
>   ) 
>   INNER JOIN users Users ON Users.id = (Players.user_id) 
> WHERE 
>   Players.opt_out != 1 
>
> Here is the code that I am trying to use to get the query:
>
> $yesterday = new DateTime('-1 days');
> $SearchCount = $this->PlayerRecruiterSearches->find()
>   ->select([ 'player_id'=>'player_id','searches'=> 'COUNT(id)' ])
>   ->where(['created >='=> $yesterday])
>   ->group('player_id');
> $ViewCount = $this->PlayerRecruiterViews->find()
>   ->select([ 'player_id'=>'player_id','views'=> 'COUNT(id)' ])
>   ->where(['created >='=> $yesterday])
>   ->group('player_id');
> $ProspectCount = $this->PlayerRecruiterProspects->find()
>   ->select([ 'player_id'=>'player_id','prospects'=> 'COUNT(id)' ])
>   ->where(['created >='=> $yesterday])
>   ->group('player_id');
>
> $qry = $this->find('all',['contain' => ['Users']]) 
>   ->join([
> 's' => [$SearchCount,
>   'type' => 'LEFT',
>   'conditions'=> ['s.player_id = Players.id']],
> 'v' => [$ViewCount,
>   'type' => 'LEFT',
>   'conditions'=> ['v.player_id = Players.id']],
> 'p' => [$ProspectCount,
>   'type' => 'LEFT',
>   'conditions'=> ['p.player_id = Players.id']]
>   ])
>   ->select($this)
>   ->select($this->Users)
>   ->select(['search_count'=>'s.searches','view_count' => 'v.views', 
> 'prospect_count' => 'p.prospects'])
>   ->where(["Players.opt_out !=" => true]);
>
> The query spit out is missing the 3 aliased subqueries such as this one:
> SELECT player_id, COUNT(id) searches FROM player_recruiter_searches WHERE 
> created >= '2015-12-10 11:14:48' group by player_id
>
> What did I miss or do wrong?
>
> according to the documentation: 
> http://book.cakephp.org/3.0/en/orm/query-builder.html#subqueries
> Subqueries are accepted anywhere a query expression can be used. For 
> example, in the select() and join()methods.
>
> However, there is little or no detail instructing how this would be done...
>
> Thanks in advance for any help...
> --Kevin
>

-- 
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.


can you help me how to create highcharts in cakephp

2015-11-20 Thread Deepak Mishra
can you help me how to create highcharts in cakephp plz  help me

-- 
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 you help me how to create highcharts in cakephp

2015-11-20 Thread John Andersen
What have you done yourself?
How far have you gone?
What errors are you having?

Enjoy, John

On Friday, 20 November 2015 13:53:41 UTC+2, Deepak Mishra wrote:
>
> can you help me how to create highcharts in cakephp plz  help me
>

-- 
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.


Help CakePhp 3.0

2015-10-27 Thread Ricardo Franco
How to write the tags below to the version 3.0 of the cake?

* New *


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/d/optout.


Re: Looking for a CakePHP Tutor with some help with MVC project

2015-10-15 Thread heavyKevy
Corey,

I am be willing to help.
Let me know what help/assistance you need.

Regards,
--Kevin

On Thursday, October 15, 2015 at 3:45:06 AM UTC+7, LSRX4EVER wrote:
>
> Hello,
>
> I am currently working on an internship web application that is utilizing 
> CakePHP. Currently I have a very large mysql database schema and have been 
> working slowly on developing and learning CakePHP. I am interested in 
> finding a developer who is willing to freely devote some of their time in 
> educating/assistanting me along with my project. I have dove through tons 
> of documentation, forums and examples and it would be great to bounce a few 
> questions or ideas with an educated cakephp developer. Please message me or 
> email me if someone is interested.
>
> Thanks,
> Corey
>

-- 
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.


Looking for a CakePHP Tutor with some help with MVC project

2015-10-14 Thread LSRX4EVER
Hello,

I am currently working on an internship web application that is utilizing 
CakePHP. Currently I have a very large mysql database schema and have been 
working slowly on developing and learning CakePHP. I am interested in 
finding a developer who is willing to freely devote some of their time in 
educating/assistanting me along with my project. I have dove through tons 
of documentation, forums and examples and it would be great to bounce a few 
questions or ideas with an educated cakephp developer. Please message me or 
email me if someone is interested.

Thanks,
Corey

-- 
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.


[help] CakePHP 3 - associated entities not coming through from find() (or get) even with contain clause

2015-09-17 Thread Ernesto Borio


Some associated data is not coming through, although it's in the contain
 clause.

I can get $project->Participants if I set a belongsToMany relationship in 
the Projects table, relating to Participants through ProjectParticipants, 
but that way I still can't reach other tables associated with 
ProjectParticipants even with 
$project->participants->_joinData->other_related_table

How would I do to get ProjectParticipants and Participants with the same 
query?

Code:

// Database: Projects <--1:N-- ProjectParticipants --M:1--> Participants
// ProjectController:
$project = $this->Projects->get($id, ['contain'=>[
'ProjectParticipants.Participants']);// ProjectsTable:
$this->hasMany('ProjectParticipants', [
'foreignKey' => 'project_id']);// ProjectParticipantsTable:
$this->belongsTo('Participants', [
'foreignKey' => 'participant_id']);


Thanks!

http://stackoverflow.com/questions/32634856/cakephp3-associated-entities-not-coming-through-from-find-or-get-even-with-c

-- 
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.


help with uploadedFile validation rule

2015-09-17 Thread Raul Magdalena Catala
hello,

i can not understand how uploadedFile validation rule works, 
http://api.cakephp.org/3.0/class-Cake.Validation.Validation.html#_uploadedFile

can someone help me with and example, expanding below code?

$validator
   ->add('image', ['rule' => ['uploadedFile, 


thanks

-- 
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.


CakePHP 3 Book: Is anyone writing an introductory book to help beginners get started?

2015-07-12 Thread Paul M
Is anyone writing an introductory book about CakePHP 3 aimed at beginners? 
I'm asking because I've seen books about other frameworks such as Yii and 
Laravel. They can typically be found on LeanPub, Amazon / Kindle, and 
Paktpub.com etc. But I have not seen any CakePHP 3 books. The most recent 
book is about version 2. It's called CakePHP 2 Application Cookbook by 
James Watts.

If an introductory book made it easier to learn CakePHP 3, then it would 
help attract new users. 

Here's a google trends chart showing that interest in CakePHP  has not 
increased recently, despite the release of version 3.0:

https://www.google.ca/trends/explore#q=cakephp%2C%20codeigniter%2C%20yii%2C%20laravel%2C%20symfonygeo=USdate=1%2F2014%2018mcmpt=qtz=Etc%2FGMT%2B3




-- 
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: Help Installing CakePHP 3

2015-06-23 Thread Sebastiao Marcos
go to Xamp panel, 'config' apache select - 'php.ini' find search intl 
uncoment, reboot service, and comanda again.

-- 
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.


Help Installing CakePHP 3

2015-06-14 Thread Daniel Travelstead
 
Hi all,

I have just recently gotten into PHP and want to install CakePHP 3 through 
Xampp. There's many tutorials on how to do so, but for whatever reason non 
of them work. I keep getting the problem when running through Terminal:

cakephp/cakephp 3.0.x-dev requires ext-intl * - the requested PHP 
extension intl is missing from your system.

The most obvious explanation is to simply uncomment the intl extension in 
the php.ini file but that still doesn't solve the problem. Most users I 
have come across say the php.ini file should be under 
xamppfiles/php/php.ini but my path is different for some reason: 
/Applications/XAMPP/xamppfiles/etc/php.ini.

I've tried everything I can think of including a fresh install of Xampp. If 
anyone has run into the same or a similar problem I would sure appreciate 
some help.

I am currently running on Mac OS X Yosemite. 

-- 
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: Help Installing CakePHP 3

2015-06-14 Thread McBuck DGAF
After your initial Xampp install, you should be able to go to the standard 
phpinfo screen (I think xampp serves one up at 
http://localhost/xampp/phpinfo.php).  The location of the current php.ini 
file in use by the system will be listed there under the title Loaded 
configuration file  (for example: /etc/php5/apache2/php.ini).  There will 
also be listing for a directory to be scanned for additional .ini files 
(example, /etc/php5/apache2/conf.d), and then a full listing of all .ini 
files parsed.  If modifying the correct php.ini file does not work for some 
reason (you restarted Apache afterwards, right?), then maybe there are 
conflicting settings in one of the other .ini files.  Good luck!

On Sunday, June 14, 2015 at 10:55:00 PM UTC-4, Daniel Travelstead wrote:

  
 Hi all,

 I have just recently gotten into PHP and want to install CakePHP 3 through 
 Xampp. There's many tutorials on how to do so, but for whatever reason non 
 of them work. I keep getting the problem when running through Terminal:

 cakephp/cakephp 3.0.x-dev requires ext-intl * - the requested PHP 
 extension intl is missing from your system.

 The most obvious explanation is to simply uncomment the intl extension in 
 the php.ini file but that still doesn't solve the problem. Most users I 
 have come across say the php.ini file should be under 
 xamppfiles/php/php.ini but my path is different for some reason: 
 /Applications/XAMPP/xamppfiles/etc/php.ini.

 I've tried everything I can think of including a fresh install of Xampp. 
 If anyone has run into the same or a similar problem I would sure 
 appreciate some help.

 I am currently running on Mac OS X Yosemite. 


-- 
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: I need some help with CakeDC Search

2015-06-02 Thread Christian Quispe
Hola

También hablo español. Cuentame exactamente que no funciona

Saludos

Enviado desde Gmail para Android en Moto G

www.oxicode.io
El jun. 1, 2015 4:57 AM, euromark dereurom...@gmail.com escribió:

 See http://sandbox3.dereuromark.de/sandbox/search-examples and the code
 to it for example.


 Am Sonntag, 31. Mai 2015 23:39:15 UTC+2 schrieb Jekill CR:


 *I need some help with CakeDC Search i configured the plugin with the
 instructions and nothing happens.*

 Only show the text of the search on the Web Browser search input.

 Please if someone have a working configuration and can share with me.

 thanks in advance!


 I need the most simple configuration nothing special.

 Sorry for my bad english.

 Jesus Castro - Costa Rica

  --
 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: Help with Breadcrumbs

2015-06-02 Thread Christian Quispe
Hola

Después del foreach has un pr($cat);
Nos muestras los resultados

Saludos

Enviado desde Gmail para Android en Moto G

www.oxicode.io
El may. 31, 2015 4:39 PM, Jekill CR pcma...@gmail.com escribió:




 *Hi! friends i am  from Costa Rica and need some help with the breadcrumbs
 This is the problem im trying to generate the breadcrumbs with this code in
 my view:*

 ?php foreach ($category as $cat): ?


  ?php $this-Html-addCrumb('Categorias', array('controller' =
 'categories', 'action' = 'index'));?
  ?php $this-Html-addCrumb($cat['name'], array('controller' =
 'categories', 'action' = 'view',$cat['id']));?



 ?php
 echo $this-Html-getCrumbs(' ► ', array(
 'text'='Inicio',
 'url' = array('controller' = 'anuncios', 'action' = 'index'),
 'escape' = false));
 ?
 ?php endforeach ?


 *but jump a Notice:*

 Inicio http://localhost/cakephp/anuncios ► Categorias
 http://localhost/cakephp/categories ► Juguetes  Well formed
 breadcrumb http://localhost/cakephp/categories/view/16

 *Notice* (8): Undefined index: name [*APP\View\Categories\view.ctp*, line 
 *276*]

 *Notice* (8): Undefined index: id [*APP\View\Categories\view.ctp*, line *276*]

 Inicio http://localhost/cakephp/anuncios ► Categorias
 http://localhost/cakephp/categories ► Juguetes
 http://localhost/cakephp/categories/view/16 ► Categorias
 http://localhost/cakephp/categories ►  Bad formed breadcrumb
 http://localhost/cakephp/categories/view/16

 If you can help me with this error.

 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.


-- 
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: I need some help with CakeDC Search

2015-06-01 Thread euromark
See http://sandbox3.dereuromark.de/sandbox/search-examples and the code to 
it for example.


Am Sonntag, 31. Mai 2015 23:39:15 UTC+2 schrieb Jekill CR:


 *I need some help with CakeDC Search i configured the plugin with the 
 instructions and nothing happens.*

 Only show the text of the search on the Web Browser search input.

 Please if someone have a working configuration and can share with me.

 thanks in advance!


 I need the most simple configuration nothing special.

 Sorry for my bad english.

 Jesus Castro - Costa Rica 


-- 
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.


I need some help with CakeDC Search

2015-05-31 Thread Jekill CR

*I need some help with CakeDC Search i configured the plugin with the 
instructions and nothing happens.*

Only show the text of the search on the Web Browser search input.

Please if someone have a working configuration and can share with me.

thanks in advance!


I need the most simple configuration nothing special.

Sorry for my bad english.

Jesus Castro - Costa Rica 

-- 
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.


Help! exception handling

2015-05-31 Thread Sebastian Caballero


Hello Friends

I have a problem I do not understand how to solve, need to
capture the error code ($ error- getCode ()) and put on an equal setFlash
website that I use to set whether a save operation was deleted or modified
successfully or not.

The issue is that when there is an exception for an
inconsistency of BD (Error 2300) I can put a setFlash that says can not
be deleted because the registration is being used by this table or
something.

If I can lend a hand to address this.


I tried to use its own error handler class as follows:

class MyExceptionHandler extends ErrorHandler{
public static function handle($error) {


echo $error-getCode();

}
}

Thanks.

I tried to use its own error handler class as follows:
 

-- 
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.


Help with Breadcrumbs

2015-05-31 Thread Jekill CR



*Hi! friends i am  from Costa Rica and need some help with the breadcrumbs 
This is the problem im trying to generate the breadcrumbs with this code in 
my view:*

?php foreach ($category as $cat): ?


 ?php $this-Html-addCrumb('Categorias', array('controller' = 
'categories', 'action' = 'index'));?
 ?php $this-Html-addCrumb($cat['name'], array('controller' = 
'categories', 'action' = 'view',$cat['id']));?



?php
echo $this-Html-getCrumbs(' ► ', array(
'text'='Inicio',
'url' = array('controller' = 'anuncios', 'action' = 'index'),
'escape' = false));
?
?php endforeach ?


*but jump a Notice:*

Inicio http://localhost/cakephp/anuncios ► Categorias 
http://localhost/cakephp/categories ► Juguetes  Well formed breadcrumb 
http://localhost/cakephp/categories/view/16 

*Notice* (8): Undefined index: name [*APP\View\Categories\view.ctp*, line *276*]

*Notice* (8): Undefined index: id [*APP\View\Categories\view.ctp*, line *276*]

Inicio http://localhost/cakephp/anuncios ► Categorias 
http://localhost/cakephp/categories ► Juguetes 
http://localhost/cakephp/categories/view/16 ► Categorias 
http://localhost/cakephp/categories ►  Bad formed breadcrumb 
http://localhost/cakephp/categories/view/16

If you can help me with this error.

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.


Getting started ... help!

2015-05-01 Thread Paul Snell
I am trying to use cakepdf to create a fairly large pdf on the fly..

I had a few set up problems, but they seem to be okay now.

However, when I to to generate a pdf all I end up with (after a fairly long 
delay) is a completely blank page (even source is empty).  SO I must be 
doing something wrong.

I feel that I don't really understand the following fully:


view/layout/pdf/default.ctp - what is the bare minimum I have to put in 
this file?  I know that if it is not present, then you get the missing 
default.ctp error.

CONFIGURATION... okay, this is where it becomes clear that I am a naive 
user.  There are two examples of code in the configuration section, but I 
am not clear whether a) I need both or just one, and b) WHERE do these go, 
particularly the Configure::write bit (I think the second bit is clearly in 
the appropriate controller for the model you are using).

These are the things that I am not sure about, but if anyone knows why I 
might be getting a completely blank pdf for reasons other than these, I 
would be grateful for any advice.

Thanks

Paul

-- 
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.


Facing problem with CakePHP 3.0.1 Routing, Please Help me ASAP

2015-05-01 Thread ziyed uddin
Hi ,
i am a software engineer. i have working with cakephp since 2011. i was 
good at cakephp 2. after that i was totally detached from cakephp. recently 
i am back and last day i try to install and totally you improve lot of 
things with new version 3. i have created a sample blog project and create 
all the action model view. i point to article index action, its working 
fine. but when i click to edit or view article then problem cumming i am 
trying but can not figure it. Need help

while browsing : url/articles/view/1

show error:

Not Found 

The requested URL /lionsbusiness/articles/view/1 was not found on this 
server.  

Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80

Please help me to solve this really urgent. it will be very helpful to me 
if any one attach a simple blog cakephp 3.0.1 project in reply thus i can 
understand what is my fault.


Thanks in advance

ziyed
 

-- 
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.
attachment: routes.php


Re: Help

2015-03-26 Thread José Lorenzo
Follow this tutorial http://book.cakephp.org/3.0/en/quickstart.html

On Wednesday, March 25, 2015 at 4:53:57 PM UTC+1, Musa Dima wrote:

 Dear All I'm very new for cakePhP i want to learn cake php from Scratch 
 any body who can give me link for full video tutorial and other material.
 warmly regards


-- 
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.


Help

2015-03-25 Thread Musa Dima
Dear All I'm very new for cakePhP i want to learn cake php from Scratch any 
body who can give me link for full video tutorial and other material.
warmly regards

-- 
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.


cakephp 3.0 stable == need help with save assosiated, but data have composite primarykey

2015-03-24 Thread Farid Aditya
help i cann't saving data with save that have assosiated
*nb*:  *all my table used Inflector::rules('uninflected', 
['dontinflectme']), so i don't have proble with naming convension*


*this is my model table*

class KaryawanTable extends Table {

/**
 * Initialize method
 *
 * @param array $config The configuration for the Table.
 * @return void
 */
public function initialize(array $config) {
$this-table('karyawan');
$this-displayField('id');
$this-primaryKey(['id', 'kantor_id']);
$this-belongsTo('Kantor', [
'className' = 'Kantor',
'foreignKey' = 'kantor_id'
]);
$this-belongsTo('Jabatan', [
'className' = 'Jabatan',
'foreignKey' = 'jabatan_id'
]);
$this-belongsTo('Jenisidentitas', [
'className' = 'Jenisidentitas',
'foreignKey' = 'jenisidentitas_id'
]);
$this-hasMany('Telpkaryawan', [
'className' = 'Telpkaryawan',
'foreignKey' = ['karyawan_id', 'karyawan_kantor_id']
]);
$this-hasOne('Rgnuser', [
'className' = 'Rgnuser',
'foreignKey' = ['karyawan_id', 'karyawan_kantor_id']
]);
}

public function validationDefault(Validator $validator) {
$validator
-add('id', 'valid', ['rule' = 'numeric'])
-allowEmpty('id', 'create')
-allowEmpty('kantor_id', 'create')
-allowEmpty('noPegawai')
-requirePresence('tempatKerja', 'create')
-notEmpty('tempatKerja')
-add('jabatan_id', 'valid', ['rule' = 'numeric'])
-requirePresence('jabatan_id', 'create')
-notEmpty('jabatan_id')
-allowEmpty('namaDepan')
-allowEmpty('namaBelakang')
-allowEmpty('gelar')
-allowEmpty('alamat')
-allowEmpty('tempatLahir')
-add('tanggalLahir', 'valid', ['rule' = 'date'])
-allowEmpty('tanggalLahir');

return $validator;
}

public function buildRules(RulesChecker $rules) {
$rules-add($rules-existsIn(['kantor_id'], 'Kantor'));
$rules-add($rules-existsIn(['jabatan_id'], 'Jabatan'));
return $rules;
}
}

*this's my controller method add*

public function add() {
$karyawan = $this-Karyawan-newEntity();
if ($this-request-is('post')) {
$this-request-data['kantor_id'] = $this-request-session()
-read('Auth.User.karyawan.tempatKerja');
$this-request-data['Rgnuser']['karyawan_kantor_id'] = 
$this-request-session()
-read('Auth.User.karyawan.tempatKerja');
$karyawan = $this-Karyawan-newEntity(
$karyawan,
$this-request-data,['associated' = ['Rgnuser']]);
if ($this-Karyawan-save($karyawan)) {
$this-Flash-success('The karyawan has been saved.');
return $this-redirect(['action' = 'add']);
} else {
$this-Flash-error('The karyawan could not be saved. 
Please, try again.');
}
}
$kantor = $this-Karyawan-Kantor-find('list', ['limit' = 200]);
$jabatan = $this-Karyawan-Jabatan-find('list', ['limit' = 200]);
$jenisidentitas = $this-Karyawan-Jenisidentitas-find('list', 
['limit' = 200]);
$this-loadModel('Userlevel');
$userLevel = $this-Userlevel-find('list', ['limit' = 200]);
$this-set(compact('karyawan', 'kantor', 'jabatan', 
'jenisidentitas', 'userLevel'));
$this-set('_serialize', ['karyawan']);
}

and this is error message

Cake\ORM\Marshaller::one() - CORE\src\ORM\Marshaller.php, line 101
Cake\ORM\Table::newEntity() - CORE\src\ORM\Table.php, line 1953
App\Controller\KaryawanController::add() - 
APP/Controller\KaryawanController.php, line 54
Cake\Controller\Controller::invokeAction() - 
CORE\src\Controller\Controller.php, line 405
Cake\Routing\Dispatcher::_invoke() - CORE\src\Routing\Dispatcher.php, line 114
Cake\Routing\Dispatcher::dispatch() - CORE\src\Routing\Dispatcher.php, line 87
[main] - ROOT\webroot\index.php, line 37


help how to fix this problem

-- 
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 cipherseed removal and password migration - HELP

2015-02-26 Thread mcloide
Talking with my co-workers we might have found the reason why the hash is 
so different.

The original hash was made in php 5.3, this test was made in php 5.6, when 
I first tested the issue that generated this thread it was also under php 
5.6 which means, that, knowing that php has changed it's hash mechanisms it 
might explain why  the hash string is so far apart.
 

On Thursday, February 26, 2015 at 3:48:16 PM UTC-5, mcloide wrote:

 Well I did more than simply doing some gists but it did help me see that 
 my current application has something wrong in sense that you are correct, 
 cake2 to cake3 Simple and Weak methods are the same.

 This is my path for troubleshooting:

 Create a new cake 2.6.2 application from scratch, add authentication, and 
 users creation.
 Create a new cake 3 application from scratch, add authentication and users 
 creation.

 In summary both apps looks just like the Blog tutorials from both Cake 2.6 
 and Cake 3. In the gist there are the important files related to both apps.

 https://gist.github.com/mcloide/28cb28a36dc3238ae666

 Based on the resulting table (also on the gist), you are 100% right, my 
 cake 3 application should be able to login using my cake 2 application 
 password since it doesn't, I needed to troubleshoot a bit more and I have 
 found out that I had a double Auth entry on my cake 2 app controller. 

 https://gist.github.com/mcloide/a1276e078c1d372e5a97

 The part that is killing me right now is how did the changeme password 
 got saved as 
 cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43 instead 
 of c88333b093105e07acff5b19be6fbaf51e6482b1 and, even after the App 
 Controller authentication was corrected, removing the 2nd 'Auth entry the 
 login still works on the old application in which I would assume it 
 wouldn't.

 Is there any way that I can know what hashing method is if 
 ($this-Auth-login()) using at the login moment?





 On Thursday, February 26, 2015 at 3:19:37 AM UTC-5, José Lorenzo wrote:

 How did you configure the salt and your Weak password hasher? Please show 
 the code in gist or here.

 I can guarantee that passwords can be used from cake 2 in cake 3 because 
 I've migrated a couple apps already.

 On Thursday, February 26, 2015 at 9:06:57 AM UTC+1, mcloide wrote:

 This is a scenario that is true to me and it is leading me to take the 
 decision to not upgrade to Cake3 at this moment.

 I have 2 applications and one has to communicate with another. One 
 application has been fully built with the latest stable version of cake 2 
 and the new application, that is on legacy code, was going to be using cake 
 3 so we could benefit of all of the new perks. Unfortunately with the 
 removal of the cipherseed and the cipher functions a password that was 
 generated in cake2 now can't be used in cake3.

 Example of password encryption results using CakePHP 2.6 and CakePHP 3

 password =  changeme
 Salt and Cipherseed where kept the same among both versions.

 CakePHP 2.6
 HashClass = Simple
 HashType = SHA256
 Encryption result = 
 *cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

 CakePHP 3
 HashClass = Weak
 HashType = SHA256
 Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

 I had asked this on twitter before and the response that I got was that 
 there would be backwards compatibility if you were using Simple password 
 hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't need to 
 change all my users passwords through the database or force them to reset 
 their password.

 Based on the result above I don't see how I can use the same password 
 system from Cake 2 to Cake 3 and it also doesn't seem like it is using the 
 hashType set on config.

 Is there anything I'm missing here. Can anyone help?

 I need to decide really quick if I will move forth with Cake 3 or keep 
 development with Cake 2.

 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: CakePHP 3 cipherseed removal and password migration - HELP

2015-02-26 Thread mcloide
Well I did more than simply doing some gists but it did help me see that my 
current application has something wrong in sense that you are correct, 
cake2 to cake3 Simple and Weak methods are the same.

This is my path for troubleshooting:

Create a new cake 2.6.2 application from scratch, add authentication, and 
users creation.
Create a new cake 3 application from scratch, add authentication and users 
creation.

In summary both apps looks just like the Blog tutorials from both Cake 2.6 
and Cake 3. In the gist there are the important files related to both apps.

https://gist.github.com/mcloide/28cb28a36dc3238ae666

Based on the resulting table (also on the gist), you are 100% right, my 
cake 3 application should be able to login using my cake 2 application 
password since it doesn't, I needed to troubleshoot a bit more and I have 
found out that I had a double Auth entry on my cake 2 app controller. 

https://gist.github.com/mcloide/a1276e078c1d372e5a97

The part that is killing me right now is how did the changeme password 
got saved as 
cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43 instead 
of c88333b093105e07acff5b19be6fbaf51e6482b1 and, even after the App 
Controller authentication was corrected, removing the 2nd 'Auth entry the 
login still works on the old application in which I would assume it 
wouldn't.

Is there any way that I can know what hashing method is if 
($this-Auth-login()) using at the login moment?





On Thursday, February 26, 2015 at 3:19:37 AM UTC-5, José Lorenzo wrote:

 How did you configure the salt and your Weak password hasher? Please show 
 the code in gist or here.

 I can guarantee that passwords can be used from cake 2 in cake 3 because 
 I've migrated a couple apps already.

 On Thursday, February 26, 2015 at 9:06:57 AM UTC+1, mcloide wrote:

 This is a scenario that is true to me and it is leading me to take the 
 decision to not upgrade to Cake3 at this moment.

 I have 2 applications and one has to communicate with another. One 
 application has been fully built with the latest stable version of cake 2 
 and the new application, that is on legacy code, was going to be using cake 
 3 so we could benefit of all of the new perks. Unfortunately with the 
 removal of the cipherseed and the cipher functions a password that was 
 generated in cake2 now can't be used in cake3.

 Example of password encryption results using CakePHP 2.6 and CakePHP 3

 password =  changeme
 Salt and Cipherseed where kept the same among both versions.

 CakePHP 2.6
 HashClass = Simple
 HashType = SHA256
 Encryption result = 
 *cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

 CakePHP 3
 HashClass = Weak
 HashType = SHA256
 Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

 I had asked this on twitter before and the response that I got was that 
 there would be backwards compatibility if you were using Simple password 
 hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't need to 
 change all my users passwords through the database or force them to reset 
 their password.

 Based on the result above I don't see how I can use the same password 
 system from Cake 2 to Cake 3 and it also doesn't seem like it is using the 
 hashType set on config.

 Is there anything I'm missing here. Can anyone help?

 I need to decide really quick if I will move forth with Cake 3 or keep 
 development with Cake 2.

 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: CakePHP 3 cipherseed removal and password migration - HELP

2015-02-26 Thread José Lorenzo
I see the problem... It looks like you have been hashing the passwords all 
this time with sha1 (which is the deafult in cake 2) since you had the 
duplicate configuration.

On Thursday, February 26, 2015 at 9:59:21 PM UTC+1, mcloide wrote:

 Talking with my co-workers we might have found the reason why the hash is 
 so different.

 The original hash was made in php 5.3, this test was made in php 5.6, when 
 I first tested the issue that generated this thread it was also under php 
 5.6 which means, that, knowing that php has changed it's hash mechanisms it 
 might explain why  the hash string is so far apart.
  

 On Thursday, February 26, 2015 at 3:48:16 PM UTC-5, mcloide wrote:

 Well I did more than simply doing some gists but it did help me see that 
 my current application has something wrong in sense that you are correct, 
 cake2 to cake3 Simple and Weak methods are the same.

 This is my path for troubleshooting:

 Create a new cake 2.6.2 application from scratch, add authentication, and 
 users creation.
 Create a new cake 3 application from scratch, add authentication and 
 users creation.

 In summary both apps looks just like the Blog tutorials from both Cake 
 2.6 and Cake 3. In the gist there are the important files related to both 
 apps.

 https://gist.github.com/mcloide/28cb28a36dc3238ae666

 Based on the resulting table (also on the gist), you are 100% right, my 
 cake 3 application should be able to login using my cake 2 application 
 password since it doesn't, I needed to troubleshoot a bit more and I have 
 found out that I had a double Auth entry on my cake 2 app controller. 

 https://gist.github.com/mcloide/a1276e078c1d372e5a97

 The part that is killing me right now is how did the changeme password 
 got saved as 
 cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43 instead 
 of c88333b093105e07acff5b19be6fbaf51e6482b1 and, even after the App 
 Controller authentication was corrected, removing the 2nd 'Auth entry the 
 login still works on the old application in which I would assume it 
 wouldn't.

 Is there any way that I can know what hashing method is if 
 ($this-Auth-login()) using at the login moment?





 On Thursday, February 26, 2015 at 3:19:37 AM UTC-5, José Lorenzo wrote:

 How did you configure the salt and your Weak password hasher? Please 
 show the code in gist or here.

 I can guarantee that passwords can be used from cake 2 in cake 3 because 
 I've migrated a couple apps already.

 On Thursday, February 26, 2015 at 9:06:57 AM UTC+1, mcloide wrote:

 This is a scenario that is true to me and it is leading me to take the 
 decision to not upgrade to Cake3 at this moment.

 I have 2 applications and one has to communicate with another. One 
 application has been fully built with the latest stable version of cake 2 
 and the new application, that is on legacy code, was going to be using 
 cake 
 3 so we could benefit of all of the new perks. Unfortunately with the 
 removal of the cipherseed and the cipher functions a password that was 
 generated in cake2 now can't be used in cake3.

 Example of password encryption results using CakePHP 2.6 and CakePHP 3

 password =  changeme
 Salt and Cipherseed where kept the same among both versions.

 CakePHP 2.6
 HashClass = Simple
 HashType = SHA256
 Encryption result = 
 *cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

 CakePHP 3
 HashClass = Weak
 HashType = SHA256
 Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

 I had asked this on twitter before and the response that I got was that 
 there would be backwards compatibility if you were using Simple password 
 hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't need to 
 change all my users passwords through the database or force them to reset 
 their password.

 Based on the result above I don't see how I can use the same password 
 system from Cake 2 to Cake 3 and it also doesn't seem like it is using the 
 hashType set on config.

 Is there anything I'm missing here. Can anyone help?

 I need to decide really quick if I will move forth with Cake 3 or keep 
 development with Cake 2.

 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.


CakePHP 3 cipherseed removal and password migration - HELP

2015-02-26 Thread mcloide
This is a scenario that is true to me and it is leading me to take the 
decision to not upgrade to Cake3 at this moment.

I have 2 applications and one has to communicate with another. One 
application has been fully built with the latest stable version of cake 2 
and the new application, that is on legacy code, was going to be using cake 
3 so we could benefit of all of the new perks. Unfortunately with the 
removal of the cipherseed and the cipher functions a password that was 
generated in cake2 now can't be used in cake3.

Example of password encryption results using CakePHP 2.6 and CakePHP 3

password =  changeme
Salt and Cipherseed where kept the same among both versions.

CakePHP 2.6
HashClass = Simple
HashType = SHA256
Encryption result = 
*cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

CakePHP 3
HashClass = Weak
HashType = SHA256
Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

I had asked this on twitter before and the response that I got was that 
there would be backwards compatibility if you were using Simple password 
hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't need to 
change all my users passwords through the database or force them to reset 
their password.

Based on the result above I don't see how I can use the same password 
system from Cake 2 to Cake 3 and it also doesn't seem like it is using the 
hashType set on config.

Is there anything I'm missing here. Can anyone help?

I need to decide really quick if I will move forth with Cake 3 or keep 
development with Cake 2.

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: CakePHP 3 cipherseed removal and password migration - HELP

2015-02-26 Thread José Lorenzo
How did you configure the salt and your Weak password hasher? Please show 
the code in gist or here.

I can guarantee that passwords can be used from cake 2 in cake 3 because 
I've migrated a couple apps already.

On Thursday, February 26, 2015 at 9:06:57 AM UTC+1, mcloide wrote:

 This is a scenario that is true to me and it is leading me to take the 
 decision to not upgrade to Cake3 at this moment.

 I have 2 applications and one has to communicate with another. One 
 application has been fully built with the latest stable version of cake 2 
 and the new application, that is on legacy code, was going to be using cake 
 3 so we could benefit of all of the new perks. Unfortunately with the 
 removal of the cipherseed and the cipher functions a password that was 
 generated in cake2 now can't be used in cake3.

 Example of password encryption results using CakePHP 2.6 and CakePHP 3

 password =  changeme
 Salt and Cipherseed where kept the same among both versions.

 CakePHP 2.6
 HashClass = Simple
 HashType = SHA256
 Encryption result = 
 *cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

 CakePHP 3
 HashClass = Weak
 HashType = SHA256
 Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

 I had asked this on twitter before and the response that I got was that 
 there would be backwards compatibility if you were using Simple password 
 hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't need to 
 change all my users passwords through the database or force them to reset 
 their password.

 Based on the result above I don't see how I can use the same password 
 system from Cake 2 to Cake 3 and it also doesn't seem like it is using the 
 hashType set on config.

 Is there anything I'm missing here. Can anyone help?

 I need to decide really quick if I will move forth with Cake 3 or keep 
 development with Cake 2.

 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: CakePHP 3 cipherseed removal and password migration - HELP

2015-02-26 Thread mcloide
Well now I have the original source. Let me test here with different 
scenarios but at this moment cake 3 is back on scenario (which makes me 
very happy)

On Thursday, February 26, 2015 at 4:06:47 PM UTC-5, José Lorenzo wrote:

 I see the problem... It looks like you have been hashing the passwords all 
 this time with sha1 (which is the deafult in cake 2) since you had the 
 duplicate configuration.

 On Thursday, February 26, 2015 at 9:59:21 PM UTC+1, mcloide wrote:

 Talking with my co-workers we might have found the reason why the hash is 
 so different.

 The original hash was made in php 5.3, this test was made in php 5.6, 
 when I first tested the issue that generated this thread it was also under 
 php 5.6 which means, that, knowing that php has changed it's hash 
 mechanisms it might explain why  the hash string is so far apart.
  

 On Thursday, February 26, 2015 at 3:48:16 PM UTC-5, mcloide wrote:

 Well I did more than simply doing some gists but it did help me see that 
 my current application has something wrong in sense that you are correct, 
 cake2 to cake3 Simple and Weak methods are the same.

 This is my path for troubleshooting:

 Create a new cake 2.6.2 application from scratch, add authentication, 
 and users creation.
 Create a new cake 3 application from scratch, add authentication and 
 users creation.

 In summary both apps looks just like the Blog tutorials from both Cake 
 2.6 and Cake 3. In the gist there are the important files related to both 
 apps.

 https://gist.github.com/mcloide/28cb28a36dc3238ae666

 Based on the resulting table (also on the gist), you are 100% right, my 
 cake 3 application should be able to login using my cake 2 application 
 password since it doesn't, I needed to troubleshoot a bit more and I have 
 found out that I had a double Auth entry on my cake 2 app controller. 

 https://gist.github.com/mcloide/a1276e078c1d372e5a97

 The part that is killing me right now is how did the changeme password 
 got saved as 
 cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43 instead 
 of c88333b093105e07acff5b19be6fbaf51e6482b1 and, even after the App 
 Controller authentication was corrected, removing the 2nd 'Auth entry the 
 login still works on the old application in which I would assume it 
 wouldn't.

 Is there any way that I can know what hashing method is if 
 ($this-Auth-login()) using at the login moment?





 On Thursday, February 26, 2015 at 3:19:37 AM UTC-5, José Lorenzo wrote:

 How did you configure the salt and your Weak password hasher? Please 
 show the code in gist or here.

 I can guarantee that passwords can be used from cake 2 in cake 3 
 because I've migrated a couple apps already.

 On Thursday, February 26, 2015 at 9:06:57 AM UTC+1, mcloide wrote:

 This is a scenario that is true to me and it is leading me to take the 
 decision to not upgrade to Cake3 at this moment.

 I have 2 applications and one has to communicate with another. One 
 application has been fully built with the latest stable version of cake 2 
 and the new application, that is on legacy code, was going to be using 
 cake 
 3 so we could benefit of all of the new perks. Unfortunately with the 
 removal of the cipherseed and the cipher functions a password that was 
 generated in cake2 now can't be used in cake3.

 Example of password encryption results using CakePHP 2.6 and CakePHP 3

 password =  changeme
 Salt and Cipherseed where kept the same among both versions.

 CakePHP 2.6
 HashClass = Simple
 HashType = SHA256
 Encryption result = 
 *cb15d8050a3da1c302e62d27b57e128fb4aef8207b39cd17d44afb3838390c43*

 CakePHP 3
 HashClass = Weak
 HashType = SHA256
 Encryption result = *c88333b093105e07acff5b19be6fbaf51e6482b1*

 I had asked this on twitter before and the response that I got was 
 that there would be backwards compatibility if you were using Simple 
 password hasher in CakePHP 2.6 and upgraded it to CakePHP 3 so I wouldn't 
 need to change all my users passwords through the database or force them 
 to 
 reset their password.

 Based on the result above I don't see how I can use the same password 
 system from Cake 2 to Cake 3 and it also doesn't seem like it is using 
 the 
 hashType set on config.

 Is there anything I'm missing here. Can anyone help?

 I need to decide really quick if I will move forth with Cake 3 or keep 
 development with Cake 2.

 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: HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread kdubya
Dave,

I was having (what seems like) the exact same problem. You can read the 
thread about it 
here: https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU

My solution was to put CakeSession::start() in the beforeFilter() method in 
my AppController. Everything seems to work fine then. However, I don't 
believe this should be necessary so I will continue to try to determine why 
it's needed. 

When you do this, as long as 'default'='cake' is set in your core.php 
file, you should then see the session cookies in app/tmp/sessions.

Can you post the details of your server configure (the one you were having 
the problem on)? Specifically, Apache, PHP, and CakePHP versions and 
settings concerning session. The output of phpinfo() would do nicely (with 
anything sensitive redacted, of course :-)

Thanks,
Ken

-- 
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: HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread David Watson
Hi Ken 

Thanks for your help, I found the solution after a bit more Investigation 
after taling to someone on the irc chat line .. The solution turned out to 
be some of the debugging statements that I had put in to find out what was 
going on.. The session start that is used by cake-php checks for headers 
being sent before it actually starts the session in 
lib/Cake/Model/Datasource/CakeSession.php.. 

On my localhost development station, the version of php and apache  does 
not consider an echo statement as a header that is being sent to the web 
server.. However, on my ISP, the version of php and apache considers echo 
and pr output as headers so the session was never started, and there was 
no indication why the session was not started .. 

So, the big thing is that you can't put debug statements before the session 
starts or  cake will not start up the session variable and authentication 
is not possible because the session was not started ..

A very difficult issue to find, but finally explains the strange lack of 
session starting and no error message for the session start other than the 
message

This web page has been black holed 

and a debug trace that was useless 
 

I hope if any one else has the same problem, my solution will be able to 
help .. 

Cheers

Dave W

On Wednesday, January 21, 2015 at 12:13:02 PM UTC-5, Ken Winans wrote:

 Dave,

 I was having (what seems like) the exact same problem. You can read the 
 thread about it here: 
 https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU

 My solution was to put CakeSession::start() in the beforeFilter() method 
 in my AppController. Everything seems to work fine then. However, I don't 
 believe this should be necessary so I will continue to try to determine why 
 it's needed. 

 When you do this, as long as 'default'='cake' is set in your core.php 
 file, you should then see the session cookies in app/tmp/sessions.

 Can you post the details of your server configure (the one you were having 
 the problem on)? Specifically, Apache, PHP, and CakePHP versions and 
 settings concerning session. The output of phpinfo() would do nicely (with 
 anything sensitive redacted, of course :-)

 Thanks,
 Ken


-- 
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.


HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread David Watson
Hi All ..

I am new to CakePHP but a seasoned developer and have been developing my 
first real app using CakePHP, after a bit of a rocky start, I got rolling 
on my application creating various models,views and controllers for my 
application on my development localhost. Life was good, but then I went to 
try and deploy my newly minted application on my ISP's apache webserver and 
I was unable to get the basic login authentication working.. I did some 
initial investigation and found out the session files were not being 
created.

I have core.php setup to use the cake method for session files - so that 
I can see what is go on.. I tried using a simple PHP session test setup 
with a path location similar to the Cake PHP tmp/session location to verify 
that the apache web server was able to write session files to the same 
location tmp/session direcoty that Cake was using. When I ran the test 
program apache was able to write to the tmp/session directory so I know 
that the server can write to the directory ..

After a long frustrating investigation, I have turned to help from the 
CakePhp Group as I have not found out the cause of why the session variable 
files are not written out on my ISP, but work just fine on my localhost. I 
have been trying to track down when CakePHP writes out these files but so 
far, I have not found out where they are written and what may cause them to 
not be written out with no indication in the error logs files or exceptions 
to give me any help ...

I have the DebugKit installed and the relevant section for Session show 
little help  

localhost:

Session

Config(array)
userAgentfc3b496e15b816b7c1af5b0d05eba93e
time1421815946
countdown10
_Token(array)
key0dc735dbd83c41cba57b2734584457e696a9463a
allowedControllers(empty)
allowedActions(empty)
unlockedFields(empty)
csrfTokens(array)
0dc735dbd83c41cba57b2734584457e696a9463a1421803346

ISP Webserver:

 Session 
   
   - *0*(null)

  


Thanks in advance for any help you can offer for this very perplexing 
problem..

Cheers

Dave W.

-- 
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.


saveAssociated (deep) with file upload on deep model - looking for help (everything good except upload)

2014-10-03 Thread BrendonKoz
So I've managed to get saveAssociated to work as intended with option 
'deep' = true, based on the Book's model requirements for this method I 
was able to construct the View properly (took me awhile). As of now, if I 
change the form's file fields to standard text fields, everything works as 
expected and all records are saved. As soon as I change those form fields 
to file fields, it breaks.

I've tried using Miles Johnson's (now deprecated) Uploader plugin without 
success. After that didn't work I am now trying to get Jose Gonzalez's 
Upload plugin to work (github.com/josegonzalez/cakephp-upload). 
Unfortunately I'm coming across the same exact problem.

My primary application is rather large, but due to the issues I've had, I 
created a new project with only the required models and fields needed to 
get a very simple solution working. For that test solution (everything 
working except upload), the following is how it is configured.

MODELS:
Ticket
 - hasMany TicketResponse
TicketResponse
 - belongsTo Ticket
 - hasMany TicketAttachment
TicketAttachment
 - belongsTo TicketResponse

Ticket fields: id, title, created
TicketResponse fields: id, ticket_id, created, content
TicketAttachment fields: id, ticket_response_id, filename, location, 
filesize

Files for Recreation of App (if helpful)
DB schema: http://pastebin.com/XuwSCnHp
Models:
Ticket: http://pastebin.com/xRvU7Hhk
TicketResponse: http://pastebin.com/1CvdA68w
TicketAttachment: http://pastebin.com/xSajRhJD

All of the controllers/views/models were originally created from the cake 
bake template. The only changes were to the models (fixing associations for 
saveAssociated to work, plugin/behavior settings, validation changes), the 
Ticket view add.ctp, and the ticket controller.
Ticket View add.ctp: http://pastebin.com/sSxh7Wps
TicketController.php: http://pastebin.com/2n2jVtpg

(NOTE: The Upload plugin would also need to be downloaded and configured 
(bootstrap.php), and the Session Component and Helper would need to be 
added to AppController as well.
I'm running CakePHP v2.5.3 on this example project. I've upgraded my older 
project from 2.1 in order to try to solve my problems, but nothing seems to 
be working with regard to the upload. :(
Also, I have a CakeLog::write call in the TicketAttachment model file. I 
*believe* the method calling that should be called from the Upload 
behavior, but it's never reached. In fact, I tried a CakeLog::write from 
within the Upload behavior's `setup()` method and it too did not write 
anything to the debug log. I'm stumped. I don't know if the Upload behavior 
just isn't loading properly, or if I've done something else improperly.

After changing the text fields to file upload fields, the form just isn't 
saving, providing only the generic message that the ticket could not be 
saved. Before switching from the Uploader behavior to the Upload behavior, 
when I switched from text to file upload fields I was getting an error that 
a field of type array was an incorrect value (or something along those 
lines), so I *suspect* that the Upload behavior is loaded and instantiated, 
but I do not know how to properly validate this theory.

Any help would be greatly appreciated!

-- 
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: saveAssociated (deep) with file upload on deep model - looking for help (everything good except upload)

2014-10-03 Thread BrendonKoz
Sorry, correction: Currently running CakePHP v2.5.4

-- 
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: saveAssociated (deep) with file upload on deep model - looking for help (everything good except upload)

2014-10-03 Thread BrendonKoz
Just figured out the problem... The rules in my model, created by `cake 
bake`, although exactly what I would have wanted if I was manually 
uploading information and handling the data, don't work with the Upload 
plugin. It causes an error, which in turn doesn't let me upload the file. 
Had I uncommented or set a custom error message to be returned in the 
session, I probably would have figured it out sooner.

I uncommented all of my TicketAttachment model validation rules just to see 
if it would work (it did). I'm going to go back and try adding some back in 
that don't directly relate to the upload process/data. But I won't be 
reporting back on that. For anyone else that may come across this topic - 
you can work a little bit on your own to figure things out too since this 
took me about 3.5 weeks all in total, just for getting files to upload 
through saveAssociated. :D ...upgrading my legacy app from 2.1 to 2.5 is 
not yet complete, so that's another amount of time I'll get to play. :D

Anyway, thanks to any one who looked at this in order to see if I needed 
help (and they thought they might be able to offer some). Thanks!

-- 
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.


HELP cant display records from a join

2014-09-19 Thread ajt
Hi, I cant get this simple join to produce records. I am trying to link a 
HABTM model with joins but I dont get any records from the joined tables.  

I want all the subjects for tutor id =2 but as you see I get NULL and I 
have tried different recursive levels. i should not get NULL in the other 
tables as you see below. I dont get an error

Here is the controller and model with the relationship

array(
(int) 0 = array(
'Subject' = array(
'id' = null,
'name' = null
),
'TutorsSubject' = array(
'id' = null,
'tutor_id' = null,
'subject_id' = null
),
'Tutor' = array(
'id' = '2',
'tutor_inactive' = false,
'first_name' = 'fred2',
'last_name' = 'blah',..

class TutorsController extends AppController {

 public function tutordetails() {
$options2['joins'] = array(
   array('table' = 'tutors_subjects',
'alias' = 'TutorsSubject',
'type' = 'LEFT',
'conditions' = array(
'Tutor.id = TutorsSubject.id',
 )
 ),

array('table' = 'subjects',
'alias' = 'Subject',
'type' = 'LEFT',
'conditions' = array(
'TutorsSubject.subject_id=Subject.id',
 )
 )

));

 $options2['fields'] = 
array('Subject.*','TutorsSubject.*','Tutor.*');

$this-Tutor-recursive = -1;
$options2['conditions'] = array('Tutor.id'  = 2);
$subject=$this-Tutor-find('all',$options2);
$this-set('subject', $subject);
debug($subject);


class Subject extends AppModel {
public $hasAndBelongsToMany = array(

'Tutor' = array(
'className' = 'Tutor',
'joinTable' = 'tutors_subjects',
'foreignKey' = 'subject_id',
'associationForeignKey' = 'tutor_id',
'unique' = 'keepExisting',
'conditions' = '',

)
);

}

class Tutor extends AppModel {
..

public $hasAndBelongsToMany = array(
'Subject' = array(
'className' = 'Subject',
'joinTable' = 'tutors_subjects',
'foreignKey' = 'tutor_id',
'associationForeignKey' = 'subject_id',
'unique' = 'keepExisting',
'conditions' = '',
   
),

);



-- 
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.


CakePHP 3.0 beta 1: Please help to use Html helper in function on view

2014-09-02 Thread Nguyễn Anh Tuấn
Dear all.
This so stupid but please help me.
In my cell: *app/src/View/Cell/MyCell.php*
i'm use public $helpers = ['Html'];
In my cell view: *app/src/Template/Cell/MyCell/display.ctp*

?php
$this-Html-link('name', ['controller' = 'mycontroller', 'action' = 
'myaction', 'param']); // This one work correctly
function generateLink($name) {
   return $this-Html-link($name, ['controller' = 'mycontroller', 'action' 
= 'myaction', 'param']); // This one cannot work thenoutput error: 
Using $this when not in object context
}

echo generateLink('MyLinkName');
?

*Please guide me how to use $this inside view function.*
*Thanks.*

-- 
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.0 beta 1: Please help to use Html helper in function on view

2014-09-02 Thread José Lorenzo
Where did you put that generateLink() function?

Helpers can only be used in the templates and from other helpers. What you 
are trying to do is not possible. You can create other helpers that can 
call the Html helper internally

On Tuesday, September 2, 2014 1:57:30 PM UTC+2, Nguyễn Anh Tuấn wrote:

 Dear all.
 This so stupid but please help me.
 In my cell: *app/src/View/Cell/MyCell.php*
 i'm use public $helpers = ['Html'];
 In my cell view: *app/src/Template/Cell/MyCell/display.ctp*

 ?php
 $this-Html-link('name', ['controller' = 'mycontroller', 'action' = 
 'myaction', 'param']); // This one work correctly
 function generateLink($name) {
return $this-Html-link($name, ['controller' = 'mycontroller', 
 'action' = 'myaction', 'param']); // This one cannot work then   
  output error: Using $this when not in object context
 }

 echo generateLink('MyLinkName');
 ?

 *Please guide me how to use $this inside view function.*
 *Thanks.*


-- 
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.


End tag for meta omitted, but OMITTAG NO was specified..Help please..

2014-07-04 Thread Jessica
Hi, I have been trying to fix several errors like this one below after 
validating my site through w3c. I am trying to take care of these
errors myself, as a newbie to PHPCake. I tried adding  / after 1252, but 
it did not solve my problem. Any ideas on how to fix?

Thanks!

Jessica


   - *Line 4 
   
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.rentalology.net%2Fcharset=%28detect+automatically%29doctype=Inliness=1outline=1group=1No200=1verbose=1user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices#line-4,
 
   column 81*: end tag for meta omitted, but OMITTAG NO was specified
   - 
   
   headmeta http-equiv=Content-Type content=text/html; 
charset=windows-1252
   
   

-- 
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.


CakePHP NEWBIE needs help w/ international phone number add on contact form...

2014-07-01 Thread Jessica
Hi, 

   Please bear with me! Total newbie in the CakePHP world.
I need to be able to provide the option to add an international phone 
number on my customers registration form page. 
  Currently, only a US 10 digit phone number is being allowed to be 
entered. I really need to be able to provide the capability of entering in 
either styles, US or
international numbers.


Here's a snippet from the ctp file that I thought has to do with phone 
number section, but I do not see where I change anything to make a 
difference.

tr style=height:30px;
td align=left Phone Number span class=starr*/span  /td
td align=left class=tdwidth ?php echo 
$form-input('Member.phone',array('label'='','div' = '','class'='phone 
required','id'='phone')); ? /td
/tr 
tr style=height:30px;


Then here is a snippet from the ctp file that information is displayed on. 
Though I am not sure if this is relevant?

div class=propertyviewinpt
div class=propertyviewContainerLeft  Phone  span 
class=starr * /span /div
div class=propertyviewContainerRight 
?php echo 
 $form-input('phone',array('label'='','div'='', 'class'='required 
phone', 'size' = '20')); ?

/div


Should I be looking for another ctp file that has solely form information 
on it or can I change the code provided above to include international 
numbers?

Thanks!

-- 
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 NEWBIE needs help w/ international phone number add on contact form...

2014-07-01 Thread vbpupil
Hi Jessica

Are you failing the validation? this is set in the model. See here for 
setting up model validation

http://book.cakephp.org/2.0/en/models/data-validation.html

I hoe this helps.


On Monday, June 30, 2014 10:30:23 PM UTC+1, Jessica wrote:

 Hi, 

Please bear with me! Total newbie in the CakePHP world.
 I need to be able to provide the option to add an international phone 
 number on my customers registration form page. 
   Currently, only a US 10 digit phone number is being allowed to be 
 entered. I really need to be able to provide the capability of entering in 
 either styles, US or
 international numbers.


 Here's a snippet from the ctp file that I thought has to do with phone 
 number section, but I do not see where I change anything to make a 
 difference.

 tr style=height:30px;
 td align=left Phone Number span class=starr*/span  /td
 td align=left class=tdwidth ?php echo 
 $form-input('Member.phone',array('label'='','div' = '','class'='phone 
 required','id'='phone')); ? /td
 /tr 
 tr style=height:30px;


 Then here is a snippet from the ctp file that information is displayed on. 
 Though I am not sure if this is relevant?

 div class=propertyviewinpt
 div class=propertyviewContainerLeft  Phone  span 
 class=starr * /span /div
 div class=propertyviewContainerRight 
 ?php echo 
  $form-input('phone',array('label'='','div'='', 'class'='required 
 phone', 'size' = '20')); ?
 
 /div


 Should I be looking for another ctp file that has solely form information 
 on it or can I change the code provided above to include international 
 numbers?

 Thanks!


-- 
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.


Help me for First Application with CakePHP!

2014-06-25 Thread Sankar V


-- 
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: Help me for First Application with CakePHP!

2014-06-25 Thread Jeremy Burns : Class Outfit
Sure. What would like us to build for you?

On 25 Jun 2014, at 06:30, Sankar V san...@vettritech.com wrote:

 
 
 -- 
 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: Help me for First Application with CakePHP!

2014-06-25 Thread John Andersen
For your first application using CakePHP, please follow this tutorial in 
the CakePHP book:
http://book.cakephp.org/2.0/en/getting-started.html#blog-tutorial

Enjoy, John


On Wednesday, 25 June 2014 08:30:56 UTC+3, Sankar V wrote:




-- 
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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-24 Thread Zero Sony
Hi all,

Finaly, i found the solutions. I made a big mistake in my Form. I write 
username  and passwordinstead of username and password. Cake 
took the space after username and password.
Thx all for your 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.


Re: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread José Lorenzo
Can you share your code via gist.github.com instead?

On Wednesday, June 18, 2014 5:39:02 PM UTC+2, Zero Sony wrote:

 Hi all, 

 I use cakephp 2.5.1 and my  $this-Auth-login()   does not work. It 
 return me false each time.
 Maybe if someone can say me why , i ll be very gratefull ^^
 I m on this problem for severals days T_T

 My DB is called  users and there are fields username and password .

 *AppControler*

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 class AppController extends Controller {
  
 public $components = array('Session', 'Cookie',
 'Auth' = array(
 'authenticate' = array('Form'code class=php plain 
 style=font-variant: inherit; outline: 0px !important; font-family: 
 Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace 
 !important; line-height: 1.4em !important; border-top-left-radius: 0px 
 !important; border-top-right-radius: 0px !important; 
 border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px 
 !important; bottom: auto !important; float: none !important; height: auto 
 !important; left: auto !important; overflow: visible !important; position: 
 static !important; right: auto !important; top: auto !important; width: 
 auto !important; box-sizing: content-box !impo
 ...

-- 
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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread Zero Sony
https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

Thx for your 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.


Re: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread euromark
Mind your casing

'Authenticate' = 'form'

Compare this with what is documented:
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

mark



Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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.


Re: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread 0-SonY
I have just edited it. But it's still not work. T_T


2014-06-19 18:48 GMT+02:00 euromark dereurom...@gmail.com:

 Mind your casing

 'Authenticate' = 'form'

 Compare this with what is documented:

 http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

 mark



 Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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 a topic in the
 Google Groups CakePHP group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/cake-php/etvRbrLTpxs/unsubscribe.
 To unsubscribe from this group and all its topics, 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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread Zero Sony
Thx for your help.

I have just edited it. But it's still not work T_T


https://gist.github.com/0-Sony/3c052a832687e8dbb4d7


Le jeudi 19 juin 2014 18:48:05 UTC+2, euromark a écrit :

 Mind your casing

 'Authenticate' = 'form'

 Compare this with what is documented:

 http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

 mark



 Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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.


Need help on custom Authorization with ACL

2014-06-05 Thread Arun Singh
CakePHP custom ACL Authorization using acos, aros  aros_acos Acl tables 
with extension api_

I am developing an restful API using CakePHP, I am trying to implement a 
custom authorization which authorize user using ACL, code looks something 
like

?php
App::uses('BaseAuthorize', 'Controller/Component/Auth');

class ApiAuthorize extends BaseAuthorize {
 public function authorize($user, CakeRequest $request) { 
$allowed = false;
$Acl = $this-_Collection-load('Acl'); 
list($plugin, $userModel) = 
pluginSplit($this-settings['userModel']);
$action = $this-action($request); 

$cacheName = 'permissions_' . strval($user['id']); 
if (($permissions = Cache::read($cacheName, 'permissions')) === 
false) {
$permissions = array(); 
Cache::write($cacheName, $permissions, 'permissions');
}
if (!isset($permissions[$action])) {
$User = ClassRegistry::init($this-settings['userModel']);
$User-id = $user['id'];
$allowed = $Acl-check($User, $action); 
$permissions[$action] = $allowed;
Cache::write($cacheName, $permissions, 'permissions');
$hit = false;
} else {
$allowed = $permissions[$action];
$hit = true;
}
return $allowed;
 }
}

I am using same database for website(developed using croogo) and API so my 
database already has `acos`, `aros`  `aros_acos` tables of website so for 
API I am created ACL tables with api_ extension like `api_acos`, `api_aros` 
 `api_aros_api_acos`

New schema of my ACL tables are

CREATE TABLE IF NOT EXISTS `api_acos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) DEFAULT NULL,
  `model` varchar(255) DEFAULT '',
  `foreign_key` int(10) unsigned DEFAULT NULL,
  `alias` varchar(255) DEFAULT '',
  `lft` int(10) DEFAULT NULL,
  `rght` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `api_acos_api_aros` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `api_aro_id` int(10) unsigned NOT NULL,
  `api_aco_id` int(10) unsigned NOT NULL,
  `_create` char(2) NOT NULL DEFAULT '0',
  `_read` char(2) NOT NULL DEFAULT '0',
  `_update` char(2) NOT NULL DEFAULT '0',
  `_delete` char(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `api_aros` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) DEFAULT NULL,
  `model` varchar(255) DEFAULT '',
  `foreign_key` int(10) unsigned DEFAULT NULL,
  `alias` varchar(255) DEFAULT '',
  `lft` int(10) DEFAULT NULL,
  `rght` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


I am using custom ACL class from here 
https://github.com/FriendsOfCake/Authorize/blob/master/Controller/Component/Acl/HabtmDbAcl.php

My question is where and how can I use my new database tables (`api_acos`, 
`api_aros`  `api_aros_api_acos`) for ACL lookup? Please point me to code 
from where I can take reference for custom ACL Authorization implementation.

-- 
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: Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-04 Thread Борислав Събев Borislav Sabev
I know this is somewhat of a troll answer, but:
This should be possible with some tweaks  to core variables, but why in the 
world would you want to do that? If your answer is that you know Smarty and 
not CakeViews I'd suggest you take 4 hours of reading and you will be 
pretty comfortable with Cake's Views.

Cake's view layer is much more powerful and made to work with Cake out of 
the box!
Also, doing this would mean that your project will be almost impossible to 
update in the future.
If you have something already done in Smarty and want to migrate it to 
Cake, you should seriously consider rewriting it entirely rather than 
integrating it.
You will not be integrating it - believe me you will end up with a lot of 
hard-coded and hacked-together stuff.
Especially if what you are migrating is big - the bigger the thing the 
bigger the issues you will have in the long run.

Borislav Sabev.

On Monday, 2 June 2014 08:48:45 UTC+3, Vivek Shah wrote:

 Hello,

 I am trying to integrate smarty template with cakePHP and for that I refer 
 http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyview
  
 document
 and came to know it very old one still i modified some steps and reach 
 till include helpers in app_controller.

 class AppController extends Controller {

 public $view = 'Smarty';
 public $helpers = array(
 'SmartyHtml', 
 'SmartyForm',
 'SmartySession',
 'Html', 'Session'
 );
 }

 After adding this code in app controller my apache serve got crashed, and 
 i am unable to resolve this issue.

 Anyone please help or share document from where i can refer how can we 
 integrate smary with cakePHP.

 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.


I need Help.. How to install Cake PHP 2.5.1 on Xampp running on a Windows 8.1 system

2014-06-03 Thread su_osi


https://lh4.googleusercontent.com/-nLw9Z5cAQMA/U4yjLThSyKI/BQo/1A8pwa3w5wo/s1600/CakePHP+error.jpg
Here is a copy of my database.php file in the 
I:xampp\htdocs\cakephp\app\Config folder ('I:\' being the drive I installed 
xampp into)


?php
 /**
  *
  *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
  * Licensed under The MIT License
  * For full copyright and license information, please see the LICENSE.txt
  * Redistributions of files must retain the above copyright notice.
  *
  * @copyright Copyright (c) Cake Software Foundation, Inc. 
 (http://cakefoundation.org)
  * @link  http://cakephp.org CakePHP(tm) Project
  * @package   app.Config
  * @since CakePHP(tm) v 0.2.9
  * @license   http://www.opensource.org/licenses/mit-license.php MIT 
 License
  */

 /**
  * Database configuration class.
  *
  * You can specify multiple configurations for production, development and 
 testing.
  *
  * datasource = The name of a supported datasource; valid options are as 
 follows:
  *  Database/Mysql - MySQL 4  5,
  *  Database/Sqlite - SQLite (PHP5 only),
  *  Database/Postgres - PostgreSQL 7 and higher,
  *  Database/Sqlserver - Microsoft SQL Server 2005 and higher
  *
  * You can add custom database datasources (or override existing 
 datasources) by adding the
  * appropriate file to app/Model/Datasource/Database. Datasources should 
 be named 'MyDatasource.php',
  *
  *
  * persistent = true / false
  * Determines whether or not the database should use a persistent 
 connection
  *
  * host =
  * the host you connect to the database. To add a socket or port number, 
 use 'port' = #
  *
  * prefix =
  * Uses the given prefix for all the tables in this database. This setting 
 can be overridden
  * on a per-table basis with the Model::$tablePrefix property.
  *
  * schema =
  * For Postgres/Sqlserver specifies which schema you would like to use the 
 tables in.
  * Postgres defaults to 'public'. For Sqlserver, it defaults to empty and 
 use
  * the connected user's default schema (typically 'dbo').
  *
  * encoding =
  * For MySQL, Postgres specifies the character encoding to use when 
 connecting to the
  * database. Uses database default not specified.
  *
  * unix_socket =
  * For MySQL to connect via socket specify the `unix_socket` parameter 
 instead of `host` and `port`
  *
  * settings =
  * Array of key/value pairs, on connection it executes SET statements for 
 each pair
  * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
  * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
  * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
  *
  * flags =
  * A key/value array of driver specific connection options.
  */
 class DATABASE_CONFIG {

 public $default = array(
 'datasource' = 'Database/Mysql',
 'persistent' = false,
 'host' = 'localhost',
 'login' = 'user',
 'password' = 'password',
 'database' = 'cakephpd',
 'prefix' = '',
 //'encoding' = 'utf8',
 );

 public $test = array(
 'datasource' = 'Database/Mysql',
 'persistent' = false,
 'host' = 'localhost',
 'login' = 'user',
 'password' = 'password',
 'database' = 'test_database_name',
 'prefix' = '',
 //'encoding' = 'utf8',
 );
 }
 ?



Please help me out, I'm really new to web development as a whole  and I 
don't know what to do next.

-- 
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.


Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-03 Thread Vivek Shah
Hello,

I am trying to integrate smarty template with cakePHP and for that I refer 
http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyview
 
document
and came to know it very old one still i modified some steps and reach till 
include helpers in app_controller.

class AppController extends Controller {

public $view = 'Smarty';
public $helpers = array(
'SmartyHtml', 
'SmartyForm',
'SmartySession',
'Html', 'Session'
);
}

After adding this code in app controller my apache serve got crashed, and i 
am unable to resolve this issue.

Anyone please help or share document from where i can refer how can we 
integrate smary with cakePHP.

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.


Routing and passed info help

2014-04-22 Thread Advantage+
I have my index function and need to figure out to pass different variables
to paginate correct.

 

Basically on the index the pagination grabs everything, but there are
filters so take shoes for example it now gets passed that variables so the
url looks like /shoes/page:2

 

But the problem now is how to add more filters?
shoes/mens/black/leather/page:3

 

You can have endless categories, so I doubt routing every possible scenario
is the option.

 

How would you simply pass all those variables to the controller function and
let go from there

 

public function index($grab everything in 1 shot){

process what was passed 

}

 

Thanks,

Dave

-- 
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: Routing and passed info help

2014-04-22 Thread euromark
query strings + https://github.com/CakeDC/search are the way to go for 
multiple filters that you want to persist


Am Dienstag, 22. April 2014 14:26:04 UTC+2 schrieb advantage+:

 I have my index function and need to figure out to pass different 
 variables to paginate correct.

  

 Basically on the index the pagination grabs everything, but there are 
 filters so take shoes for example it now gets passed that variables so 
 the url looks like /shoes/page:2

  

 But the problem now is how to add more filters? 
 shoes/mens/black/leather/page:3

  

 You can have endless categories, so I doubt routing every possible 
 scenario is the option.

  

 How would you simply pass all those variables to the controller function 
 and let go from there

  

 public function index($grab everything in 1 shot){

 process what was passed 

 }

  

 Thanks,

 Dave


-- 
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.


Cache Memcache engine help

2014-04-08 Thread Advantage+
I have / think Memcache engine is set up correct. (v 2.4.6)

 

Core.php:

$engine = 'Memcache';

Cache::config('inmemory', array(

'engine' = 'Memcache',

'duration' = 3600,

'serialize' = true,

'servers' = array(

'127.0.0.1:11211'), 

'persistent' = true,

'compress' = false));

 

And a File cache:

Cache::config('default', array(  

'engine' = 'File', 

'prefix' = '', 

'duration'= '+1 week',  

'path' = CACHE . 'default' . DS,));

 

If I check the server the memcache shows the data being cached, the record_
c6a82b1532947c1c8111327581487e74 exists. But in the Model Callback I want to
delete the cached record on save / delete.

Check the database and records are getting saved / updated / deleted but the
cache inmemory never gets deleted. Only if I use default does it
actually cache the record and delete in the call backs.

 

Aftersave / afterdelete::

$cache_id = md5($this-id);

Cache::delete('record_'.$cache_id, 'inmemory');

 

But it does not delete.

 

If I change it to 

Cache::delete('record_'.$cache_id, 'default');

It will delete the record.

 

 

Any ideas?

 

Thanks,

Dave

-- 
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.


help me to join the table with associative table using hasAndBelongsToMany

2014-03-20 Thread REnu Varghese



i have 4 tables with following data

+ businesses(table 1) its fields are : id, business_name, brand_id

+ categories(table 2) its fields are : id, category_name

+ business_categories(table 3) its fields are : id, business_id , 
category_id

+ brands(table 4) its fields are id, brand_name

 Business and Category tables are related with business_categories table

I got the correct result of all Business based on Category 

my model page Category.php is here pasting

$this-bindModel(
array(
'hasAndBelongsToMany' = array(
'Business' = array(
'className' = 'Business', 
'joinTable' = 'business_categories', 
'foreignKey' = 'category_id',
'associationForeignKey' = 'business_id', 
'with' = 'BusinessCategory'
;
$category = $this-find('all');

My question is how i can join the Brand(table 4) with Business in this code.

Brand table is related with each Business table brand_id is the primary 
key(id) of Brand table

Help me please, 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.


Help! Auth Component in Lib directory

2014-02-25 Thread Ben Kennedy
Hi all, I'm struggling getting this code working, wondering if anyone had 
any insights


I've written an application that has a lot of web services, It used Zend to 
create a server and loads classes from my lib folder

So my structure is like this:

app/Controller/WebServicesController.php
app/Lib/WebServices/SomeService.php

The controller loads the requested service and passes it as an argument to 
the Zend SOAP server code. It works fine, except where I need the response 
from the Auth Component.

I want a partner site to be able to validate a username/password as part of 
a unified login. So if a user tries logging in to site X, that site will 
call my web service with the username and password and return the result of 
Auth:identify.

This is the relevant code in my SomeService.php file, I've attempted to 
initialize the Auth Component as I do in the standard login procedure, but 
it ALWAYS returns false, even if the credentials are correct:

function check_credentials($username, $password) {
$userObj = new CakeRequest();
$userObj-data['User'] = array('username'=$username, 
'password'=$password);

$resp = new CakeResponse();

App::import('Component', 'Auth');
$Auth = new AuthComponent(new ComponentCollection());
$Auth::initialize();

$Auth-authenticate = array(
'all' = array('userModel' = 'User'),
);

$result = $Auth-identify($userArr,$resp);

return $result;

}

Any help would be greatly appreciated!

-- 
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: Help! Auth Component in Lib directory

2014-02-25 Thread Ben Kennedy
Can't edit my first post, so just be aware that this line:
$result = $Auth-identify($userArr,$resp);

should be :

$result = $Auth-identify($userObj,$resp);

And I'm using Cake 2.4.4

-- 
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: I have problems in sending mail . Help ....

2014-02-16 Thread kdubya
You say you are running on Windows 7 which means you probably don't have an 
SMTP mail server running unless you have specifically set one up. 

I do development on a Win 7 machine but for Email testing I use my 
production linux server. So in my email.php file instead of using 
localhost, I point to my production server. Here is an example SMTP config:

public $smtp = array(
'transport' = 'Smtp',
'from' = array('yourn...@example.com' = 'Your Name'),
'host' = 'mail.example.com', // This could be smtp.example.com or some 
such according to your DNS record
'port' = 25,
'timeout' = 30,
'username' = 'yourn...@example.com',
'password' = 'password',
'client' = null,
'log' = true,
);

-- 
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.


I have problems in sending mail . Help ....

2014-02-15 Thread Nguyen Cuong
I have problems in sending mail CakePHP 2.4 - from localhost (Windows 7) :
In File AppController have existed :
App::uses('CakeEmail', 'Network/Email');
public $components = array(
'DebugKit.Toolbar',
'Session',
'RequestHandler',
'Cookie',
'Email'
);
In File email.php have existed :
public $smtp = array(
'transport' = 'Smtp',
'from' = array('demo@localhost' = 'My website'),
'host' = 'localhost',
'port' = 25,
'timeout' = 30,
'username' = 'myuser',
'password' = 'mypass',
'client' = null,
'log' = false,
 'charset' = 'utf-8',
'headerCharset' = 'utf-8',
);
In File PostsController.php have existed :
public function email(){
$email = new CakeEmail(smtp);
$email-viewVars(array('username' = 
'cuongnv','active_link'='google.com'));
$email-to('cuongcnt...@gmail.com');
$email-subject('Title');
$email-template('template', 'template');
$email-send();

}

File template.ctp have existed in ..view/Emails/html/
But not sending to mail...
Looking forward to the help from everyone . Thank all !

-- 
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: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Yeah!

using Entity class and $_accessible property all works as expected!

thanks
José


2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 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/vSUI_dJRueg/unsubscribe.
 To unsubscribe from this group and all its topics, 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.




-- 
-- bato ---

-- 
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: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Hi Carlos,

PHP 5.4 permits the ['key' = 'value'] array syntax. The issue I had was
resolved by using Entity class and $_accessible property.




2014-02-04 Carlos Javier Baeza Negroni carlos.ba...@gmail.com:

 Also check the array:
 $data = ['name' = 'Walter White'];

 Should be:
 $data = array('name' = 'Walter White');


 best regards.


 2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 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.




 --
 *Carlos Baeza Negroni*
 +56985644026
 http://carlosbaeza.net
 @cjbaezilla
 http://cl.linkedin.com/in/cjbaeza
  http://cl.linkedin.com/in/cjbaeza

 --
 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/vSUI_dJRueg/unsubscribe.
 To unsubscribe from this group and all its topics, 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.




-- 
-- bato ---

-- 
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.


Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread bato
Hi,

I'm starting to play with 3.0 ORM and I encountered some issues saving data.

I have two simple tables: 

   - authors with fields id and name
   - posts with fields id, title, text and author_id


I have fill tables with two authors and some posts by hand to try 
retrieving data with cake.

I have set up two Table class as:

App/Model/Table/AuhtorsTable.php

?php

namespace App\Model\Table;

use Cake\ORM\Table;

class AuthorsTable extends Table {

public function initialize(array $config) {
$this-hasMany('Posts');
}

}

and 

App/Model/Table/PostsTable.php

?php

namespace App\Model\Table;

use Cake\ORM\Table;

class PostsTable extends Table {

public function initialize(array $config) {
$this-belongsTo('Authors');
}

}

In App/Controller/PagesController.php I'm trying to save data from an array.

$data = ['name' = 'Walter White'];
$authors = TableRegistry::get('Authors');
$author = $authors-newEntity($data);
$authors-save($author);

The data aren't saved. The save method return false but I don't understand 
why.
Am I missing something?
I have 
following 
http://book.cakephp.org/3.0/en/orm/table-objects.html#converting-request-data-into-entities

best regards
alberto




-- 
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: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread José Lorenzo
Currently that is the most confusing part of the ORM and I'd like to make 
it easier to understand in the next release preview. By default entities 
are protected agains mass assignment, this means that you cannot create 
them without configuring what properties can be set from the request. You 
need to create the entity class and set the properties that are accessible 
for mass assignment. Please read this section in the book:

http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment

On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving 
 data.

 I have two simple tables: 

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try 
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and 

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an 
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't understand 
 why.
 Am I missing something?
 I have following 
 http://book.cakephp.org/3.0/en/orm/table-objects.html#converting-request-data-into-entities

 best regards
 alberto






-- 
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: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread Carlos Javier Baeza Negroni
Also check the array:
$data = ['name' = 'Walter White'];

Should be:
$data = array('name' = 'Walter White');


best regards.


2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 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.




-- 
*Carlos Baeza Negroni*
+56985644026
http://carlosbaeza.net
@cjbaezilla
http://cl.linkedin.com/in/cjbaeza
http://cl.linkedin.com/in/cjbaeza

-- 
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: Help setting up 3.0

2014-01-12 Thread Reuben
Because CakePHP 3 doesn't have a stable release yet, try the --dev flag.

On Saturday, 11 January 2014 10:34:15 UTC+10, advantage+ wrote:

 I am trying to set this up with Composer install as outlined in the first 
 step.

  

 I want to play around locally, I am on windows 7 using wamp. Upgraded wamp 
 to the php 5.4 version. 

 Downloaded the Composer windows installer. 

 It does not give me the option where to install / save Composer to so it 
 ends up on installed on C: drive, yet all my work / wamp is on a separate 
 drive K: , the path to php / apache is K:wamp/bin

  

 The openSSL is enabled in php.ini, restarted.

  

  

 K:\wamp\www\dev\3.xphp -r eval('?'.file_get_contents('
 https://getcomposer.

 org/installer'));

 PHP Warning:  file_get_contents(): Unable to find the wrapper https - 
 did you

 forget to enable it when you configured PHP? in Command line code on line 1

 PHP Stack trace:

 PHP   1. {main}() Command line code:0

 PHP   2. file_get_contents() Command line code:1

  

 Warning: file_get_contents(): Unable to find the wrapper https - did you 
 forge

 t to enable it when you configured PHP? in Command line code on line 1

  

 Call Stack:

 0.0003 222528   1. {main}() Command line code:0

 0.0003 223240   2. file_get_contents() Command line code:1

  

 PHP Warning:  file_get_contents(https://getcomposer.org/installer): 
 failed to op

 en stream: Invalid argument in Command line code on line 1

 PHP Stack trace:

 PHP   1. {main}() Command line code:0

 PHP   2. file_get_contents() Command line code:1

  

 Warning: file_get_contents(https://getcomposer.org/installer): failed to 
 open st

 ream: Invalid argument in Command line code on line 1

  

 Call Stack:

 0.0003 222528   1. {main}() Command line code:0

 0.0003 223240   2. file_get_contents() Command line code:1

  

  

 K:\wamp\www\dev\3.xcomposer.phar update

  

 K:\wamp\www\dev\3.xcurl -s http://getcomposer.org/installer | php

 'curl' is not recognized as an internal or external command,

 operable program or batch file.

  

 K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

 Could not open input file: composer.phar

  

 K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

  

   [InvalidArgumentException]

   Could not find package cakephp/app with stability stable.

  

 create-project [-s|--stability=...] [--prefer-source] [--prefer-dist] 
 [--repos

 itory-url=...] [--dev] [--no-dev] [--no-plugins] 
 [--no-custom-installers] [--n

 o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] 
 [directory] [ve

 rsion]

  

  

 C:\Users\MovePixelsphp composer.phar create-project 
 k:/wamp/www/dev/3.x/app

 Could not open input file: composer.phar

  

  

 K:\wamp\www\dev\3.xphp composer.phar create-project app

  

   [InvalidArgumentException]

   Could not find package app with stability stable.

  

 create-project [-s|--stability=...] [--prefer-source] [--prefer-dist] 
 [--repos

 itory-url=...] [--dev] [--no-dev] [--no-plugins] 
 [--no-custom-installers] [--n

 o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] 
 [directory] [ve

 rsion]

  

  

 Anyone have any ideas how to go about this. 

  

 Thanks,

 Dave

  


-- 
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.


Help setting up 3.0

2014-01-12 Thread mark_story
You wan to run 

php composer.phar create-project -s dev cakephp/app

The missing -s flag and cakephp/app are important.

-mark

-- 
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.


Help setting up 3.0

2014-01-10 Thread Advantage+
I am trying to set this up with Composer install as outlined in the first
step.

 

I want to play around locally, I am on windows 7 using wamp. Upgraded wamp
to the php 5.4 version. 

Downloaded the Composer windows installer. 

It does not give me the option where to install / save Composer to so it
ends up on installed on C: drive, yet all my work / wamp is on a separate
drive K: , the path to php / apache is K:wamp/bin

 

The openSSL is enabled in php.ini, restarted.

 

 

K:\wamp\www\dev\3.xphp -r
eval('?'.file_get_contents('https://getcomposer.

org/installer'));

PHP Warning:  file_get_contents(): Unable to find the wrapper https - did
you

forget to enable it when you configured PHP? in Command line code on line 1

PHP Stack trace:

PHP   1. {main}() Command line code:0

PHP   2. file_get_contents() Command line code:1

 

Warning: file_get_contents(): Unable to find the wrapper https - did you
forge

t to enable it when you configured PHP? in Command line code on line 1

 

Call Stack:

0.0003 222528   1. {main}() Command line code:0

0.0003 223240   2. file_get_contents() Command line code:1

 

PHP Warning:  file_get_contents(https://getcomposer.org/installer): failed
to op

en stream: Invalid argument in Command line code on line 1

PHP Stack trace:

PHP   1. {main}() Command line code:0

PHP   2. file_get_contents() Command line code:1

 

Warning: file_get_contents(https://getcomposer.org/installer): failed to
open st

ream: Invalid argument in Command line code on line 1

 

Call Stack:

0.0003 222528   1. {main}() Command line code:0

0.0003 223240   2. file_get_contents() Command line code:1

 

 

K:\wamp\www\dev\3.xcomposer.phar update

 

K:\wamp\www\dev\3.xcurl -s http://getcomposer.org/installer | php

'curl' is not recognized as an internal or external command,

operable program or batch file.

 

K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

Could not open input file: composer.phar

 

K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

 

  [InvalidArgumentException]

  Could not find package cakephp/app with stability stable.

 

create-project [-s|--stability=...] [--prefer-source] [--prefer-dist]
[--repos

itory-url=...] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers]
[--n

o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] [directory]
[ve

rsion]

 

 

C:\Users\MovePixelsphp composer.phar create-project k:/wamp/www/dev/3.x/app

Could not open input file: composer.phar

 

 

K:\wamp\www\dev\3.xphp composer.phar create-project app

 

  [InvalidArgumentException]

  Could not find package app with stability stable.

 

create-project [-s|--stability=...] [--prefer-source] [--prefer-dist]
[--repos

itory-url=...] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers]
[--n

o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] [directory]
[ve

rsion]

 

 

Anyone have any ideas how to go about this. 

 

Thanks,

Dave

 

-- 
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: Help / Source code for Simple Authentication tutorial

2014-01-01 Thread Squix

 This error appears at every syntax or logic errors with the Auth 
component. To fix it, simply track the errors (it can be a semi-colon !)

 Squix

-- 
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.


Security Component Help

2013-12-28 Thread Advantage+

I want to make action requests more secure by implementing the Restricting
HTTP methods { requirePost(),requireGet(), requirePut(), requireDelete()}
but running into a bit of an issue.


For an add request for example via ajax I have to fetch the form (get) and
load it into the colorbox, and save the input gets sent as post. So the add
method invokes 2 separate HTTP methods.


Other than break the public function add() into 2 separate functions such as



public function load() // fetch the form via get 


and then 
public function save()// post to save the data


Is there another way to accomplish this without having to break up the
function?


I currently have:


public function save(){


//load the form

if($this-request-is('ajax')  $this-request-is('get'))
{

.

}

 

//save the form

if (!empty($this-request-data) 
$this-request-is('post')) {

..

}


}


 

Any ideas anyone the best way to handle this?

Thanks,

 

Dave

 

-- 
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: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-21 Thread Reuben Helms
When I get back from my Christmas break, I'll have a look at a bit of code
I usually stick in my AppController or AppModel (it's been that long, I
cant quite remember where it sits), but basically, it uses convention to
recognise a file upload, and will save the file contents to a database
field.

For a Search tool, I'd recommend Lucene for indexing, and do local HTTP
calls to get the search results.  I think Zend may even have a PHP lib to
assist with Lucene, but at some point, you're going to have to get your
hands dirty and actually set it up (it's Java based).  Actually, scratch
that.. use Apache SOLR. It sits on top of Lucene, and provides the HTTP API.

Pagination is pretty simple. The Pagination component assist with defining
the query, and getting the data.  The Pagination Helper assist with display
of numbers and first, last, next, previous options.  I usually do an
element to roll all those things into one call from the view.

Breadcrumbs are easy if a page is only available from one menu option.
 They can get a bit trickier if a page can exist at two menu options, and
you don't know which one ( I give you the mess that is Joomla's ItemID,
used to identify a page displayed on a particular menu).

Anyway, you have a good Christmas, too.


On Sat, Dec 21, 2013 at 2:12 AM, Silver Troy educatedr...@gmail.com wrote:

 Hello Reuben,
   I want to thank you for that well thought reply, the answers and
 pointers you have given me.  I really do try and find the answers through
 google, the cook book, youtube and irc.  I just know that sometimes people
 can answer your question in a couple minutes that will save you hours of
 wasting your time.
 I have read through the cook book a few times already and though it does
 give some basic examples it lacks answering common problems.

 I have done the blog tutorial, expanded it with Andrew Perkins youtube
 tutorials to add in authorization.  I have built a basic administration
 section and a user account section with routing (that took way too much
 time messing around).  I have been able to create form dropdowns that get
 populated from other models, and I recognize the
 data['User']['purchased']['year']  from the examples.  I have built a
 number of different sections like products, manufacturers, dealers, deals,
 users using the basic scaffolding.

 I do need to get into the Category Tree Structure, which I have looked
 into a number of examples, going to need to implement Pagination,
 Breadcrumbs and a proper Search tool (that works with multi-word
 searches).  Not to mention uploading multiple images for a product with a
 main (or default) image set.  I have been looking into using a plugin to do
 the image upload but that has been challenging to get one installed and
 working properly.

 The next time I post .. I will keep it to one problem and try and layout
 what I have done.

 Have a good Christmas.


  --
 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/OsnN5POIi3w/unsubscribe.
 To unsubscribe from this group and all its topics, 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.


Re: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-20 Thread Silver Troy
Hello Reuben,
  I want to thank you for that well thought reply, the answers and pointers 
you have given me.  I really do try and find the answers through google, 
the cook book, youtube and irc.  I just know that sometimes people can 
answer your question in a couple minutes that will save you hours of 
wasting your time.
I have read through the cook book a few times already and though it does 
give some basic examples it lacks answering common problems.

I have done the blog tutorial, expanded it with Andrew Perkins youtube 
tutorials to add in authorization.  I have built a basic administration 
section and a user account section with routing (that took way too much 
time messing around).  I have been able to create form dropdowns that get 
populated from other models, and I recognize the 
data['User']['purchased']['year']  from the examples.  I have built a 
number of different sections like products, manufacturers, dealers, deals, 
users using the basic scaffolding.  

I do need to get into the Category Tree Structure, which I have looked into 
a number of examples, going to need to implement Pagination, Breadcrumbs 
and a proper Search tool (that works with multi-word searches).  Not to 
mention uploading multiple images for a product with a main (or default) 
image set.  I have been looking into using a plugin to do the image upload 
but that has been challenging to get one installed and working properly.

The next time I post .. I will keep it to one problem and try and layout 
what I have done.

Have a good Christmas.


-- 
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: GeoIp Help

2013-12-18 Thread Reuben
That's not how to do an 'and' in CakePHP conditions.

Conditions in CakePHP will use 'and' by default, for items in the same 
array, unless explicitly keyed by an 'or'.

This will get you closer to your goal, though you might want to check the 
greater than / less than operations for equality, and IPs that are at the 
beginning or end of the range.

 'conditions' = array(

'startIpNum =' = $address,

'endIpNum =' = $address),

'limit' = 1,
Regards
Reuben Helms

On Wednesday, 18 December 2013 05:22:22 UTC+10, advantage+ wrote:

 Was hoping someone can point out where I am going wrong here.

  

 Just testing so code is rather sloppy.

  

 Related to GeoIP City / Country Location. (data is in my database, not a 
 web call)

  

 $address = $this-my_ip2long($_SERVER['REMOTE_ADDR']);

  

 Calls this:

 private function my_ip2long($ip){

 

 $nums = explode('.', $ip);

 $ret = 0;

 for ($i=0; $i4; $i++){

 $ret += intval($nums[$i]) * pow(256, 3-$i);

 }

 return $ret;

 }

  

 So $address =  (int) 2393010516

  

 So far so good.

  

 $current_address = ClassRegistry::init('IpCountry')-__findUserCountry();

 Produces:

 array(

 'IpCountry' = array(

  'id' = '38959',

  'ip_from' = '2391343104',

  'ip_to' = '2394947583',

  'country2' = 'CA',

  'country3' = 'CAN',

  'country' = 'CANADA'

  

  Which is correct I am in Canada.

  

 So I put that function inside __FindUserCountry(); all good so far.

  

 Then

 $location = ClassRegistry::init('GeoCityBlock')-find('first', array(

 'conditions' = array(

 'and' = 
 array(

   
   
 array(

   
   
 'startIpNum ' = $address,

   
   
 'endIpNum ' = $address))),

 'limit' = 
 1,

 'contain' = 
 array(

   
 'GeoCityLocation')));

  

 And presto time travel :0 I am now in Seoul Korea.

  

 array(

 'GeoCityBlock' = array(

  'startIpNum' = '23068672',

  'endIpNum' = '24117247',

  'locId' = '22883'

 ),

 'GeoCityLocation' = array(

  (int) 0 = array(

  'locId' = 
 '22883',

  'country' = 
 'KR',

  'region' = '11',

  'city' = 
 'Seoul',

  'postalCode' = 
 '',

  'latitude' = 
 '37.5985',

  'longitude' = 
 '126.9783',

  'metroCode' = 
 '',

  'areaCode' = ''

  )

 )

  

  

 Anyone have any assistance they could provide would be great.

  

 Thanks,

  

 Dave

  

  


-- 
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: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-18 Thread Reuben
There's this list, the irc channel and sometimes, stackoverflow, but your 
mileage may vary on how much effort you put into solving the problem 
yourself vs how much help you may receive.

For example, you may experience a bit of radio silence when asking 
questions that are covered in the documentation 
at http://book.cakephp.org/2.0/en/

For example, uploading a file is partially covered 
by 
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#options-for-create,
 
by specifying that your form is going to be for a file, and then adding an 
input field that has the type of file.  When the form is submitted, the 
$this-request-data will have a file descriptor, as described 
here: 
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::file

Saving data to multiple models is covered by Model::saveAssociated : 
http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveassociated-array-data-null-array-options-array.
 
Though you may need to add some special processing in the controller to 
read the file upload descriptor into a database field on the model, in the 
appropriate format (some databases require special encoding before storing 
binary files).

With regards to the year issue, take note of the sample code 
at 
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::year.
 
 Notice the input name is data[User][purchased][year].  This means that the 
FormHelper displays the year component of a whole date field, so when you 
inspect $this-request-data('User.purchased'), it is likely to be an 
array.  Personally, I'm not much of a fan of the way the FormHelper does 
date processing, so you may be better off just doing a FormHelper::select, 
and specify the year entries you are interested in.

I thought the document is pretty nice for showing how to implement plugins (
http://book.cakephp.org/2.0/en/plugins.html), helpers (
http://book.cakephp.org/2.0/en/views/helpers.html#creating-helpers) and 
components (
http://book.cakephp.org/2.0/en/controllers/components.html#creating-a-component).
 
 CakePHP also has plenty of implemented helpers and components in it's core 
to look at for initial guidelines and best practice.  For plugins, you may 
have to dig a little deeper, but they're really just mini apps wrapped up 
for use with other applications.  You just need to stick to the naming 
convention. Personally, I'm looking forward to CakePHP 3.0 for plugins, 
when namespaces will be implemented properly, and we won't have to be as 
concerned with namespace / class name clashes.

The last one sounds like an actual application problem, rather an issue 
with CakePHP. With that one line description, there are a lot of parts to 
deal with.  Start with the model. Maybe add a Tree Behaviour to help 
represent the tree, and find neighbours and children.  Set up a controller, 
and find the entries, using the model.  Perform a set in the controller, to 
set the data for use in a view.  Write the view to processing and display 
the data.  Perhaps you have a Javascript component in mind that will 
display the data in the tree.  Perhaps it takes json for the structure. 
Perhaps it can load via Ajax, so then you would read up on the JsonView 
class, and the $this-set('_serialize', ...) method of serializing data in 
a view variable, plus looking at the RequestHandlerComponent for accepting 
ajax and json requests.

The other hidden gem with CakePHP is the test suite.  The test suite tests 
all the core functionality in CakePHP, so you can see how the 
FormHelper::select should be used to populate a dropdown list.

I'd also recommend following the Blog Tutorial.  Then expand on it a bit to 
add an EntryType to the Post model, and see what scaffolding adds to the 
add and edit controller actions and views.  This will show you how to 
populate a drop down (hint: in the controller: $entityTypes = 
$this-EntityType-find('list'); $this-set(compact('entityTypes')); and in 
the form, $this-Form-input('entityType');)

It's been a very long time since I looked at the Zend Framework, so I'd 
recommend you take a look, and see if you can get the job done there, and 
see if there the same level of help there, as you expect to find here. 
 Last time I looked at it, the class names were more noise than useful, and 
there was a lot of cruft that made the framework seem bloated.  Maybe it 
has slimmed down since then, and the learning curve for doing things the 
Zend way isn't as steep as it used to be.  Then once you've solve the 
problem in Zend, come back and take another look at CakePHP, and solve the 
same problem, purely as a self education exercise.  I'm thinking you might 
be pleasantly surprised.

I subscribe to the posts on this list, and get a daily digest.  Depending 
on the question, and how much effort has been put in, I'll help out when I 
can, as a civic duty, to give a little back to the framework that has made 
development in PHP so much easier over

Re: Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-18 Thread rchavik
awesome answer reuben

+69

-- 
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.


Looking for Help with Cakephp basics .. aka looking for a mentor

2013-12-17 Thread Silver Troy
Hello Cakephp users,
I am just looking for someone that is familiar with Cakephp and can 
help me figure out simple processes in CakePhp.

I am looking for help with things like:

~ uploading a image 
~ saving a form to say products table, but saving images uploaded to a 
product_images table.
~ how to save $this-Form-year()  .. breaks my code says its an Array.
~ implementing plugins, helpers, components, etc
~ building a category tree with products showing in each level of the 
category tree.

I probably have a number of other questions as well.   I have hunted google 
for tutorials, video tutorials, i have read 
the cookbook and tried the cake irc channel (with some success). 

I just realize that I am wasting hours of my time looking for solutions 
that could be answered in a simple
email or chat.  

I find that there is very little out there for Cakephp 2.0 tutorials and 
they are looking to bring out cakephp 3.

Even the Cakephp Youtube channel doesn't have simple tutorials on say 
creating a form and dealing with filling dropdown lists.
They go into advance topics, where most new cakephp users just want to get 
past the basic functionality learning curve.

Yes I have done the blogging tutorial and found Andrew Perkins tutorials on 
youtube to be excellent.  I actually wish he had more.

So if you or someone you know can help me, that would be greatly 
appreciated.

I am actually getting to the point of looking at Zend Framework .. because 
I really don't see a vibrant CakePHP community.



-- 
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.


GeoIp Help

2013-12-17 Thread Advantage+
Was hoping someone can point out where I am going wrong here.

 

Just testing so code is rather sloppy.

 

Related to GeoIP City / Country Location. (data is in my database, not a web
call)

 

$address = $this-my_ip2long($_SERVER['REMOTE_ADDR']);

 

Calls this:

private function my_ip2long($ip){



$nums = explode('.', $ip);

$ret = 0;

for ($i=0; $i4; $i++){

$ret += intval($nums[$i]) * pow(256, 3-$i);

}

return $ret;

}

 

So $address =  (int) 2393010516
 
So far so good.
 
$current_address = ClassRegistry::init('IpCountry')-__findUserCountry();
Produces:
array(
'IpCountry' = array(
 'id' = '38959',
 'ip_from' = '2391343104',
 'ip_to' = '2394947583',
 'country2' = 'CA',
 'country3' = 'CAN',
 'country' = 'CANADA'
 
 Which is correct I am in Canada.
 
So I put that function inside __FindUserCountry(); all good so far.
 
Then

$location = ClassRegistry::init('GeoCityBlock')-find('first', array(

'conditions' = array(

'and' =
array(

 
array(

 
'startIpNum ' = $address,

 
'endIpNum ' = $address))),

'limit' =
1,

'contain' =
array(

 
'GeoCityLocation')));
 
And presto time travel :0 I am now in Seoul Korea.
 
array(
'GeoCityBlock' = array(
 'startIpNum' = '23068672',
 'endIpNum' = '24117247',
 'locId' = '22883'
),
'GeoCityLocation' = array(
 (int) 0 = array(
 'locId' =
'22883',
 'country' =
'KR',
 'region' =
'11',
 'city' =
'Seoul',
 'postalCode' =
'',
 'latitude' =
'37.5985',
 'longitude' =
'126.9783',
 'metroCode' =
'',
 'areaCode' =
''
 )
)
 
 
Anyone have any assistance they could provide would be great.
 
Thanks,
 
Dave

 

 

-- 
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.


need help with check/uncheck all checkbox [cakephp]

2013-11-18 Thread Sally
I need help with this. I'm creating a checkbox to select or deselect the 
country options. Please help to give some clues and explaination. I'll be 
very grateful. Thanks in advance. 
Below are the code:

*Location: View/country/add.ctp file*

script type=text/javascript
$(document).ready(function () {
$('#selectall').click(function () {
 var checked = $(this).is(':checked');

$('.selectedId').each(function () {
var checkBox = $(this);
console.debug(checkBox);
if (checked) {
checkBox.prop('checked', true);
}
else {
checkBox.prop('checked', false);
}
});

});
});
/script
div
?php echo $this-Form-create('Showcase'); ?
fieldset
legend?php echo __('Add Showcase Product'); ?/legend
?php
echo $this-Form-input('p_start', array('label' = 'Start Date'));
echo $this-Form-input('p_end', array('label' = 'End Date'));
echo $this-Form-input('priority', array('label' = 'Priority'));
echo $this-Form-input('Select all Country', array(type = 
checkbox, 'id'='selectall'));
echo $this-Form-input(Country, array(options = 
$viewData[countryList], multiple = checkbox, onclick = 
resetSelectAll(); , class = selectedId , name = selectedId)); 
?
/fieldset

  
?php
echo $this-Form-end(__('Submit'));
echo $this-Html-link('Back', array('action' = 'listShowcases'));
?
/div

-- 
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: need help with check/uncheck all checkbox [cakephp]

2013-11-18 Thread Dave M.
I don't think the class option works for multiple checkboxes. 
What you can do is specify a div and work off of that (you can also reduce 
your js code):

 echo $this-Form-input(Country, array(options = 
$viewData[countryList], multiple = checkbox, onclick = 
resetSelectAll(); , div = countries , name = selectedId)); 

 $('#selectall').click(function () {
var checked = $(this).is(':checked');
$('.countries input[type=checkbox]').each(function(){
$(this).prop('checked', checked); 
});   
});

On Friday, November 15, 2013 1:05:52 AM UTC-5, Sally wrote:

 I need help with this. I'm creating a checkbox to select or deselect the 
 country options. Please help to give some clues and explaination. I'll be 
 very grateful. Thanks in advance. 
 Below are the code:

 *Location: View/country/add.ctp file*

 script type=text/javascript
 $(document).ready(function () {
 $('#selectall').click(function () {
  var checked = $(this).is(':checked');
 
 $('.selectedId').each(function () {
 var checkBox = $(this);
 console.debug(checkBox);
 if (checked) {
 checkBox.prop('checked', true);
 }
 else {
 checkBox.prop('checked', false);
 }
 });
 
 });
 });
 /script
 div
 ?php echo $this-Form-create('Showcase'); ?
 fieldset
 legend?php echo __('Add Showcase Product'); ?/legend
 ?php
 echo $this-Form-input('p_start', array('label' = 'Start Date'));
 echo $this-Form-input('p_end', array('label' = 'End Date'));
 echo $this-Form-input('priority', array('label' = 'Priority'));
 echo $this-Form-input('Select all Country', array(type = 
 checkbox, 'id'='selectall'));
 echo $this-Form-input(Country, array(options = 
 $viewData[countryList], multiple = checkbox, onclick = 
 resetSelectAll(); , class = selectedId , name = selectedId)); 
 ?
 /fieldset
 
   
 ?php
 echo $this-Form-end(__('Submit'));
 echo $this-Html-link('Back', array('action' = 'listShowcases'));
 ?
 /div


-- 
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: Can anybody help me with this postLink() delete?

2013-11-06 Thread kushal i s
-create('Account'); 
 foreach($accounts as $account): ?

 table cellspacing=0 cellpadding=0 style=width:600px
 tr
  td
?php echo $account['Accounttype']['description'] ?/br 
  /td 
  td
   ?php echo $this-Html-link('Edit', array('action' = 
 'edit', $account['Account']['id'], $client_id)); ?
  /td 
  td
  ?php // echo $this-Html-link('Del', array('action' = 
 'delete', $account['Account']['id'], $client_id)); ?
 /td 
 td
 ?php echo $this-Html-link('Add Event', 
 '/events/add/'.$account['Account']['id'], array('action' = 'add', 
 $account['Account']['id'])); ?/td  
 td?php echo $this-Form-postLink('Delete',array('action' = 'delete', 
 $account['Account']['id'], $client_id),null,  'Are you sure?');?/td
  /tr  
 /table
  ?php 
 endforeach; echo $this-Form-end();
 ?
 div style=float:right?php  echo $this-Html-link('Back', 
 array('controller' = 'clients', 'action' = 'index')); ?/div


 --

 *What happened*

 Everything works great but delete button won't delete the last row 
 remaining in accounts list i meant delete works but not in the last row 
 remaining and i think the problem is when the delete postLink() get render, 
 it formed well in all rows but not in the first one the (form blablabla) 
 (/form) its not created in the first row and i just get (input blablabla) 
 without form tag so when i click delete nothing happens! just get # at 
 the end of the url

 *What I expected to happen*

 i expect to get a beautiful blank list saying there are not accounts 
 assigned to this client when i delete the last row!

 pd: thanks for help me out! and sorry for my bad english!



-- 
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.


ShellDispatcher help

2013-11-01 Thread Jared Testa
 = Configure::read('Error');
$exception = Configure::read('Exception');

$errorHandler = new ConsoleErrorHandler();
if (empty($error['consoleHandler'])) {
$error['consoleHandler'] = array($errorHandler, 'handleError');
Configure::write('Error', $error);
}
if (empty($exception['consoleHandler'])) {
$exception['consoleHandler'] = array($errorHandler, 'handleException');
Configure::write('Exception', $exception);
}
set_exception_handler($exception['consoleHandler']);
set_error_handler($error['consoleHandler'], Configure::read('Error.level'));
}

/**
 * Dispatches a CLI request
 *
 * @return boolean
 * @throws MissingShellMethodException
 */
public function dispatch() {
$shell = $this-shiftArgs();

if (!$shell) {
$this-help();
return false;
}
if (in_array($shell, array('help', '--help', '-h'))) {
$this-help();
return true;
}

$Shell = $this-_getShell($shell);

$command = null;
if (isset($this-args[0])) {
$command = $this-args[0];
}

if ($Shell instanceof Shell) {
$Shell-initialize();
return $Shell-runCommand($command, $this-args);
}
$methods = array_diff(get_class_methods($Shell), 
get_class_methods('Shell'));
$added = in_array($command, $methods);
$private = $command[0] === '_'  method_exists($Shell, $command);

if (!$private) {
if ($added) {
$this-shiftArgs();
$Shell-startup();
return $Shell-{$command}();
}
if (method_exists($Shell, 'main')) {
$Shell-startup();
return $Shell-main();
}
}

throw new MissingShellMethodException(array('shell' = $shell, 'method' = 
$command));
}

/**
 * Get shell to use, either plugin shell or application shell
 *
 * All paths in the loaded shell paths are searched.
 *
 * @param string $shell Optionally the name of a plugin
 * @return mixed An object
 * @throws MissingShellException when errors are encountered.
 */
protected function _getShell($shell) {
list($plugin, $shell) = pluginSplit($shell, true);

$plugin = Inflector::camelize($plugin);
$class = Inflector::camelize($shell) . 'Shell';

App::uses('Shell', 'Console');
App::uses('AppShell', 'Console/Command');
App::uses($class, $plugin . 'Console/Command');

if (!class_exists($class)) {
throw new MissingShellException(array(
'class' = $class
));
}
$Shell = new $class();
$Shell-plugin = trim($plugin, '.');
return $Shell;
}

/**
 * Parses command line options and extracts the directory paths from $params
 *
 * @param array $args Parameters to parse
 * @return void
 */
public function parseParams($args) {
$this-_parsePaths($args);

$defaults = array(
'app' = 'app',
'root' = dirname(dirname(dirname(dirname(__FILE__,
'working' = null,
'webroot' = 'webroot'
);
$params = array_merge($defaults, array_intersect_key($this-params, 
$defaults));
$isWin = false;
foreach ($defaults as $default = $value) {
if (strpos($params[$default], '\\') !== false) {
$isWin = true;
break;
}
}
$params = str_replace('\\', '/', $params);

if (isset($params['working'])) {
$params['working'] = trim($params['working']);
}

if (!empty($params['working'])  (!isset($this-args[0]) || 
isset($this-args[0])  $this-args[0][0] !== '.')) {
if ($params['working'][0] === '.') {
$params['working'] = realpath($params['working']);
}
if (empty($this-params['app'])  $params['working'] != $params['root']) {
$params['root'] = dirname($params['working']);
$params['app'] = basename($params['working']);
} else {
$params['root'] = $params['working'];
}
}

if ($params['app'][0] === '/' || preg_match('/([a-z])(:)/i', 
$params['app'], $matches)) {
$params['root'] = dirname($params['app']);
} elseif (strpos($params['app'], '/')) {
$params['root'] .= '/' . dirname($params['app']);
}

$params['app'] = basename($params['app']);
$params['working'] = rtrim($params['root'], '/');
if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) {
$params['working'] .= '/' . $params['app'];
}

if (!empty($matches[0]) || !empty($isWin)) {
$params = str_replace('/', '\\', $params);
}

$this-params = array_merge($this-params, $params);
}

/**
 * Parses out the paths from from the argv
 *
 * @param array $args
 * @return void
 */
protected function _parsePaths($args) {
$parsed = array();
$keys = array('-working', '--working', '-app', '--app', '-root', '--root');
foreach ($keys as $key) {
while (($index = array_search($key, $args)) !== false) {
$keyname = str_replace('-', '', $key);
$valueIndex = $index + 1;
$parsed[$keyname] = $args[$valueIndex];
array_splice($args, $index, 2);
}
}
$this-args = $args;
$this-params = $parsed;
}

/**
 * Removes first argument and shifts other arguments up
 *
 * @return mixed Null if there are no arguments otherwise the shifted 
argument
 */
public function shiftArgs() {
return array_shift($this-args);
}

/**
 * Shows console help. Performs an internal dispatch to the CommandList 
Shell
 *
 * @return void
 */
public function help() {
$this-args = array_merge(array('command_list'), $this-args);
$this-dispatch();
}

/**
 * Stop execution of the current script
 *
 * @param integer|string $status see http://php.net/exit for values
 * @return void
 */
protected function _stop($status

Re: ShellDispatcher help

2013-11-01 Thread AD7six
;
 }

 /**
  * Set the error/exception handlers for the console
  * based on the `Error.consoleHandler`, and `Exception.consoleHandler` 
 values
  * if they are set. If they are not set, the default ConsoleErrorHandler 
 will be
  * used.
  *
  * @return void
  */
 public function setErrorHandlers() {
 App::uses('ConsoleErrorHandler', 'Console');
 $error = Configure::read('Error');
 $exception = Configure::read('Exception');

 $errorHandler = new ConsoleErrorHandler();
 if (empty($error['consoleHandler'])) {
 $error['consoleHandler'] = array($errorHandler, 'handleError');
 Configure::write('Error', $error);
 }
 if (empty($exception['consoleHandler'])) {
 $exception['consoleHandler'] = array($errorHandler, 'handleException');
 Configure::write('Exception', $exception);
 }
 set_exception_handler($exception['consoleHandler']);
 set_error_handler($error['consoleHandler'], 
 Configure::read('Error.level'));
 }

 /**
  * Dispatches a CLI request
  *
  * @return boolean
  * @throws MissingShellMethodException
  */
 public function dispatch() {
 $shell = $this-shiftArgs();

 if (!$shell) {
 $this-help();
 return false;
 }
 if (in_array($shell, array('help', '--help', '-h'))) {
 $this-help();
 return true;
 }

 $Shell = $this-_getShell($shell);

 $command = null;
 if (isset($this-args[0])) {
 $command = $this-args[0];
 }

 if ($Shell instanceof Shell) {
 $Shell-initialize();
 return $Shell-runCommand($command, $this-args);
 }
 $methods = array_diff(get_class_methods($Shell), 
 get_class_methods('Shell'));
 $added = in_array($command, $methods);
 $private = $command[0] === '_'  method_exists($Shell, $command);

 if (!$private) {
 if ($added) {
 $this-shiftArgs();
 $Shell-startup();
 return $Shell-{$command}();
 }
 if (method_exists($Shell, 'main')) {
 $Shell-startup();
 return $Shell-main();
 }
 }

 throw new MissingShellMethodException(array('shell' = $shell, 'method' = 
 $command));
 }

 /**
  * Get shell to use, either plugin shell or application shell
  *
  * All paths in the loaded shell paths are searched.
  *
  * @param string $shell Optionally the name of a plugin
  * @return mixed An object
  * @throws MissingShellException when errors are encountered.
  */
 protected function _getShell($shell) {
 list($plugin, $shell) = pluginSplit($shell, true);

 $plugin = Inflector::camelize($plugin);
 $class = Inflector::camelize($shell) . 'Shell';

 App::uses('Shell', 'Console');
 App::uses('AppShell', 'Console/Command');
 App::uses($class, $plugin . 'Console/Command');

 if (!class_exists($class)) {
 throw new MissingShellException(array(
 'class' = $class
 ));
 }
 $Shell = new $class();
 $Shell-plugin = trim($plugin, '.');
 return $Shell;
 }

 /**
  * Parses command line options and extracts the directory paths from 
 $params
  *
  * @param array $args Parameters to parse
  * @return void
  */
 public function parseParams($args) {
 $this-_parsePaths($args);

 $defaults = array(
 'app' = 'app',
 'root' = dirname(dirname(dirname(dirname(__FILE__,
 'working' = null,
 'webroot' = 'webroot'
 );
 $params = array_merge($defaults, array_intersect_key($this-params, 
 $defaults));
 $isWin = false;
 foreach ($defaults as $default = $value) {
 if (strpos($params[$default], '\\') !== false) {
 $isWin = true;
 break;
 }
 }
 $params = str_replace('\\', '/', $params);

 if (isset($params['working'])) {
 $params['working'] = trim($params['working']);
 }

 if (!empty($params['working'])  (!isset($this-args[0]) || 
 isset($this-args[0])  $this-args[0][0] !== '.')) {
 if ($params['working'][0] === '.') {
 $params['working'] = realpath($params['working']);
 }
 if (empty($this-params['app'])  $params['working'] != $params['root']) {
 $params['root'] = dirname($params['working']);
 $params['app'] = basename($params['working']);
 } else {
 $params['root'] = $params['working'];
 }
 }

 if ($params['app'][0] === '/' || preg_match('/([a-z])(:)/i', 
 $params['app'], $matches)) {
 $params['root'] = dirname($params['app']);
 } elseif (strpos($params['app'], '/')) {
 $params['root'] .= '/' . dirname($params['app']);
 }

 $params['app'] = basename($params['app']);
 $params['working'] = rtrim($params['root'], '/');
 if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) {
 $params['working'] .= '/' . $params['app'];
 }

 if (!empty($matches[0]) || !empty($isWin)) {
 $params = str_replace('/', '\\', $params);
 }

 $this-params = array_merge($this-params, $params);
 }

 /**
  * Parses out the paths from from the argv
  *
  * @param array $args
  * @return void
  */
 protected function _parsePaths($args) {
 $parsed = array();
 $keys = array('-working', '--working', '-app', '--app', '-root', '--root');
 foreach ($keys as $key) {
 while (($index = array_search($key, $args)) !== false) {
 $keyname = str_replace('-', '', $key);
 $valueIndex = $index + 1;
 $parsed[$keyname] = $args[$valueIndex];
 array_splice($args, $index, 2);
 }
 }
 $this-args = $args;
 $this-params = $parsed;
 }

 /**
  * Removes first argument and shifts other arguments up
  *
  * @return

Re: Pagination Help

2013-10-25 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Dave,

is this condition on your first model or on a related model?


Anja


Am 16.10.2013 17:59, schrieb Advantage+:
 Now this used to work, but now it does not.. Not sure what happened.
 
  
 
 I have standard pagination but offer the ability to paginate listings based
 on featured.
 
  
 
 ?php $this-Paginator-options(array('url'=
 array($this-params['pass'])));?
 
  
 
 So if featured was passed it would then only display featured listings and
 paginate correct.
 
  
 
 Now it just defaults back to standard (non-featured) listings. Initial page
 of featured is fine but all the pagination links do not continue to carry
 the listings/featured/page:xxx it goes to listings/page:xxx
 
  
 
 Any insight would be great.
 
  
 
 Version 2.3.8
 
  
 
 Thanks,
 
 Dave
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlJqTXQACgkQbOdiIJzHNKEKDQCeJmOXfPY4Y9zDs0/ogZjS5ljw
3u4An07PTuWLz1E8/iI+KluKzo1fsMU1
=Gw4r
-END PGP SIGNATURE-

-- 
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: Pagination Help

2013-10-25 Thread Advantage+
On the model it's self. 
The is a field for the listings / Listings table for featured bool.

Pagination $params has featured = $featured so if the listings/featured
is passed then it would only paginate featured listings.


-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Anja Liebermann
Sent: Friday, October 25, 2013 8:23 AM
To: cake-php@googlegroups.com
Subject: Re: Pagination Help

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Dave,

is this condition on your first model or on a related model?


Anja


Am 16.10.2013 17:59, schrieb Advantage+:
 Now this used to work, but now it does not.. Not sure what happened.
 
  
 
 I have standard pagination but offer the ability to paginate listings 
 based on featured.
 
  
 
 ?php $this-Paginator-options(array('url'=
 array($this-params['pass'])));?
 
  
 
 So if featured was passed it would then only display featured 
 listings and paginate correct.
 
  
 
 Now it just defaults back to standard (non-featured) listings. Initial 
 page of featured is fine but all the pagination links do not continue 
 to carry the listings/featured/page:xxx it goes to listings/page:xxx
 
  
 
 Any insight would be great.
 
  
 
 Version 2.3.8
 
  
 
 Thanks,
 
 Dave
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlJqTXQACgkQbOdiIJzHNKEKDQCeJmOXfPY4Y9zDs0/ogZjS5ljw
3u4An07PTuWLz1E8/iI+KluKzo1fsMU1
=Gw4r
-END PGP SIGNATURE-

--
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.


Pagination Help

2013-10-16 Thread Advantage+
Now this used to work, but now it does not.. Not sure what happened.

 

I have standard pagination but offer the ability to paginate listings based
on featured.

 

?php $this-Paginator-options(array('url'=
array($this-params['pass'])));?

 

So if featured was passed it would then only display featured listings and
paginate correct.

 

Now it just defaults back to standard (non-featured) listings. Initial page
of featured is fine but all the pagination links do not continue to carry
the listings/featured/page:xxx it goes to listings/page:xxx

 

Any insight would be great.

 

Version 2.3.8

 

Thanks,

Dave

-- 
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.


noobie- help with cake blog tutorial - Error PostsController could not be found

2013-10-06 Thread Frank Thomson
I am running WAMP server on my windows 8 laptop.
I have cake installed and the test screen shows up as OK.
There is more detail on that on my personal blog 
herehttp://frankstech.blogspot.com.au/2013/10/cakephp-installation.html

I am trying to follow the blog tutorial from the cake web site
here:
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html

The problem I get is that when I try

http://localhost/cake_2_0/posts/index   
I get and get a page full of errors (see below)
Error: PostsController could not be found.
Error: Create the class PostsController below in file: 
app\controller\PostsController.php


I believe that I have followed the tutorial accurately.  Again I have 
documented it step by step on my blog.
Here:
http://frankstech.blogspot.com.au/2013/10/cakephp-blog-tutorial.html

Any suggestions on what I can do to track this issue down.

Thanks in advance.
Frank

-- 
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: noobie- help with cake blog tutorial - Error PostsController could not be found

2013-10-06 Thread Gaurav Matta
You seem to miss php tags in your controller...How comfortable are you with
Php


On Fri, Oct 4, 2013 at 3:19 AM, Frank Thomson frankt2...@gmail.com wrote:

 I am running WAMP server on my windows 8 laptop.
 I have cake installed and the test screen shows up as OK.
 There is more detail on that on my personal blog 
 herehttp://frankstech.blogspot.com.au/2013/10/cakephp-installation.html

 I am trying to follow the blog tutorial from the cake web site
 here:
 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html

 The problem I get is that when I try

 http://localhost/cake_2_0/posts/index
 I get and get a page full of errors (see below)
 Error: PostsController could not be found.
 Error: Create the class PostsController below in file:
 app\controller\PostsController.php


 I believe that I have followed the tutorial accurately.  Again I have
 documented it step by step on my blog.
 Here:
 http://frankstech.blogspot.com.au/2013/10/cakephp-blog-tutorial.html

 Any suggestions on what I can do to track this issue down.

 Thanks in advance.
 Frank

 --
 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.


  1   2   3   4   5   6   7   8   9   10   >