Error: Class 'PDO' not found

2013-10-21 Thread cooked
I am having issues using cake 2.3.5 on shared web hosting. Everything works 
fine with ver 1.3. I have scoured the web for a solution and it was 
suggested that  I check to if the PDO Mysql driver was installed or not. 
When I checked my php config PDO is already installed. Someone please help, 
i need to get this website up and everything I have tried has not worked.

Here is the full error

Fatal Error

*Error: *Class 'PDO' not found 
*File: */home/missi132/public_html/lib/Cake/Model/Datasource/Database/Mysql.php 

*Line: *179

*Notice: *If you want to customize this error message, create 
app/View/Errors/fatal_error.ctp


Thanks 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/groups/opt_out.


hasOne association

2008-05-22 Thread cooked

I am stumped with a problem when using model associations. For the
some reason the findAll generates an incorrect join query. Will great
appreciate any help. Both my models and controllers along with the
MySql output
is shown below.

class Playerstat extends AppModel
{
var $name = 'Playerstat';
var $belongsTo = array('Player' => array(
  'className' => 'Player',
  'foreignKey' =>
'player_id'));
}

class Player extends AppModel
{
var $name = 'Player';
var $hasOne = array('Playerstat' => array(
  'className' =>
'Playerstat',
  'foreignKey' =>
'player_id',
  'dependent' => true));
}

Each Player record has a corresponding Playerstat record. player_id is
the primary key in
table players and player_id is the foreign key in playerstat.

I have the following code in one of my controller function

$status = PLAYER_ACTIVE;
$results = $this->Player->findAll("Player.active = $status AND
Player.level = 'A'",
   array("Player.fname", "Player.lname",
"Playerstat.wins", "Playerstat.loss",
   "Playerstat.points", 
"Playerstat.last_played"),
'Playerstat.points DESC');

I get the following result from MySql

Query: SELECT `Player`.`fname`, `Player`.`lname`, `Playerstat`.`wins`,
`Playerstat`.`loss`, `Playerstat`.`points`, `Playerstat`.`last_played`
FROM `players` AS `Player` LEFT JOIN `playerstats` AS `Playerstat` ON
(`Playerstat`.`player_id` = `Player`.`id`) WHERE `Player`.`active` = 1
AND `Player`.`level` = 'A' ORDER BY `Playerstat`.`points` DESC

Warning (512): SQL Error: 1054: Unknown column 'Player.id' in 'on
clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 440]

The players table does not have an "id" field it is suppose to be
player_id. What I am doing wrong? How can I make "id" into
"player_id".

Thanks,

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



Re: Email Component

2008-05-19 Thread cooked

Thanks for the reply I will try out the debug and let you know what I
see. I am
use version 1.2 the latest available for download.

On May 16, 10:45 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> Weird. It might be worth putting a die(debug($View)) statement in
> EmailComponent::__renderTemplate() just after it's set. After the
> layout is set on it, actually.
>
> What version are you using?
>
> On Fri, May 16, 2008 at 7:51 PM, cooked <[EMAIL PROTECTED]> wrote:
>
> > Sorry about not supplying the context. Here is the code snippet from
> > my Controller.
>
> >var $component= array('Email');
>
> >function join()
> >{
> >  if (!empty($this->data)) {
> >
> >
> >if ($this->Player->save($this->data)) {
> > $this->sendJoinEmail($this->data['Player']
> > ['email'],
> >  $this->data['Player']
> > ['activation_code']);
> > }
> >   }
> >}
>
> >function sendJoinEmail($emailaddr, $code)
> >{
> >$this->Email->to = $emailaddr;
> >$this->Email->subject = 'Fremont Tennis Ladder Activation Code';
> >$this->Email->replyTo = '[EMAIL PROTECTED]';
> >$this->Email->from= 'Tennis Ladder';
> >$this->Email->template = 'welcome';
> >$this->set('code', $code);
> >$this->Email->send();
> >}
>
> > On May 16, 4:12 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> >> I think the obvious question is, how are you specifying the path to
> >> your template?
>
> >> On Fri, May 16, 2008 at 1:48 PM, cooked <[EMAIL PROTECTED]> wrote:
>
> >> > I have seeing a weird issue with theemailcomponent. Theemailare
> >> > being sent
> >> > but with a message that the template file is not found. For some
> >> > reason cake is trying to
> >> > find the template in
> >> > .../app/views/views/elements/email/text/welcome.ctp.
>
> >> > As you can see there is an extra "views" in the path. Can someone let
> >> > me why
> >> > is this hapening. Is this a known bug?
>
> >> > Thanks- Hide quoted text -
>
> >> - Show quoted text -

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



Re: Email Component

2008-05-16 Thread cooked

Sorry about not supplying the context. Here is the code snippet from
my Controller.

var $component = array('Email');

function join()
{
  if (!empty($this->data)) {


if ($this->Player->save($this->data)) {
 $this->sendJoinEmail($this->data['Player']
['email'],
  $this->data['Player']
['activation_code']);
 }
   }
}

function sendJoinEmail($emailaddr, $code)
{
$this->Email->to = $emailaddr;
$this->Email->subject = 'Fremont Tennis Ladder Activation Code';
$this->Email->replyTo = '[EMAIL PROTECTED]';
$this->Email->from= 'Tennis Ladder';
$this->Email->template = 'welcome';
$this->set('code', $code);
$this->Email->send();
}


On May 16, 4:12 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> I think the obvious question is, how are you specifying the path to
> your template?
>
>
>
> On Fri, May 16, 2008 at 1:48 PM, cooked <[EMAIL PROTECTED]> wrote:
>
> > I have seeing a weird issue with the email component. The email are
> > being sent
> > but with a message that the template file is not found. For some
> > reason cake is trying to
> > find the template in
> > .../app/views/views/elements/email/text/welcome.ctp.
>
> > As you can see there is an extra "views" in the path. Can someone let
> > me why
> > is this hapening. Is this a known bug?
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

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



Email Component

2008-05-16 Thread cooked

I have seeing a weird issue with the email component. The email are
being sent
but with a message that the template file is not found. For some
reason cake is trying to
find the template in
.../app/views/views/elements/email/text/welcome.ctp.

As you can see there is an extra "views" in the path. Can someone let
me why
is this hapening. Is this a known bug?

Thanks

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



Re: Submitting forms data to a different controller

2007-04-26 Thread cooked

yes this what I am trying to do. Here is my directory structure

pages/home.thtml (view)

app/controller/users_controller.php (controller)

in the home.thtml file I submit a form
like this


in the login function in users_controller.php
I am trying to access the data submitted
$this->data['User']['username']

But I don't get any data ..

Thanks again.

- harsh

On Apr 26, 11:11 am, rtconner <[EMAIL PROTECTED]> wrote:
> I'm confused? What is the problem?
> 
> ...
> 
>
> is this what you want?
>
> On Apr 26, 12:03 pm, cooked <[EMAIL PROTECTED]> wrote:
>
>
>
> > Is there way to submit forms data to a different controller than the
> > one responsible for the
> > view. I am using the page controller to render my home page. In the
> > home page I have a login
> > box, which submits data to /users/login. But in my controller
> > users_controller.php function
> > login I don't see the data submitted. Is this even possible with
> > cakePHP.
>
> > All help appreciated.
>
> > Thanks,
> > - harsh- Hide quoted text -
>
> - Show quoted text -


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



Re: Submitting forms data to a different controller

2007-04-26 Thread cooked

Yes that exactly what I want. But when I use $this->data in the action
function of the
controller I am not seeing any data.

Thanks,
- harsh

On Apr 26, 11:11 am, rtconner <[EMAIL PROTECTED]> wrote:
> I'm confused? What is the problem?
> 
> ...
> 
>
> is this what you want?
>
> On Apr 26, 12:03 pm, cooked <[EMAIL PROTECTED]> wrote:
>
>
>
> > Is there way to submit forms data to a different controller than the
> > one responsible for the
> > view. I am using the page controller to render my home page. In the
> > home page I have a login
> > box, which submits data to /users/login. But in my controller
> > users_controller.php function
> > login I don't see the data submitted. Is this even possible with
> > cakePHP.
>
> > All help appreciated.
>
> > Thanks,
> > - harsh- Hide quoted text -
>
> - Show quoted text -


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



Submitting forms data to a different controller

2007-04-26 Thread cooked

Is there way to submit forms data to a different controller than the
one responsible for the
view. I am using the page controller to render my home page. In the
home page I have a login
box, which submits data to /users/login. But in my controller
users_controller.php function
login I don't see the data submitted. Is this even possible with
cakePHP.

All help appreciated.

Thanks,
- harsh


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



Re: PHP question

2007-04-25 Thread cooked

Thank you all for the reply. I get it now.

- harsh

On Apr 25, 3:09 pm, "DJ Spark" <[EMAIL PROTECTED]> wrote:
>   you probably have already figured it out, but it works like this:
>   - if you do not define a model (or an array of models) to your
> controller, cakePHP will automagically guess the model name by using
> the Singular UpperCamelCase form of your controller name. 'tests' ->
> 'Test' .
>  - if you use $uses = array('Model1', 'Model2'); in your controller,
> it'll check if those are ok, and you can access them directly.
>
>   remember you can always access related models, without the need of
> $uses =array('Model1', 'Model2'); :
> $this->Test->read();
>
> and if model Foo has *any* relation with test, you may try:
> $this->Test->Foo->read();
>
>  help it hopes
>  spark
>
> On 4/25/07, Pablo Viojo <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Take a look at the constructClasses method
> > (cake/libs/controller/controller.php) specially the line
>
> > $this->{$modelClass} =& $model;
>
> > Regards,
>
> > --
> > Pablo Viojo
> >  [EMAIL PROTECTED]
> >http://pviojo.net
>
> > On 4/25/07, cooked <[EMAIL PROTECTED]> wrote:
>
> > > rtconner,
>
> > > Thanks for your reply. But get_class will only get me name of the
> > > class from the actual object. I guess my question
> > > is really basic, though I don't have problem with it I just want to
> > > know it works. Here is an example, this is fundamental
> > > to cakePHP, and I am afraid I might be sounding really dumb.
>
> > > My Model
>
> > > class Test extends AppModel {
> > > ...
> > > ..
> > > }
>
> > > My Controller
> > > class TestsController extends AppController {
> > > ..
> > >  function index () {
> > >$this->Test->save(...); <=== My question is here,
> > > where did Test come from,
> > >  }
>
> > > }
>
> > > Hope I have made my question a little bit clearer. Test was never a
> > > variable of my Controller, then how
> > > can I access "Test".
>
> > > Thanks for bearing with me :-).
>
> > > On Apr 25, 2:10 pm, rtconner <[EMAIL PROTECTED]> wrote:
> > > > I think get_class() might be what you are looking for
> > > > php.net/get_class.
>
> > > > On Apr 25, 1:47 pm, cooked <[EMAIL PROTECTED]> wrote:
>
> > > > > I am new to cakePHP and i have things working pretty much, but one
> > > > > questions keeps bugging me. How does this work when I do this in the
> > > > > Controller
> > > > > $this->[MyModel]->func();
> > > > > Which variable in the controller stores the name of the Model. I have
> > > > > a lot of experience in C++/Java and I haven't seen anything like
> > > > > this.
> > > > > Is there some magic (like __call) happening in PHP which I don't know
> > > > > about.
>
> > > > > Thanks in advance.- Hide quoted text -
>
> > > > - Show quoted text -
>
> --
> [livesets]http://djspark.com.br/
> [web]http://synapsisdi.com.br- Hide quoted text -
>
> - Show quoted text -


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



Re: PHP question

2007-04-25 Thread cooked

rtconner,

Thanks for your reply. But get_class will only get me name of the
class from the actual object. I guess my question
is really basic, though I don't have problem with it I just want to
know it works. Here is an example, this is fundamental
to cakePHP, and I am afraid I might be sounding really dumb.

My Model

class Test extends AppModel {
...
..
}

My Controller
class TestsController extends AppController {
..
 function index () {
   $this->Test->save(...); <=== My question is here,
where did Test come from,
 }

}

Hope I have made my question a little bit clearer. Test was never a
variable of my Controller, then how
can I access "Test".

Thanks for bearing with me :-).


On Apr 25, 2:10 pm, rtconner <[EMAIL PROTECTED]> wrote:
> I think get_class() might be what you are looking for
> php.net/get_class.
>
> On Apr 25, 1:47 pm, cooked <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am new to cakePHP and i have things working pretty much, but one
> > questions keeps bugging me. How does this work when I do this in the
> > Controller
> > $this->[MyModel]->func();
> > Which variable in the controller stores the name of the Model. I have
> > a lot of experience in C++/Java and I haven't seen anything like
> > this.
> > Is there some magic (like __call) happening in PHP which I don't know
> > about.
>
> > Thanks in advance.- Hide quoted text -
>
> - Show quoted text -


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



PHP question

2007-04-25 Thread cooked

I am new to cakePHP and i have things working pretty much, but one
questions keeps bugging me. How does this work when I do this in the
Controller
$this->[MyModel]->func();
Which variable in the controller stores the name of the Model. I have
a lot of experience in C++/Java and I haven't seen anything like
this.
Is there some magic (like __call) happening in PHP which I don't know
about.

Thanks in advance.


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