AppController not loading ?

2011-12-24 Thread David Brisebois
Hi guys

I've been working with CakePHP 1.2/1.3 in the past, but first time
with 2.0.4

I just started a project, now trying to load Auth component from
AppController, turns out it doesn't seem to load ! I put the
AppController.php in /app/Controller, I put only a die() but nothing
happens !!

I have the App:uses('AppController','Controller'); on top of my
AccountsController but still nothing. But a die() in /lib/Controller/
AppController.php does work !

What am I missing ? Not a filename typo, I changed it 3 times...

Thanks in advance and good holidays to everybody ;)

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


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


Re: Paging with paginator - is that the right way?

2011-12-24 Thread gloop
Hello,

awesome :-)

It works all fine.

Here my Code:

public function view($id = null) {
  $this->News->contain('User');
  $this->News->id = $id;
  $this->set('News',$this->News->read());

  $this->paginate = array(
  'NewsComment' => array(
'conditions' => array(
'NewsComment.news_id' => $id,
'NewsComment.active' => 1,

),
'recursive' => -1,
'limit' => 1
  )
  );
  $this->set('Comments',$this->paginate('NewsComment'));

}

didnt another way for 'recursive' => 1

Big Thanks :)
On 24 Dez., 18:34, Tilen Majerle  wrote:
> yes it is, you get news withoud NewsComment, so recursive -1 or use contain
> Behavior to limit for find method
>
> and than configure Paginator for NewsComment (use conditions for
> "NewsComment.news_id" = $yournewsid)
> and $comments = $this->paginate('NewsComment');
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/12/24 gloop 
>
>
>
>
>
>
>
> > Hello everbody.
>
> > I have 3 Tables:
> >  - users [id; username; password]
> >  - news [id; user_id; title; comment; created; modified;
> > news_comment_count]
> >  - news_comment [id; news_id; username; title; comment; created;
> > modified; active]
>
> > news hasMany news_comment
> > news belongsTo user
> > news_comment belongsTo news counterCache true; counterScope =>
> > NewsComment  1
>
> > Now i want to view news with id 2 but i want to show max 20
> > news_comment.
>
> > Is there a way to use paginate?
>
> > Kind Regards
> > Steffen
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

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


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


Re: how to put image variable between image helper quotes

2011-12-24 Thread paul
You need
$thumb = $this->Html->image('images/'.$image['Image']
['img_file'],array('width'=>"60", 'height'=>"40"));
echo $thumb;
or just
 echo $this->Html->image('images/'.$image['Image']
['img_file'],array('width'=>"60", 'height'=>"40"));

On Dec 24, 12:02 pm, Tilen Majerle  wrote:
> print  $this->Html->image('images/'.$image['Image']
> ['img_file'],array('width'=>"60", 'height'=>"40"));
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/12/24 ahmed fakher 
>
>
>
>
>
>
>
> > $this->Html->image('images/'.$image['Image']
> > ['img_file'],array('width'=>"60", 'height'=>"40"));

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


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


Re: CakeSession problem

2011-12-24 Thread Thiago Belem
Sorry guys, i didn't saw the 1&1 part..

Thanks Tilen for the answer! :)

Cya,
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil

+55 (21) 8865.9250
thiagobelem.net
cont...@thiagobelem.net

*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
Assando Sites*, curso de CakePHP *»* assando-sites.com.br


2011/12/24 Sam Sherlock 

> You can add a line to htaccess to change version.
>
> Suspect you'll have mod rewrite issues after that.
>
> You can point the domain direct to the webroot of cake app.
>
> I guess you will also need to adjust Console/cake to get php 5.2.6+ on the
> command line too.
> On another server I have done the above and added a custom php.ini for cms
> line
>
> Planning the same on 1&1 (guess other adjustments required to)
>
> Also 1&1 don't permit db sessions which is shame (applies to shared server
> packages)
>
> - S
> On 24 Dec 2011 17:08, "onur"  wrote:
>
>> i have just realised that the problem is 1&1's php version is under cake
>> 2 min reqs. Thans you for your answers.
>> 24 Ara 2011 19:00 tarihinde "Tilen Majerle" 
>> yazdı:
>>
>>> Thiago, this is not true, if you look at component methods, all, except
>>> setFlash call CakeSession::method(), so you can use CakeSession and should
>>> work !
>>>
>>> onur...you can Check, if key exists in Session with CakeSession::check()
>>> or if you are in controller $this->Session->check()
>>> --
>>> Lep pozdrav, Tilen Majerle
>>> http://majerle.eu
>>>
>>>
>>>
>>> 2011/12/24 Thiago Belem 
>>>
 Did you read the documentation?

 http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html

 You should use the SessionComponent...

 $this->Session->write('Person.eyeColor', 'Green');

 $green = $this->Session->read('Person.eyeColor');

 Cya,
 --
 ***Thiago Belem*
 Desenvolvedor
 Rio de Janeiro - RJ - Brasil

 +55 (21) 8865.9250
 thiagobelem.net
 cont...@thiagobelem.net

 *Skype / gTalk **»* thiago.belem.web
 *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
 Assando Sites*, curso de CakePHP *»* assando-sites.com.br



 2011/12/24 onur 

> hi everybody,
>
> i've session problem on 1&1 server
>
> my code like:
>
> class AppController extends Controller
> {
> public $components = array('Session','Language','PrgPattern');
> //public $helpers =
> array('Html','Form','Js','Session','SearchForm','Text','Paginator');
> public $permissions = array();
>
> public $userPermissions = Array();
> public $advertPermissions = Array();
> public $bookingPermissions = Array();
>
> public $userPermissionsPreFix = 'lp_user';
> public $advertPermissionsPreFix = 'lp_advert';
> public $bookingPermissionsPreFix = 'lp_booking';
>
> public function beforeFilter()
> {
>CakeSession::write('User.Id',0);
>echo CakeSession::read('User.Id'); // outputs nothing ??
>
>$_SESSION['User.Id'] = 0;
> eho
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and
> help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/cake-php
>

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


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

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

Re: Paging with paginator - is that the right way?

2011-12-24 Thread Tilen Majerle
yes it is, you get news withoud NewsComment, so recursive -1 or use contain
Behavior to limit for find method

and than configure Paginator for NewsComment (use conditions for
"NewsComment.news_id" = $yournewsid)
and $comments = $this->paginate('NewsComment');
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/24 gloop 

> Hello everbody.
>
> I have 3 Tables:
>  - users [id; username; password]
>  - news [id; user_id; title; comment; created; modified;
> news_comment_count]
>  - news_comment [id; news_id; username; title; comment; created;
> modified; active]
>
> news hasMany news_comment
> news belongsTo user
> news_comment belongsTo news counterCache true; counterScope =>
> NewsComment  1
>
> Now i want to view news with id 2 but i want to show max 20
> news_comment.
>
> Is there a way to use paginate?
>
> Kind Regards
> Steffen
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


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


Re: CakeSession problem

2011-12-24 Thread Sam Sherlock
You can add a line to htaccess to change version.

Suspect you'll have mod rewrite issues after that.

You can point the domain direct to the webroot of cake app.

I guess you will also need to adjust Console/cake to get php 5.2.6+ on the
command line too.
On another server I have done the above and added a custom php.ini for cms
line

Planning the same on 1&1 (guess other adjustments required to)

Also 1&1 don't permit db sessions which is shame (applies to shared server
packages)

- S
On 24 Dec 2011 17:08, "onur"  wrote:

> i have just realised that the problem is 1&1's php version is under cake 2
> min reqs. Thans you for your answers.
> 24 Ara 2011 19:00 tarihinde "Tilen Majerle" 
> yazdı:
>
>> Thiago, this is not true, if you look at component methods, all, except
>> setFlash call CakeSession::method(), so you can use CakeSession and should
>> work !
>>
>> onur...you can Check, if key exists in Session with CakeSession::check()
>> or if you are in controller $this->Session->check()
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>>
>>
>> 2011/12/24 Thiago Belem 
>>
>>> Did you read the documentation?
>>>
>>> http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html
>>>
>>> You should use the SessionComponent...
>>>
>>> $this->Session->write('Person.eyeColor', 'Green');
>>>
>>> $green = $this->Session->read('Person.eyeColor');
>>>
>>> Cya,
>>> --
>>> ***Thiago Belem*
>>> Desenvolvedor
>>> Rio de Janeiro - RJ - Brasil
>>>
>>> +55 (21) 8865.9250
>>> thiagobelem.net
>>> cont...@thiagobelem.net
>>>
>>> *Skype / gTalk **»* thiago.belem.web
>>> *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
>>> Assando Sites*, curso de CakePHP *»* assando-sites.com.br
>>>
>>>
>>>
>>> 2011/12/24 onur 
>>>
 hi everybody,

 i've session problem on 1&1 server

 my code like:

 class AppController extends Controller
 {
 public $components = array('Session','Language','PrgPattern');
 //public $helpers =
 array('Html','Form','Js','Session','SearchForm','Text','Paginator');
 public $permissions = array();

 public $userPermissions = Array();
 public $advertPermissions = Array();
 public $bookingPermissions = Array();

 public $userPermissionsPreFix = 'lp_user';
 public $advertPermissionsPreFix = 'lp_advert';
 public $bookingPermissionsPreFix = 'lp_booking';

 public function beforeFilter()
 {
CakeSession::write('User.Id',0);
echo CakeSession::read('User.Id'); // outputs nothing ??

$_SESSION['User.Id'] = 0;
 eho


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


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

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

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


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


Paging with paginator - is that the right way?

2011-12-24 Thread gloop
Hello everbody.

I have 3 Tables:
 - users [id; username; password]
 - news [id; user_id; title; comment; created; modified;
news_comment_count]
 - news_comment [id; news_id; username; title; comment; created;
modified; active]

news hasMany news_comment
news belongsTo user
news_comment belongsTo news counterCache true; counterScope =>
NewsComment  1

Now i want to view news with id 2 but i want to show max 20
news_comment.

Is there a way to use paginate?

Kind Regards
Steffen

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


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


Re: CakeSession problem

2011-12-24 Thread Tilen Majerle
Thiago, this is not true, if you look at component methods, all, except
setFlash call CakeSession::method(), so you can use CakeSession and should
work !

onur...you can Check, if key exists in Session with CakeSession::check() or
if you are in controller $this->Session->check()
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/24 Thiago Belem 

> Did you read the documentation?
>
> http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html
>
> You should use the SessionComponent...
>
> $this->Session->write('Person.eyeColor', 'Green');
>
> $green = $this->Session->read('Person.eyeColor');
>
> Cya,
> --
> ***Thiago Belem*
> Desenvolvedor
> Rio de Janeiro - RJ - Brasil
>
> +55 (21) 8865.9250
> thiagobelem.net
> cont...@thiagobelem.net
>
> *Skype / gTalk **»* thiago.belem.web
> *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
> Assando Sites*, curso de CakePHP *»* assando-sites.com.br
>
>
>
> 2011/12/24 onur 
>
>> hi everybody,
>>
>> i've session problem on 1&1 server
>>
>> my code like:
>>
>> class AppController extends Controller
>> {
>> public $components = array('Session','Language','PrgPattern');
>> //public $helpers =
>> array('Html','Form','Js','Session','SearchForm','Text','Paginator');
>> public $permissions = array();
>>
>> public $userPermissions = Array();
>> public $advertPermissions = Array();
>> public $bookingPermissions = Array();
>>
>> public $userPermissionsPreFix = 'lp_user';
>> public $advertPermissionsPreFix = 'lp_advert';
>> public $bookingPermissionsPreFix = 'lp_booking';
>>
>> public function beforeFilter()
>> {
>>CakeSession::write('User.Id',0);
>>echo CakeSession::read('User.Id'); // outputs nothing ??
>>
>>$_SESSION['User.Id'] = 0;
>> eho
>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


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


Re: CakeSession problem

2011-12-24 Thread Thiago Belem
Did you read the documentation?

http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html

You should use the SessionComponent...

$this->Session->write('Person.eyeColor', 'Green');

$green = $this->Session->read('Person.eyeColor');

Cya,
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil

+55 (21) 8865.9250
thiagobelem.net
cont...@thiagobelem.net

*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt*
Assando Sites*, curso de CakePHP *»* assando-sites.com.br


2011/12/24 onur 

> hi everybody,
>
> i've session problem on 1&1 server
>
> my code like:
>
> class AppController extends Controller
> {
> public $components = array('Session','Language','PrgPattern');
> //public $helpers =
> array('Html','Form','Js','Session','SearchForm','Text','Paginator');
> public $permissions = array();
>
> public $userPermissions = Array();
> public $advertPermissions = Array();
> public $bookingPermissions = Array();
>
> public $userPermissionsPreFix = 'lp_user';
> public $advertPermissionsPreFix = 'lp_advert';
> public $bookingPermissionsPreFix = 'lp_booking';
>
> public function beforeFilter()
> {
>CakeSession::write('User.Id',0);
>echo CakeSession::read('User.Id'); // outputs nothing ??
>
>$_SESSION['User.Id'] = 0;
> eho
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


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


CakeSession problem

2011-12-24 Thread onur
hi everybody,

i've session problem on 1&1 server

my code like:

class AppController extends Controller
{
public $components = array('Session','Language','PrgPattern');
//public $helpers =
array('Html','Form','Js','Session','SearchForm','Text','Paginator');
public $permissions = array();

public $userPermissions = Array();
public $advertPermissions = Array();
public $bookingPermissions = Array();

public $userPermissionsPreFix = 'lp_user';
public $advertPermissionsPreFix = 'lp_advert';
public $bookingPermissionsPreFix = 'lp_booking';

public function beforeFilter()
{
   CakeSession::write('User.Id',0);
   echo CakeSession::read('User.Id'); // outputs nothing ??

   $_SESSION['User.Id'] = 0;
eho

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


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


Re: how to put image variable between image helper quotes

2011-12-24 Thread Tilen Majerle
print  $this->Html->image('images/'.$image['Image']
['img_file'],array('width'=>"60", 'height'=>"40"));
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/24 ahmed fakher 

> $this->Html->image('images/'.$image['Image']
> ['img_file'],array('width'=>"60", 'height'=>"40"));
>

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


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


Re: Layout Bug or Doc Bug in 2.0.4

2011-12-24 Thread Tilen Majerle
i think, that you method viewActive is never executed directly by server,
you have to use underscored names, so view_active would be correct
 public function view_ctive() {
   $this->set('title_for_layout', 'View Active Users');
   $this->layout = 'default_small_ad';
}

try now localhost/controller_name/view_active
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/23 John Lockwood 

>  public function viewActive() {
>$this->set('title_for_layout', 'View Active Users');
>$this->layout = 'default_small_ad';
> }
>

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


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


Re: Web-App works local but not on my Server

2011-12-24 Thread Petrisor Buga
Could you please give more details? like controller error
messages... !

On Dec 23, 8:20 pm, Gerrit  wrote:
> Hello everybody,
>
> I've the following question: On my local machine my application works
> correctly. I call the app folder, become redirected to the login page,
> can enter login details and after a successful login I will be
> redirected to the index-action. When I try this in the prod
> environment my request was catched by the black hole. Has anybody a
> hint for me what could be the reason?
>
> Thanks and regards!

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


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


Re: Cake 2.0.4 : how to display "logout" if logged, else display "login"

2011-12-24 Thread JonStark
Indeed, stupid mistake...  Thanks again ! I need to be more careful.

This works :

Html->url('/items/add');

if ($this->Session->check('Auth.User.id')) {
echo ("


Add an activity


");
} else
{
echo ("");
}

?>

On 24 déc, 11:25, euromark  wrote:
> it does cause the problem :)
> usually a good IDEA would automatically display a parse error
>
> On 24 Dez., 02:52, Geoff Douglas  wrote:
>
>
>
>
>
>
>
> > Under the logged in condition... you are using double quotes twice... could
> > cause a problem.

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


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


Re: Cake 2.0.4 : how to display "logout" if logged, else display "login"

2011-12-24 Thread euromark
it does cause the problem :)
usually a good IDEA would automatically display a parse error


On 24 Dez., 02:52, Geoff Douglas  wrote:
> Under the logged in condition... you are using double quotes twice... could
> cause a problem.

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


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


how to put image variable between image helper quotes

2011-12-24 Thread ahmed fakher
in the first example i see the image

 $thumb = $this->Html->image('images/image-1.jpg',array('width'=>"60",
'height'=>"40"));

in the second example  i fetch image name from database table..but i
don't know how to put this variable with the right way..something
wrong in the variable place

echo $thumb = $this->Html->image('images/'.$image['Image']
['img_file'],array('width'=>"60", 'height'=>"40"));


notice
 $image['Image']['img_file'] = image-1.jpg

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


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