web 2.0 concepts

2007-12-23 Thread venki

Hi,

What is web 2.0 ?What is the use of web 2.0 concepts?
Please tell me some examples and how we will use web 2.0 concepts in
my coding.
Please send me the example web 2.0 websites

Regards,
Venki
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Cake for large websites...Zend?

2007-12-23 Thread blange

Can cake handle very large enterprise websites?  We have a site with
user submitted articles, blogs, and an active forum with tens of
thousands of users. Some of the developers are skeptical that cake can
handle the load.

Would zend be a better choice for a large site. If so, why?

Thanks in advance,

Brian
--~--~-~--~~~---~--~~
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: Confused with associations, hasOne and belongsTo?

2007-12-23 Thread Adam Royle

It depends on the actual tables you create - ie. are you going to
create a favourite_stores table with additional fields, or will it
just be a join table?

Also, keep in mind you can have more than relationship defined between
the same models...

eg. I would create two join tables:

consumers_favouritestores (id, consumer_id, store_id)
consumers_stores (id, consumer_id, store_id)



And then create the associations via the Consumer model.

var $hasAndBelongsToMany = array(
'FavouriteStores' => array('className' => 'Store',

'joinTable' => 
'consumers_favouritestores',

'foreignKey' => 'consumer_id',

'associationForeignKey' => 
'store_id'),
'FrequentedStores' => array('className' => 'Store',

'joinTable' => 
'consumers_stores',

'foreignKey' => 'consumer_id',

'associationForeignKey' => 
'store_id'),
);


In regards to setting up two-way associations, that is entirely up to
your application and how you will be accessing/saving your data. I
recommend starting simple and adding the associations as you find you
need them.

Cheers,
Adam

On Dec 24, 11:55 am, stonez <[EMAIL PROTECTED]> wrote:
> Let's say, I have three models named "stores", "consumers",
> "favorite_stores"
>
> What's the correct association I should declear?
>
> Here's the defination I made:
> - store hasAndBelongsToMany consumers.
> - consumers hasAndBelongsToMany stores.
> - consuemr hasMany favorite_stores.
> - sotre belongsTo favorites_stores.
>
> Are these needed?
> - favorites_stores belongsTo stores.
> - favorites_stores belongsTo consumers.
>
> Stonez
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Confused with associations, hasOne and belongsTo?

2007-12-23 Thread stonez

Let's say, I have three models named "stores", "consumers",
"favorite_stores"

What's the correct association I should declear?

Here's the defination I made:
- store hasAndBelongsToMany consumers.
- consumers hasAndBelongsToMany stores.
- consuemr hasMany favorite_stores.
- sotre belongsTo favorites_stores.

Are these needed?
- favorites_stores belongsTo stores.
- favorites_stores belongsTo consumers.

Stonez

--~--~-~--~~~---~--~~
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: Using Model in a Component

2007-12-23 Thread [EMAIL PROTECTED]

Ok, I guess placing the code in AppController is the best solution.

--~--~-~--~~~---~--~~
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: Creating a "Site down" error page?

2007-12-23 Thread Rich Vázquez


On Sun, 2007-12-23 at 16:14 -0800, squidliberty wrote:
> Yep, adding a redirect to AppController was my inclination as well.
> However, the tricky part is testing for a database connection. Anyone
> have any idea how best to do this? Seems like it shouldn't be very
> difficult - I just don't have a grasp on the esoteric inner-workings
> of the framework. Thanks!
> 


Remember the original cake install has this - the first thing it does is
look for the database configuration and connectivity.

The logic is in:
/cake_1.1.18.5850/cake/scripts/templates/views/home.thtml

--
Rich Vázquez





--~--~-~--~~~---~--~~
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: Real world authorization and authentication using Auth and ACL

2007-12-23 Thread kiang

Maybe you could have a look at this topic:
http://www.cakephpforum.net/index.php?showtopic=27

---
kiang

On 12月23日, 下午7時51分, WarGoth <[EMAIL PROTECTED]> wrote:
> Sorry for my english. I'll try to be short.
> I'm talking about CakePHP 1.2, native Auth and ACL (for DB).
> I've searched the group and many other articles but did not find any
> suitable implementation for real world usage. I want to implement the
> following task:
> 1) authorization via native component Auth - Auth::login, Auth::logout
> etc;
> 2) authentication via ACL with the following linear ARO structure:
> - Group1
> - Group2
> - Group3
> - User1
> - User2
> i.e user can be attached to any group: hasOne group and HABTM group.
> Any relations should be implemented without ACL allowing us change
> relations quickly. So when I want to read permitions for a user, first
> ACL should ask permitions for groups and then for the user, but user's
> ARO haven't to be set.
> 3) ACO's structure:
> - controller1
>   - action1
>   - action2
>   - action3 ($params)
> - param1
> - param2
> ...
> i.e. it should check ACL against tree of ACOs. $params - may be a post
> ID or page ID.
> I think this kind of ACL authentication is the most universal and
> practical. It doesn't require to clone permitions for each user or
> similar actions.
> Did anyone implement this kind of functionality? If not, I'll try
> implement it myself. Any suggestions?
>
> Thanks.
--~--~-~--~~~---~--~~
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: Creating a "Site down" error page?

2007-12-23 Thread squidliberty

Yep, adding a redirect to AppController was my inclination as well.
However, the tricky part is testing for a database connection. Anyone
have any idea how best to do this? Seems like it shouldn't be very
difficult - I just don't have a grasp on the esoteric inner-workings
of the framework. Thanks!



On Dec 17, 12:29 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> It may not be the best place but I would probably put that check in my
> AppController, in the constructor or a before filter. THat way you
> have access to all of Cake and can check the connection. I don't know
> the best way to do this either but two possibilities would be either
> something like loadInfo() in a model or directly calling
> ConnectionManager::getDataSource(). You could probably make use of
> ConnectionManager from bootstrap too.
>
> I'd love to hear some other ideas that may be better suited.
>
> (my vauge answers can in part be attributed to not having any cake-app
> in front of me at the moment)
>
> On Dec 17, 6:12 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
>
> > > It's called 'write code that actually checks for errors'.  This is an
> > > issue for any application, and I cannot think of any framework that
> > > automatically gives you that kind of functionality.  What you call
> > > 'automatic' is the result of a forward-thinking developer who made a
> > > commitment to proper error handling.
>
> > Yup, true. But, how *would* you configure cake to redirect to a site
> > down page if the database connection failed?
>
> > Some code in bootstrap.php that checks for a connection and then
> > redirect to pages/site_down for example?
>
> > On Dec 17, 3:41 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > > On Dec 17, 2007 10:28 AM, squidliberty <[EMAIL PROTECTED]> wrote:
>
> > > > I have on occasion had problems with my hosting during which MySQL is
> > > > not accessible. The result is that CakePHP renders a malformed page
> > > > and (if Debug is in use) throws a number of errors (such as "Too many
> > > > connections"). In this sort of situation, some CMS (eg. Joomla!) will
> > > > automatically throw up a "This site is down" page. Can anyone tell me
> > > > how this might be done with CakePHP? I assume that there is some way
> > > > to check for a proper database connection and generate an error
> > > > message if one cannot be established. Any advice appreciated!
>
> > > It's called 'write code that actually checks for errors'.  This is an
> > > issue for any application, and I cannot think of any framework that
> > > automatically gives you that kind of functionality.  What you call
> > > 'automatic' is the result of a forward-thinking developer who made a
> > > commitment to proper error handling.
>
> > > --
> > > Chris Hartjes
>
> > > My motto for 2007:  "Just build it, damnit!"
>
> > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
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: Trying to use PHPMailer

2007-12-23 Thread subtropolis zijn
On Dec 23, 2007 3:45 AM, skoggins <[EMAIL PROTECTED]> wrote:

>
> Hi All,
>
> I am trying to use PHPMailer according to the tutorial here:
>
> http://bakery.cakephp.org/articles/view/phpmailer-with-native-api-for-php-5-x
> but keep getting errors.
>
> The error I get on my local machine is:
>  "There was a problem sending mail: Language string failed to load:
> instantiate"
>
> On my shared host:
> "Fatal error: Cannot instantiate non-existent class: phpmailer in /
> home/.zingaro/cn/cn-dev.com/app/controllers/components/mailer.php on
> line 23"
>
> In my controller I have:
>
> var $components = array('Cookie', 'Mailer');
> function testmailer(){
>// Set up mail
>$this->Mailer->init();
>$this->Mailer->AddAddress('[EMAIL PROTECTED]');
>$this->Mailer->Subject = 'My Subject';
>// Set PHPMailer vars and call PHPMailer methods (see PHPMailer
> API for more info)
>
>// Set mail body
>ob_start();
>$this->render('you_have_a_connectnote', 'default');
>$this->Mailer->Body = ob_get_clean();
>
>
What happens without using an output buffer here?

--~--~-~--~~~---~--~~
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: Using Model in a Component

2007-12-23 Thread subtropolis zijn
On Dec 23, 2007 4:17 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> I have a lot of queries, that must be executed in every controller's
> every action. So I think the best thing to automate it is placing
> these queries in one component.
>

Maybe this would be best in AppController (and cached).

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



Using Model in a Component

2007-12-23 Thread [EMAIL PROTECTED]

I have a lot of queries, that must be executed in every controller's
every action. So I think the best thing to automate it is placing
these queries in one component.
The code looks like this:

class MenuComponent extends Object
{
var $categories = true;
var $controller = true;

function startup(&$controller)
{
   $controller->Categories->findAll();
   $controller->SubCategories->findAll();
   ... //do all other database stuff
}

}

And in a Controller simply write this: var $components = array('Menu')
instead of all these queries in every action. But the cakephp's manual
says, that it is not a good idea to access model from components. So
what should I do?

--~--~-~--~~~---~--~~
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: element: model or controller?

2007-12-23 Thread subtropolis zijn
On Dec 23, 2007 8:53 AM, Christophe Cholot <[EMAIL PROTECTED]>
wrote:

>
> Hello,
>
> Assuming you have a newsletter Controller and a newsletter Model :
> in NewsletterController (newsletter_controller.php) :
>
> class NewsletterController extends AppController {
>var name = 'Newsletter';
>
>   function archive_list(){
>   $this->set('archives', $this->Newsletter->find('all',
> array("Newsletter.publish_date" => "< NOW()"))
>   }
> }
> In your archive list view (archive_list.ctp), you'll be able to
> iterable over your archives through $archives.
>
> or .. in your controller above, (assuming its not the
> NewsletterController) just do :
>
>  var uses = array('Newsletter');
>
> function archive_list(){
>$this->set('archives', $this->Newsletter->getArchives());
> }
>
> in the Newsletter model, create a method for your archive list :
>
> function getArchives(){
>$sql = 'SELECT id, to_char(publish_date, \'Mon, \') AS
> month FROM newsletter '  . 'WHERE publish_date < NOW() ORDER BY
> publish_date DESC';
>return $this->query($sql);
> }
>

Thanks for your reply. I'd actually gotten it working but couldn't reply
because new posters are moderated.

Here's what i did:

// newsletters_controller.php
function archive_list()
{
$sql = 'SELECT id, to_char(publish_date, \'-MM\') AS month FROM
newsletters '
. 'WHERE publish_date < NOW() ORDER BY publish_date DESC';

return $this->Newsletter->query($sql);
}

// view.ctp

$this->renderElement('newsletter_archive_list')

// views/elements/newsletter_archive_list.ctp

$archive_list = $this->requestAction('newsletters/archive_list');

while (list ($id, $issue) = each($archive_list))
{
...


This works but it seems to me that the query should be in the model. Using
your example above, i changed things to:

// newsletters_controller.php

function get_archive_list()
{
$this->set('archive_list', $this->Newsletter->getArchives());
}


// views/elements/newsletter_archive_list.ctp

$this->requestAction('newsletters/get_archive_list');

which results in:
Variable passed to each() is not an array or object

because $archive_list is null. If i change it to $this->archive_list i get
an error stating that the view does not contain this variable. Since it was
set in the controller, it seems i have to refer to that in the element.
However, i'm at a loss here--how do i refer to the controller from the
element (which is a part of the view)?

It still seems a bit odd to me that the $archive_list var is being set in
the controller, rather than the model, though the DB query is in the model.
So i tried doing this in the controller:

$this->Newsletter->set('archive_list', $this->Newsletter->getArchives());

and this in the element:

while (list ($id, $issue) = each($this->Newsletter->archive_list))

So, unless i can figure out how to set the var somewhere (and how to
retrieve it) it seems that my only other optioin is to go back to just
returning it from the method.

My head is spinning!


>
> .. or simply correct the typo $this->Newsletter instead of $this-
> >newsletter.
>
>

Yes, that was only a typo in the mail.

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



looking for cakephp developer to tutor

2007-12-23 Thread conankun

Hi,

I'm looking for a seasoned cakephp 1.2 developer to give me private
tutoring on cakephp (from beginning). Preferably live in melbourne, so
that the teaching can be direct and on the spot.
Let me know if you require incentives and how much would you charge.

Cheers.

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



converting loadModel to App::import

2007-12-23 Thread conankun

Hi, does anyone know how to convert loadModel() to App::import
properly?

I have something like this (this works):

class MenuComponent extends Object
{
function getMenu(&$controller)
{
loadModel('Menu');
blah... blah...
}
}

then I try to change to App::import since loadModel has been
deprecated:

class MenuComponent extends Object
{
function getMenu(&$controller)
{
App::import('Model', 'Menu');
blah... blah...
}
}

I got the following error:
Fatal error: Class 'App' not found in 

--~--~-~--~~~---~--~~
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: element: model or controller?

2007-12-23 Thread Christophe Cholot

Hello,

Assuming you have a newsletter Controller and a newsletter Model :
in NewsletterController (newsletter_controller.php) :

class NewsletterController extends AppController {
var name = 'Newsletter';

   function archive_list(){
   $this->set('archives', $this->Newsletter->find('all',
array("Newsletter.publish_date" => "< NOW()"))
   }
}
In your archive list view (archive_list.ctp), you'll be able to
iterable over your archives through $archives.

or .. in your controller above, (assuming its not the
NewsletterController) just do :

 var uses = array('Newsletter');

function archive_list(){
$this->set('archives', $this->Newsletter->getArchives());
}

in the Newsletter model, create a method for your archive list :

function getArchives(){
$sql = 'SELECT id, to_char(publish_date, \'Mon, \') AS
month FROM newsletter '  . 'WHERE publish_date < NOW() ORDER BY
publish_date DESC';
return $this->query($sql);
}

.. or simply correct the typo $this->Newsletter instead of $this-
>newsletter.


On Dec 23, 4:09 am, subtropolis <[EMAIL PROTECTED]> wrote:
> I'm a n00b here and have been redoing an existing site in order to
> learn the Cake way. I'm jumping straight into the 1.2 branch.This is
> my first cry for help.
>
> I have a section for an online newsletter. Several pages list links
> for the archived issues. From what i've read, i should use an element
> for this. I've created the file newsletter_archive_list.ctp in the
> elements dir with the following:
>
> $archive_list = $this->requestAction('newsletter/archive_list');
>
> // followed by markup to list the links
>
> The controller's archive_list method is simply:
>
> function archive_list()
> {
> $sql = 'SELECT id, to_char(publish_date, \'Mon, \') AS
> month FROM newsletter '
> . 'WHERE publish_date < NOW() ORDER BY publish_date DESC';
>
> return $this->newsletter->query($sql);
> }
>
> The thing is, as i understand it, it's better to place as much code in
> the model, rather than the controller (which seems quite sensible).
> However, i haven't been able to figure out how to then call the
> function from the model.
>
> With the method in the controller, i get this error:
>
> Undefined property:  NewsletterController::$newsletter [APP/
> controllers/newsletter_controller.php, line 25]
>
> My head is spinning. The manuals are really not very clear on this. I
> understood that the model ($newsletter) was available anywhere inside
> the controller. Can someone please point me in the right direction?
>
> (extra points for explaining how the new cache system, would work
> here :-)

--~--~-~--~~~---~--~~
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: RequestAction + Plugin = Apache Crash

2007-12-23 Thread Matti Putkonen



On 22 joulu, 16:20, Martin Wood-Mitrovski
<[EMAIL PROTECTED]> wrote:
> thats the first thing i checked. i dont have it installed or enabled.
>
> subtropolis zijn wrote:
> > I just came across a couple of posts in the archive (search the archive for
> > "apache crash") last night discussing similar problems. Do either of you use
> > the Zend optimizer? Disabling this seems to have fixed the problem for some
> > people.


I also have an similar problem with  RequestAction + Plugin. However I
do not get apache error, but an "class not found" error anytime my
main app layout (has elements that use requestaction) is used by
plugin.

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



Real world authorization and authentication using Auth and ACL

2007-12-23 Thread WarGoth

Sorry for my english. I'll try to be short.
I'm talking about CakePHP 1.2, native Auth and ACL (for DB).
I've searched the group and many other articles but did not find any
suitable implementation for real world usage. I want to implement the
following task:
1) authorization via native component Auth - Auth::login, Auth::logout
etc;
2) authentication via ACL with the following linear ARO structure:
- Group1
- Group2
- Group3
- User1
- User2
i.e user can be attached to any group: hasOne group and HABTM group.
Any relations should be implemented without ACL allowing us change
relations quickly. So when I want to read permitions for a user, first
ACL should ask permitions for groups and then for the user, but user's
ARO haven't to be set.
3) ACO's structure:
- controller1
  - action1
  - action2
  - action3 ($params)
- param1
- param2
...
i.e. it should check ACL against tree of ACOs. $params - may be a post
ID or page ID.
I think this kind of ACL authentication is the most universal and
practical. It doesn't require to clone permitions for each user or
similar actions.
Did anyone implement this kind of functionality? If not, I'll try
implement it myself. Any suggestions?

Thanks.

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



element: model or controller?

2007-12-23 Thread subtropolis

I'm a n00b here and have been redoing an existing site in order to
learn the Cake way. I'm jumping straight into the 1.2 branch.This is
my first cry for help.

I have a section for an online newsletter. Several pages list links
for the archived issues. From what i've read, i should use an element
for this. I've created the file newsletter_archive_list.ctp in the
elements dir with the following:

$archive_list = $this->requestAction('newsletter/archive_list');

// followed by markup to list the links


The controller's archive_list method is simply:

function archive_list()
{
$sql = 'SELECT id, to_char(publish_date, \'Mon, \') AS
month FROM newsletter '
. 'WHERE publish_date < NOW() ORDER BY publish_date DESC';

return $this->newsletter->query($sql);
}


The thing is, as i understand it, it's better to place as much code in
the model, rather than the controller (which seems quite sensible).
However, i haven't been able to figure out how to then call the
function from the model.

With the method in the controller, i get this error:

Undefined property:  NewsletterController::$newsletter [APP/
controllers/newsletter_controller.php, line 25]

My head is spinning. The manuals are really not very clear on this. I
understood that the model ($newsletter) was available anywhere inside
the controller. Can someone please point me in the right direction?

(extra points for explaining how the new cache system, would work
here :-)





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



Trying to use PHPMailer

2007-12-23 Thread skoggins

Hi All,

I am trying to use PHPMailer according to the tutorial here:
http://bakery.cakephp.org/articles/view/phpmailer-with-native-api-for-php-5-x
but keep getting errors.

The error I get on my local machine is:
 "There was a problem sending mail: Language string failed to load:
instantiate"

On my shared host:
"Fatal error: Cannot instantiate non-existent class: phpmailer in /
home/.zingaro/cn/cn-dev.com/app/controllers/components/mailer.php on
line 23"

In my controller I have:

var $components = array('Cookie', 'Mailer');
function testmailer(){
// Set up mail
$this->Mailer->init();
$this->Mailer->AddAddress('[EMAIL PROTECTED]');
$this->Mailer->Subject = 'My Subject';
// Set PHPMailer vars and call PHPMailer methods (see PHPMailer
API for more info)

// Set mail body
ob_start();
$this->render('you_have_a_connectnote', 'default');
$this->Mailer->Body = ob_get_clean();

// Send mail
if ($this->Mailer->send()) {
echo 'Mail was sent successfully.';
 } else {
echo 'There was a problem sending mail: '.$this->Mailer-
>ErrorInfo;
}
}

in mailer.php on line 21-23 I have:
 // Include the class file and create PHPMailer instance
vendor('phpmailer/class.phpmailer');
$this->m = new PHPMailer;

and the phpmailer folder is in the vendors folder.

Anyone have any ideas on what might be going on?

Thanks!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---