RE: site down?

2008-09-26 Thread Christian Winther
Not down here

 

From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of .
Sent: 26. september 2008 10:41
To: Cake PHP
Subject: site down?

 

is it just me or is the cakephp.org (as well as dreamhost.com and other sites) 
down right now




--~--~-~--~~~---~--~~
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: Bake and MySQL problems

2008-08-18 Thread Christian Winther

Or do this in CLI:

"php -m"  to get a list of loaded modules 
and
"php --ini" to get a list of ini files loaded by CLI 

Those two should point you in the right direction

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marcin 
Domanski
Sent: 18. august 2008 23:21
To: cake-php@googlegroups.com
Subject: Re: Bake and MySQL problems


Hey,
probably (99%) you PHP CLI doesnt have mysql extension loaded .  find
the php.ini responisble for cli and uncomment the mysql extension
lines.
--
Marcin Domanski
http://kabturek.info



On Mon, Aug 18, 2008 at 3:51 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I am going through David Golding's new book "Beginning CakePHP" and
> have found it extremely helpful up until the Bake section.
>
> I have built a scaffolded blog, so I know that my DB connections are
> correct.  And the paths to my app are correct in Terminal.  However,
> when I go to bake my controller, I receive this messages from
> Terminal:
>
>
> Warning: mysql_connect(): Can't connect to local MySQL server through
> socket '/var/mysql/mysql.sock' (2) in /Users/iZach/Sites/dev/blog/cake/
> libs/model/datasources/dbo/dbo_mysql.php on line 117
>
> Warning: mysql_select_db(): supplied argument is not a valid MySQL-
> Link resource in /Users/iZach/Sites/dev/blog/cake/libs/model/
> datasources/dbo/dbo_mysql.php on line 122
>
> Warning: mysql_get_server_info(): supplied argument is not a valid
> MySQL-Link resource in /Users/iZach/Sites/dev/blog/cake/libs/model/
> datasources/dbo/dbo_mysql.php on line 130
>
> Warning: mysql_query(): supplied argument is not a valid MySQL-Link
> resource in /Users/iZach/Sites/dev/blog/cake/libs/model/datasources/
> dbo/dbo_mysql.php on line 152
> Error: Your database does not have any tables.
>
>
>
>
> But my database is connected and does have tables!
>
> I am using RC 1.2.x.x_17.08.2008
>
>
>
>
> Thanks so much.
>
> >
>



--~--~-~--~~~---~--~~
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: Loading a component with App::import() doesn't work

2008-07-25 Thread Christian Winther

App::import !== ClassRegistry::init

App::import only loads the class, you need to initialize it by hand

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andreas 
Hofmann
Sent: 25. juli 2008 09:54
To: CakePHP
Subject: Loading a component with App::import() doesn't work


Hi all!

I'm using cake 1.2.0.7296 RC2 and was now rewriting my code.
When I try to import a component aith App::import, it seems not be
loaded/started up:

public function __construct()
{
  parent::__construct();
  App::import('component', 'Auth');
}

Results in:
"Undefined property: GameController::$Auth"

Even loading it directly in the action method or globally in the App-
Controller doesn't work.
Do you know this problem?

Greetings,

Andreas!



--~--~-~--~~~---~--~~
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: parseExtensions on Lighttpd

2008-07-10 Thread Christian Winther

Do you use mod_magnet + cleanurl-v6.lua to rewrite on lighttpd?

If not save http://bin.cakephp.org/view/181101 in a file and add 

"mod_magnet"  to your server.modules list in lighttpd.conf

And add

magnet.attract-physical-path-to = ( "%s" )   to your vhost / lighttpd.conf  
where %s is the full path to the lua script

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
flashlight
Sent: 11. juli 2008 00:18
To: CakePHP
Subject: parseExtensions on Lighttpd


Somebody knows how to add support to extensions on lighttpd, maybe its
the rewrite rule, but everytime i try to parse any extension like
a .js or .rss i get a 404.

Thank you



--~--~-~--~~~---~--~~
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: Database save status issue

2008-06-30 Thread Christian Winther
save should return array in 1.2  - are you on 1.1?

 

From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nirav 
Mehta
Sent: 30. juni 2008 22:38
To: cake-php@googlegroups.com
Subject: Database save status issue

 

Hi,

I seem to have a problem with handling errors on saving to the database. I am 
using PostGre. 

When I try to save some data that is incorrect, the Model->save method returns 
true, indicating that the method was successful, but PHP exists with errors 
from the database pg_query() method. So is CakePHP not reflecting the status of 
the query execution correctly, or am I doing something wrong?

-- Nirav


--~--~-~--~~~---~--~~
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: Paginator links are not being constructed according to route.php

2008-06-29 Thread Christian Winther

/my-custom-route/*  perhaps?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jaime
Sent: 29. juni 2008 21:23
To: CakePHP
Subject: Paginator links are not being constructed according to route.php


Hi all,

It seems that Paginator helper is not correctly constructing the
links. Doing this:

$paginator->options(array(
  'url' => array(
'controller' => 'posts',
'action' => 'index',
)));

Results into a nice /posts/view/page:1 link, as expected. Now assume a
route like this is assigned:

Router::connect('/my-custom-route', array('controller' => 'posts',
'action' => 'index'));

The previosly set pagination options should render something like /my-
custom-route/page:1, but it isn't.

I mean, it seems that Paginator is not constructing links according to
what is set in route.php

This is inconsistent with many other Cake functions, like, for
example, html::link().

Has anybody else noticed this?


--~--~-~--~~~---~--~~
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: ACL inherit access not working

2008-06-14 Thread Christian Winther

RC1 / SVN HEAD of cake1.2 - and what dbo type?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of elGEoRgE
Sent: 15. juni 2008 01:11
To: CakePHP
Subject: ACL inherit access not working


I have 2 tables: users and groups. So I setup my aco/aro configuration
accordingly.
The problem is that when I setup the parent permission, the check for
child permissions wont work:
I created the schema from scratch:
---
cd 1.2.x.x_14.06.2008/cake/console
$ ./cake schema run create DbAcl
$ ./cake acl create aco / ROOT
New Aco 'ROOT' created.
$ ./cake acl create aco ROOT Users
New Aco 'Users' created.
$ ./cake acl create aro / Group.1
New Aro 'Group.1' created.
$ ./cake acl create aro Group.1 User.2
New Aro 'User.2' created.
$ ./cake acl grant User.2 Users all
Permission granted.
$ ./cake acl check User.2 Users all
Array is allowed.
$ ./cake acl check User.2 Users/access all
Array is not allowed.
-
so I also ran the tests:

http://localhost/test.php?group=acl

And it fails:
3/3 test cases complete: 116 passes, 30 fails and 164 exceptions.

I would like to know if anybody has had the same problem or if anybody
found a solution to this.



--~--~-~--~~~---~--~~
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: How strong is Security::cipher() ?

2008-06-14 Thread Christian Winther

I don’t recall blowfish ever being secure ;)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
seedifferently
Sent: 14. juni 2008 23:13
To: CakePHP
Subject: How strong is Security::cipher() ?


Dear group,

I'm writing an app in CakePHP and need to encrypt highly sensitive
information in one part of the app. I know that no encryption plan is
absolutely bulletproof, but I've used PHP's mcrypt function in the
past with satisfactory results.

In CakePHP I noticed the cipher() function as part of the Security
class. At first glance however, I wasn't able to discern what type of
encryption scheme is being used.

My question is this: How does CakePHP's cipher() function stack up
against something like mcrypt()? Is it of a similar level of security?
Can I sleep safely at night knowing that cipher() is going to be as
strong as, say, MCRYPT_BLOWFISH?

Thank you,
Seth


--~--~-~--~~~---~--~~
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: help transferring host

2008-06-13 Thread Christian Winther

Check if your htaccess / mod_rewrite works :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of r()d
Sent: 13. juni 2008 20:00
To: CakePHP
Subject: help transferring host


Guys,

I need a little guide on how to moves from one host to another. I am
moving a pretty sophisticated site from one host to the other and I
know how to move part and successfully have more parts but others
things are broken.  I have set up a test server on my home pc(free bsd-
server with php and myslq)so try the move before going go another
host.
Here is the hierarchy of the site at the current host.
www
  VERSION.txt
  app
  cake
  default_images
  error_docs
  index.html
  index.php
  vendors

Here is what i did. So far.
1)The current site has use a mysql db to keep listing of small
business. So i did an export on that db. Created the db,username and
password and database found in /app/config/database.php. Populated the
new db, with the export everything worked fine.
2)I copied all the www directory from current host and moved all its
contents to my test server.
3)changed the DocumentRoot of http.conf to point to app/webroot/ .

When I view the site in my test server which is located at 21.21.21.31
in my local server. The first page shows up perfectly, just like in
the current host. But all the other pages,links don't work. Just the
landing page. I just get an 404 error; ' The requested URL /listings/
exterior was not found on this server.'. I am assuming something is
wrong with my paths, but don't know where to start.  Is there a guide
out there that can help me transfer successfully?Any idead where I can
trouble shoot this. I have basic understanding and knowledge of PHP,
Apache web server and mysql.

Any help on this would be greatly appreciated.

Thanks,
Rod



--~--~-~--~~~---~--~~
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: Accessing views from Cake - problem with array nesting

2008-05-10 Thread Christian Winther

Just make sure to alias the fields in your SELECT like cake DBO normally does

SELECT Model.id AS "Model.id"   I think - 

Configure::write('debug', 2);

And check how cake does it :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim W
Sent: 10. maj 2008 16:03
To: CakePHP
Subject: Accessing views from Cake - problem with array nesting


Hi all,

I've just spent a hour or so tracking down an issue before realising
it was caused by pointing cake at a view instead of a database table.
In general views work with Cake, but in some seemingly random cases
they fail.

The problem i've run into was identified and a patch suggested in this
conversation (subject "ake FindAll mysql view occured errors" if the
link doesn't work)

http://groups.google.com/group/cake-php/browse_thread/thread/e747844d9d583bc6/e1e4e6811711f656?lnk=gst&q=findall+mysql+view+join#e1e4e6811711f656

Is there any more recent information or workarounds? I don't like to
change the cake core as it makes upgrading more difficult - i'm on
version 1.2.0.6311 beta.

Thanks

Tim


--~--~-~--~~~---~--~~
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: Problem with widget in opera

2008-05-10 Thread Christian Winther

Do you send the text/javascript header?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lekshmi
Sent: 10. maj 2008 15:41
To: cake-php@googlegroups.com
Subject: Problem with widget in opera



Hi 

when i try this code as in php file  include it as http://192.168.0.182:8090/check.php";>  
it is working .But include it as cakeurl like http://192.168.0.182/widgets/test";> ,it is not working in
opera but it is working in all other browsers like SAFARI,IE,FF perfectly
two source files are same 

Please help me to find a solution for this problem... 
Its very urgent... 
please help me... 
please

Thanks, 
Lekshmi...
-- 
View this message in context: 
http://www.nabble.com/Problem-with-widget-in-opera-tp17163022p17163022.html
Sent from the CakePHP mailing list archive at Nabble.com.




--~--~-~--~~~---~--~~
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: How to manage different site instances...

2008-04-03 Thread Christian Winther

Could probably be solved with a behavior in cakephp 1.2 :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John R
Sent: 3. april 2008 21:26
To: Cake PHP
Subject: Re: How to manage different site instances...


Note: The ugly/obvious way to do this would be to put a switch inside
every function in contests_controller that checks the stage and then
either redirects if it's not that stage or w/e. I am hoping for a more
glamorous option! :)



On Apr 3, 2:15 pm, John R <[EMAIL PROTECTED]> wrote:
> My application is a series of "contests" with different stages
> (submission, voting, awards, etc.)
>
> For each stage, the site is going to function completely differently.
> During Stage 1 (submission) for instance, you will be able to upload,
> critique, etc. The front page will be a huge list of all submissions,
> etc. During Stage 2 (voting), you will not be able to upload, only
> vote on submissions from Stage 1. etc.etc.etc.etc.
>
> I am having a hard time coming up with a good method for this. The
> current stage is stored in the Contests table of the database.
> Ideally, I would like to basically have a different controller for
> each stage - so it would have it's own functions, views, etc. - but at
> the end of the day - its just a part of the contests_controller. I
> also thought of running a check for the current stage in
> beforeRender() of the contests_controller and then redirecting or
> pointing somewhere else, but I just dont know! Any feedback would be
> great!


--~--~-~--~~~---~--~~
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: Model find() to return object; instead of array (?)

2008-04-03 Thread Christian Winther

Yeah, I'm using that technique now, but before I cakeified it - the other 
solution worked rather well too - just the prove the point that its probably a 
local issue on his setup rather than a limit on cakephp / php


-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris 
Hartjes
Sent: 3. april 2008 20:20
To: cake-php@googlegroups.com
Subject: Re: Model find() to return object; instead of array (?)


On Thu, Apr 3, 2008 at 2:12 PM, Christian Winther <[EMAIL PROTECTED]> wrote:
>
>  I use cake way for documents and sql data way above 100 megabytes in size

I was thinking that unless those records are really small, calling in
60 records via a select is going to be really difficult to do
without either running out of memory or execution time.  I'd do it in
chunks if it were me.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@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: Model find() to return object; instead of array (?)

2008-04-03 Thread Christian Winther

I use cake way for documents and sql data way above 100 megabytes in size 

My guess would be your setup is wrongly configured - rather than pointing to 
php or cake as the problem.

If you really need the resource, just do the mysql_select()  and everything 
yourself, it will use your default mysql connection - and should work out of 
the box aswell.



-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R. 
Rajesh Jeba Anbiah
Sent: 3. april 2008 19:14
To: Cake PHP
Subject: Re: Model find() to return object; instead of array (?)


On Apr 3, 6:51 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 3, 2008 at 9:46 AM, R. Rajesh Jeba Anbiah
>
> <[EMAIL PROTECTED]> wrote:
>
> >  On Apr 3, 5:58 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> >  > Why on earth would you do that?
> >
>
> >Read the thread above.. the array dumping doesn't work for all the
> >  cases--especially on exporting the data.
>
> If you insist on fighting against Cake's conventions, or insist on not
> adjusting your application to the realities of Cake's conventions, you
> are facing an uphill battle.
>
> Maybe I'm stupid, but please enlighten me on how having Cake return
> result sets as an object instead of an array set will help you.  I am
> not understanding how the objects will take up less memory than an
> array when you have 600,000+ records.

 Like I mentioned above in *this* thread, I wrongly used the term
"object"--but I actually meant "resource".

 Cake's default way of dumping array in controller and iterating
in view file, works only for the small data. But, on a typical project
that requires "exporting of data", it doesn't work as it runs out of
memory. This needs fetching the record one-by-one like I mentioned
above.

 BTW, whenever you reply here with your remarks, I thought of
asking "do you really use CakePHP?" SCNR

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
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: Model find() to return object; instead of array (?)

2008-04-03 Thread Christian Winther

It would kill all the cakephp filters and magic at best

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R. 
Rajesh Jeba Anbiah
Sent: 3. april 2008 14:49
To: Cake PHP
Subject: Re: Model find() to return object; instead of array (?)


On Apr 3, 11:51 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> I'm not sure of any method - but why do you think that all your rows
> as arrays will use up more memory than the same amount of data wrapped
> in objects?  Is it just a pass by reference vs pass by copy issue?
   

   I'm sorry, I goofed it up with the term "object"; I actually meant
"resource". Cake is currently dealing like this:


I want something like:



--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
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: Model find() to return object; instead of array (?)

2008-04-03 Thread Christian Winther

Why on earth would you do that?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R. 
Rajesh Jeba Anbiah
Sent: 3. april 2008 14:49
To: Cake PHP
Subject: Re: Model find() to return object; instead of array (?)


On Apr 3, 11:51 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> I'm not sure of any method - but why do you think that all your rows
> as arrays will use up more memory than the same amount of data wrapped
> in objects?  Is it just a pass by reference vs pass by copy issue?
   

   I'm sorry, I goofed it up with the term "object"; I actually meant
"resource". Cake is currently dealing like this:


I want something like:



--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
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: How to make "bindable" behavior work in PHP4

2008-03-04 Thread Christian Winther

What problems to you have with Bindable on PHP4?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of keymaster
Sent: 4. marts 2008 20:06
To: Cake PHP
Subject: How to make "bindable" behavior work in PHP4


Has anyone been successful in getting the "Bindable" behavior in the
bakery to work in PHP4?

Did you have to change anything?


--~--~-~--~~~---~--~~
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: Bakery Article Submission - Broken?

2008-03-04 Thread Christian Winther

Drop a ticket on trac. Their servers have had quite a few problems today

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug @ 
Straw Dogs
Sent: 4. marts 2008 20:04
To: Cake PHP
Subject: Bakery Article Submission - Broken?


I'm trying to submit an article/component in the Bakery but its
returning a blank screen on submission.  I'd give more information but
thats as much as there is.  Nothing.

Any ideas?


--~--~-~--~~~---~--~~
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: Multiple instances of components

2008-03-04 Thread Christian Winther

Why would you have the Controller have different instances of the same 
Component?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Danomite
Sent: 4. marts 2008 22:26
To: Cake PHP
Subject: Multiple instances of components


I need a way to have one controller have multiple instances of a
component.  Is there a way to do this?



--~--~-~--~~~---~--~~
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: Form Validation on DB

2008-03-04 Thread Christian Winther

Its in tempdocs.cakephp.org then

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mcphisto
Sent: 4. marts 2008 18:35
To: Cake PHP
Subject: Re: Form Validation on DB


Yes, they're online...
Only a problem: I've a version 1.19 and for this version there's no
documentation: http://book.cakephp.org/it/view/318/data-validation

:-(

On 4 Mar, 17:40, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> They are both online again now :)
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> mcphisto
> Sent: 4. marts 2008 16:45
> To: Cake PHP
> Subject: Re: Form Validation on DB
>
> The problem si that book.cakephp.org and tempdocs.cakephp.org are
> down...
>
> On 4 Mar, 16:26, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> > Use the docs luke ! book.cakephp.org and tempdocs.cakephp.org  - check data 
> > validation
>
> > -Original Message-
> > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> > mcphisto
> > Sent: 4. marts 2008 16:18
> > To: Cake PHP
> > Subject: Form Validation on DB
>
> > Hi, I've a problem in my application. I would exclude the possibility
> > of saving duoble data in my database. For example in this table:
>
> > name, username, password
>
> > I would like there couldn't be 2 users with the same username.
>
> > How can I do it?


--~--~-~--~~~---~--~~
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: view caching problem

2008-03-04 Thread Christian Winther

Hello,
I believe that the code is in the file to make sure that Components ect. are 
run even if the page is cached (Might be useful for auth amongst many things).

https://trac.cakephp.org/ticket/4245 and https://trac.cakephp.org/ticket/2329 
discusses this issue already.


I have made a modified CacheHelper (1.2x) that does not add the php in the top 
if there is no cake:nocache blocks.

http://cakephp.dk/app/webroot/patches/cache.phps



-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Claudia
Sent: 4. marts 2008 18:09
To: Cake PHP
Subject: view caching problem


Hi there

I have a question regarding view caching:
I have a controller foo where I want to cache the result of action
bar.
Therefore I put a line
$this->cacheAction = 3600;
in the action.
The cache file is created fine, but when I fetch a page from the cache
it takes almost as much time as without caching, about 0.2 seconds.
I have confirmed that the file comes from the cache.

When I check the cache file I see that there is a lot of php in there,
starting with
loadController('foo');
loadModels();
$this->controller = new fooController();
$this->controller->plugin = '';
$this->controller->_initComponents();
...

which needs a lot of time to execute. The php is then followed by the
html output of the view.
If I delete the php part of the cache file manually and reload the
webpage, the page is pretty
fast (about 0.02 seconds) and everything works fine until the cache
file is recreated.

Thus my question(s):
What is the purpose the PHP part of the cache file?
In case the PHP part is not really necessary, is there a way to tell
Cake to cache only the output of the view, without adding the PHP
stuff?

I use Cake 1.2.0.5427alpha

Thank you

Claudia



--~--~-~--~~~---~--~~
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: Form Validation on DB

2008-03-04 Thread Christian Winther

They are both online again now :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mcphisto
Sent: 4. marts 2008 16:45
To: Cake PHP
Subject: Re: Form Validation on DB


The problem si that book.cakephp.org and tempdocs.cakephp.org are
down...

On 4 Mar, 16:26, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> Use the docs luke ! book.cakephp.org and tempdocs.cakephp.org  - check data 
> validation
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> mcphisto
> Sent: 4. marts 2008 16:18
> To: Cake PHP
> Subject: Form Validation on DB
>
> Hi, I've a problem in my application. I would exclude the possibility
> of saving duoble data in my database. For example in this table:
>
> name, username, password
>
> I would like there couldn't be 2 users with the same username.
>
> How can I do it?


--~--~-~--~~~---~--~~
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: Inconsistent page load

2008-03-04 Thread Christian Winther

What version of PHP ? And do you use "php_admin_value open_basedir" or other 
fancy settings in your apache config?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike 
Digital Egg
Sent: 4. marts 2008 17:05
To: Cake PHP
Subject: Inconsistent page load


Hi,

I have been trying to debug this for ages but have come up with a
blank.

The problem I am having is that sometimes when I call admin pages in
my app I get a 500 error, I am doing print_r( $this->params ) in the
beforeFilter.

Sometimes it gives me this:

Array ( [pass] => Array ( ) [named] => Array ( ) [tag] => 500.shtml
[plugin] => [controller] => pages [action] => show [form] => Array ( )
[url] => Array ( [url] => 500.shtml ) [bare] => 0 [webservices]
=> )

and other times it loads fine and gives me this:

Array ( [pass] => Array ( ) [named] => Array ( ) [controller] => users
[action] => admin_list [plugin] => [prefix] => admin [admin] => 1
[form] => Array ( ) [url] => Array ( [url] => admin/users/list )
[bare] => 0 [webservices] => )

I am using the admin param to load a new layout for the admin so
sometimes the admin is just not showing.

If I constantly click refresh it comes up with the 500 error about 50%
of the time.

Any ideas what it could be, or any other ideas on debugging it?

Cheers

Mike


--~--~-~--~~~---~--~~
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: Site Construction.. Integrating Views + Footer/Header/Menus etc?

2008-03-04 Thread Christian Winther

Or 
1a)  Use view and cache them (Super fast)
2a)  Use elements and cache them (Faster than rendering a normal view without 
cache)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Johan @ 
Notitia.nl
Sent: 4. marts 2008 17:17
To: Cake PHP
Subject: Re: Site Construction.. Integrating Views + Footer/Header/Menus etc?


Well, there are thousands of ways to render information at your
screen, but here are some 'CakeCorrect' methods:

1) Put all the code at your view (fastest to render, but hard to
maintain)
2) Put all the snippets in elements and print those at your view (way
slower, but easy to edit. also re-usable)
3) Build a Helper which dynamicly generate snippets (somewhat slower,
but if build correct it beats all of the above!)

On Mar 3, 5:31 am, duncan_m <[EMAIL PROTECTED]> wrote:
> OK I've discovered Layouts.. I think this is the missing link I've
> been looking for.
>
> Duncan.


--~--~-~--~~~---~--~~
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: model instance to form helper

2008-03-04 Thread Christian Winther

I'm not sure what you mean, but you COULD do this in the controller:

$this->data['Alias'] = array('domain' => $search['domain'], .);

That will make FormHelper use those variables automagic as if they came from 
the Model :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gbk *
Sent: 4. marts 2008 16:45
To: Cake PHP
Subject: model instance to form helper


hi,

my view contains a list generated by a paginator and a filter form:

create('Alias', array('action'=>'index')); ?>
input('domain', array('value' => $search['domain'],
'options' => array_merge(array("" => "--"), $domains))); ?>
input('sendto', array('value' =>
$search['sendto'])); ?>
end('OK'); ?>

i would like to skip the "'value' =>" option and use instead of an
Alias model instance. my question is how should i make and set this
instance manually in my controller for the form helper?

thank you and sorry for my bad english.



--~--~-~--~~~---~--~~
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: Form Validation on DB

2008-03-04 Thread Christian Winther

Use the docs luke ! book.cakephp.org and tempdocs.cakephp.org  - check data 
validation

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mcphisto
Sent: 4. marts 2008 16:18
To: Cake PHP
Subject: Form Validation on DB


Hi, I've a problem in my application. I would exclude the possibility
of saving duoble data in my database. For example in this table:

name, username, password

I would like there couldn't be 2 users with the same username.

How can I do it?




--~--~-~--~~~---~--~~
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: How to set action to the another controller

2008-01-04 Thread Christian Winther

Use the router make sure both urls hit the same controller action :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of miikka
Sent: 5. januar 2008 02:09
To: Cake PHP
Subject: How to set action to the another controller


Hi,

I have CakePHP app where user can go to the url /my/profile when he/
she is logged in. This would have the same affect than going to the
page /users/profile/[currently_logged_in_username]. How could I render
this as /users/profile/[currently_logged_in_username]. Currently
CakePHP 1.2.x.x has method setAction but is only for inside controller
"redirecting".

Any help, pointers would be appreciated.

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: Problemas con $form->dateTime('birthDate', $dateFormat = 'DMY', $timeFormat = 'NONE',null, null, false);

2008-01-04 Thread Christian Winther

English please

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ballbrk
Sent: 5. januar 2008 03:18
To: Cake PHP
Subject: Problemas con $form->dateTime('birthDate', $dateFormat = 'DMY', 
$timeFormat = 'NONE',null, null, false);


Saludos.
Estoy probando cakephp1.2 y en un formulario  uso lo siguiente para
generar un campo fecha

$form->dateTime('birthDate',  $dateFormat = 'DMY', $timeFormat =
'NONE',null, null, false);

Mi problema es que los meses salen en ingles. Hay alguna posibilidad
que salgan en el idioma de Cervantes?

Saludos
Tolo



--~--~-~--~~~---~--~~
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: saveField generating extra record even after id is set

2008-01-04 Thread Christian Winther

$this->Account->Conectnote->AllowedView->save("date_viewed", $date);
Should be
$this->Account->Conectnote->AllowedView->saveField("date_viewed", $date);

?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of skoggins
Sent: 5. januar 2008 01:24
To: Cake PHP
Subject: saveField generating extra record even after id is set


Hi all,

In my controller I am trying to update a single field in my
allowedviews table.  Not only is the record updating but a new record
is generated which is empty except for 'date_viewed'.  Could someone
check the below code and let me know if they see something wrong?

Thanks!

Accounts Controller:

$this->Account->Note->Sentmessage->AllowedView->recursive = -1;
$conditions = "AllowedView.note_id = '$id' AND AllowedView.user_id =
'$user_id'";
$myallowedview = $this->Account->Note->AllowedView->find($conditions);
$this->Account->Note->AllowedView->id = $myallowedview['AllowedView']
['id'];
$date = date("Y-m-d H:i:s", time()); //need to find current date
$this->Account->Conectnote->AllowedView->save("date_viewed", $date);


--~--~-~--~~~---~--~~
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: Cake 1.2 Console - Fatal Errors - Possible Bug?

2008-01-03 Thread Christian Winther

It looks related to
https://trac.cakephp.org/ticket/3793 and changeset 
https://trac.cakephp.org/changeset/6312 to me

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cake Fan
Sent: 3. januar 2008 22:57
To: Cake PHP
Subject: Re: Cake 1.2 Console - Fatal Errors - Possible Bug?


Christian,

I am at Revision 6319, but the console still says 6311.  I am only
updating the "cake" folder, so I'm not changing the app or vendors
folders at all.  Am I missing something here because the problem still
persists after I updated as you suggested.

Thanks for the help!

- Cake Fan




On Jan 3, 3:32 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> Update to SVN head from 1.2 branch, was fixed there :)
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cake 
> Fan
> Sent: 3. januar 2008 22:20
> To: Cake PHP
> Subject: Cake 1.2 Console - Fatal Errors - Possible Bug?
>
> I have my cake 1.2 shell script working properly in most regards; it
> will help me immensely in converting a large flat table into
> relational data for Cake consumption.
>
> However, in the shell, whenever I try to call any of the Model query
> commands, I get a failure.
>
> So far, it has happened with findCount(), find(), findall(), save(),
> and saveall();  The problem seems to be inconsistent and no matter
> what I try or eliminate, it seems to persist.
>
> My shell script ultra-simplified to this:
> --
> function main() {
>
>$i = 0;
>while ($i < 1000) {
>$formatted_data_array = array (
> 'Business' =>  array ('name' => 'test')
>   );
>$this->Business->save($formatted_data_array, false);
>$i++;
>}
> }
> --
>
> It will save one time successfully, and then errors out.  I get the
> following error message from the console:
>
> ++
> C:\Apache\htdocs\project\app>cake raw_data
>
> Welcome to CakePHP v1.2.0.6311 beta Console
> ---
> App : app
> Path: C:\Apache\htdocs\project\app
> ---
> PHP Fatal error:  Class 'String' not found in C:\Apache\htdocs\project
> \cake\libs\model\datasources\dbo_source
> .php on line 1455
>
> Fatal error: Class 'String' not found in C:\Apache\htdocs\project\cake
> \libs\model\datasources\dbo_source.php
> on line 1455
>
> C:\Apache\htdocs\project\app>
> +
>
> Any help would be greatly appreciated!
>
> - Cake Fan


--~--~-~--~~~---~--~~
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: Cake 1.2 Console - Fatal Errors - Possible Bug?

2008-01-03 Thread Christian Winther

Update to SVN head from 1.2 branch, was fixed there :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cake Fan
Sent: 3. januar 2008 22:20
To: Cake PHP
Subject: Cake 1.2 Console - Fatal Errors - Possible Bug?


I have my cake 1.2 shell script working properly in most regards; it
will help me immensely in converting a large flat table into
relational data for Cake consumption.

However, in the shell, whenever I try to call any of the Model query
commands, I get a failure.

So far, it has happened with findCount(), find(), findall(), save(),
and saveall();  The problem seems to be inconsistent and no matter
what I try or eliminate, it seems to persist.


My shell script ultra-simplified to this:
--
function main() {

   $i = 0;
   while ($i < 1000) {
   $formatted_data_array = array (
'Business' =>  array ('name' => 'test')
  );
   $this->Business->save($formatted_data_array, false);
   $i++;
   }
}
--

It will save one time successfully, and then errors out.  I get the
following error message from the console:

++
C:\Apache\htdocs\project\app>cake raw_data

Welcome to CakePHP v1.2.0.6311 beta Console
---
App : app
Path: C:\Apache\htdocs\project\app
---
PHP Fatal error:  Class 'String' not found in C:\Apache\htdocs\project
\cake\libs\model\datasources\dbo_source
.php on line 1455

Fatal error: Class 'String' not found in C:\Apache\htdocs\project\cake
\libs\model\datasources\dbo_source.php
on line 1455

C:\Apache\htdocs\project\app>
+

Any help would be greatly appreciated!

- Cake Fan



--~--~-~--~~~---~--~~
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: Upgrade problems

2008-01-03 Thread Christian Winther

1) debug > 0
2) clear app/tmp/cache/persistent/*
3) check local vhost error log
4) check global httpd-error log
5) restart apache, (stop, start), restart cache services (memcached ect.)
6) enter the world of die('stop'); from app/webroot/index.php and downward in 
your application

That�s my approach when trying to get rid of blanks.

Also, if you use yaml with the syck pecl library, check your yaml files, if the 
syntax is wrong, or the yaml file is empty, syck sometimes just crashes the 
apache child (will show as illegal instruction in apache global error log file)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris 
Hartjes
Sent: 3. januar 2008 22:05
To: cake-php@googlegroups.com
Subject: Re: Upgrade problems


On Jan 3, 2008 3:52 PM, Mech7 <[EMAIL PROTECTED]> wrote:
>
> Ok i was using the latest nightly from a few weeks ago.. but i saw the
> new beta was released so i updated it.. but with the new beta or
> latest nightly my pages don't output anything anymore.. just blank
> does anybody know what is going on here :|
>
> Apache Version :
> 2.2.6
> PHP Version :
> 5.2.5

Have you looked at the error logs for your web server?  Stupid
question, sure, but it's always a good place to look when your
application starts outputting blank pages.  This happened to me the
other day and while the problem did not show up in the error logs, it
did at least force me to make a checklist of things that could go
wrong.

As an aside, back when I used to work at a place where I had some
power to interview people "what do you do when your PHP application
outputs nothing but blank screens" was a question I used to ask just
to get an idea of how they approach solving problems.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@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: Require SSL for entire site?

2007-12-31 Thread Christian Winther

HTTPS 
Will contain the text "on" if the connection is using SSL/TLS, or "off" 
otherwise. (This variable can be safely used regardless of whether or not 
mod_ssl is loaded).

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris 
Hartjes
Sent: 31. december 2007 17:49
To: cake-php@googlegroups.com
Subject: Re: Require SSL for entire site?


On Dec 31, 2007 11:39 AM, Bryan Encina <[EMAIL PROTECTED]> wrote:
>
> Is there anything within the cakephp framework to insure viewers are
> using https vs normal http?  What would be the best way of
> implementing this?  Would modifying the app_controller class with a
> check for $_SERVER['HTTPS'] and then redirecting based on that be the
> best solution?
>

Well, if you did want to do that sort of thing you could put it in a
beforeFilter() method in app_controller, but can you really trust the
contents of $_SERVER['HTTPS'] to be correct?  If I understand
correctly, that info can be spoofed along with lots of other $_SERVER
values.

Also, can't you limit access to stuff via the web server itself?  I
may be ignorant about setting up https in Apache, but it seems to
make sense that you could say 'https uses code sitting over here while
http uses stuff over there'.

-- 
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: Require SSL for entire site?

2007-12-31 Thread Christian Winther

Hello,
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

check the "RewriteCond Directive" 

SERVER_PORT (port 80 = non ssl, port 443 = ssl)
SERVER_PROTOCOL (http = non ssl, https = ssl)

Or just the

HTTPS variable too :]

/Jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris 
Hartjes
Sent: 31. december 2007 17:49
To: cake-php@googlegroups.com
Subject: Re: Require SSL for entire site?


On Dec 31, 2007 11:39 AM, Bryan Encina <[EMAIL PROTECTED]> wrote:
>
> Is there anything within the cakephp framework to insure viewers are
> using https vs normal http?  What would be the best way of
> implementing this?  Would modifying the app_controller class with a
> check for $_SERVER['HTTPS'] and then redirecting based on that be the
> best solution?
>

Well, if you did want to do that sort of thing you could put it in a
beforeFilter() method in app_controller, but can you really trust the
contents of $_SERVER['HTTPS'] to be correct?  If I understand
correctly, that info can be spoofed along with lots of other $_SERVER
values.

Also, can't you limit access to stuff via the web server itself?  I
may be ignorant about setting up https in Apache, but it seems to
make sense that you could say 'https uses code sitting over here while
http uses stuff over there'.

-- 
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: bake : feature request

2007-11-22 Thread Christian Winther

Please use trac for enhancements :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of FoxMaSk
Sent: 22. november 2007 13:20
To: Cake PHP
Subject: bake : feature request


hello

when we do cake bake controller and choose one of the list,
i'd like to be able to rename the controller class name (by giving the
$useTable)

currently i dont like the way the database tables are named,
so when i do cake bake model that's create a model that i modify by
renaming the model filename,  changed the class name and add
$useTable.

But after that, when i do cake bake controller ; and make my choice i
have
"You must have a model for this class to build scaffold methods.
Please try again."
because effectively the model has changed and bake cant find it.

So it will be nice to be able to specify the $useTable and class name
we we want.

Or may be i miss something that permits to do that ?

Kind regards





--~--~-~--~~~---~--~~
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: IRC log - archive in GG

2007-11-03 Thread Christian Winther

http://groups.google.dk/group/cakephp-logs 

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
Hofstetter
Sent: 3. november 2007 17:29
To: Cake PHP
Subject: Re: IRC log - archive in GG


Hi Rajesh,

Personally, I wouldn't like it if the IRC log is posted in this group,
I would prefer a separate group for the logs, analogous to the group
for tickets.

--
Daniel Hofstetter
http://cakebaker.42dh.com




--~--~-~--~~~---~--~~
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: What are the top 10 MVC PHP frameworks?

2007-10-21 Thread Christian Winther

Google.com knows

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dunith 
Dhanushka
Sent: 21. oktober 2007 13:21
To: Cake PHP
Subject: What are the top 10 MVC PHP frameworks?


I want to know what re the PHP frameworks that are built around the
MVC Design pattern..can anybody list them out?




--~--~-~--~~~---~--~~
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: Modules?

2007-10-11 Thread Christian Winther

No, the plugin part is right

But the first part about you not bothering to search for answer first is also 
true

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stefanb
Sent: 11. oktober 2007 13:39
To: Cake PHP
Subject: Re: Modules?


So a plugin is not the same as a module? Now I'm confused.

On Oct 11, 12:43 pm, dardosordi <[EMAIL PROTECTED]> wrote:
> Though the first half is the correct one.
>
> On Oct 10, 10:24 am, stefanb <[EMAIL PROTECTED]> wrote:
>
> > Thank you for the second half of your reply. The first half didn't
> > help me at all.
>
> > On Oct 10, 3:12 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote:
>
> > > Did you even bother to look in the manual or the group ?
>
> > > Its called plugins in cake
>
> > > -Original Message-
> > > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> > > stefanb
> > > Sent: 10. oktober 2007 10:36
> > > To: Cake PHP
> > > Subject: Modules?
>
> > > Does Cake support the use of modules?
>
> > >www.example.com/module/controller/action/var1/val1/var2/val2




--~--~-~--~~~---~--~~
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: Modules?

2007-10-10 Thread Christian Winther

Did you even bother to look in the manual or the group ? 

Its called plugins in cake

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stefanb
Sent: 10. oktober 2007 10:36
To: Cake PHP
Subject: Modules?


Does Cake support the use of modules?

www.example.com/module/controller/action/var1/val1/var2/val2




--~--~-~--~~~---~--~~
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: Leading Zeros Getting Stripped

2007-10-05 Thread Christian Winther

Try to do

var_dump(1);
var_dump("1");

It�s a PHP issue

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Adam 
Royle
Sent: 5. oktober 2007 12:54
To: Cake PHP
Subject: Re: Leading Zeros Getting Stripped


Surely this isn't a PHP issue?? I would say it would be dictated by
the column type being numeric. I've used zero-padded values in varchar
columns without the issue you're mentioning, so maybe double-check
you've got everything setup right.

Adam

On Oct 5, 4:51 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Thanks for the reference Chris!  I fixed the issue by using str_pad in
> the afterFind callback of my model to repair the ISBN.
>
> On Oct 4, 2:19 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > On 10/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > I'm not sure if this is a CakePHP issue or PHP in general, but I have
> > > a table in which I'm storing ISBN numbers in a VARCHAR(32) column.
> > > ISBNs can start with a zero (like 0137903952), but my model is
> > > returning the ISBN with the leading zero removed.
>
> > > Does anyone know why this is occurring, and if there's any way to
> > > prevent it?
>
> > PHP issue, look into str_pad().
>
> > --
> > Chris Hartjes
> > Cake Development Corporationhttp://www.cakedevelopment.com
>
> > 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: Why are all properties public?

2007-10-01 Thread Christian Winther

CakePHP is PHP4 compatiable, and PHP4 does not support access modifiers.

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stefanb
Sent: 1. oktober 2007 09:19
To: Cake PHP
Subject: Why are all properties public?


Why are all properties public? Why doesn't Cake use private properties
and public get/set methods so that encapsulation is achieved? Or did I
miss something here?

- stefanb




--~--~-~--~~~---~--~~
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: FindAll condition can not be an array?

2007-09-26 Thread Christian Winther

Try to run the cakephp test suite for your models. I'm pretty sure that
there is a test for this feature - if it fails too, please open a ticket on
http://trac.cakephp.org :) With a patch or test to fix/prove the error :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Charlie van de Kerkhof
Sent: 26. september 2007 13:09
To: Cake PHP
Subject: Re: FindAll condition can not be an array?


@Mike: Yes, that is my workaround now. But I get an array from another
database and want to pass it to another db source for retrieval.

@Christian: Yes, at the moment I use MySQL, but in the future I have
to use PostgreSQL. But that shouldn't havs to a problem I understood
of the DBO in Cake. (?)

thnx you both for helping me so far!

On Sep 26, 12:52 pm, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> That seems like a bug - the array list of params for a field have been
> supported for quite some time in 1.2.x.x
>
> What DBO do you use ? MySQL?
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf
>
> Of Charlie van de Kerkhof
> Sent: 26. september 2007 12:36
> To: Cake PHP
> Subject: FindAll condition can not be an array?
>
> Hi,
>
> (v1.2, latest SVN version)
>
> I try to pass an array to the findAll function like this:
>
> $condition = array('id'=>array(2,5,6,9,12,45,78,43,76));
> $this->Artist->findAll($condition);
>
> But the Query is written to the database is:
> SELECT * from Artist WHERE (2) AND (5) AND (6) AND (9) AND (12) AND
> (45) AND (78) AND (43) AND (76);
>
> What results in returning every row because everything is true.
>
> Is this a bug or is this not supported (yet?)?
>
> Thnx!
> - Charlie




--~--~-~--~~~---~--~~
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: FindAll condition can not be an array?

2007-09-26 Thread Christian Winther

That seems like a bug - the array list of params for a field have been
supported for quite some time in 1.2.x.x

What DBO do you use ? MySQL? 

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Charlie van de Kerkhof
Sent: 26. september 2007 12:36
To: Cake PHP
Subject: FindAll condition can not be an array?


Hi,

(v1.2, latest SVN version)

I try to pass an array to the findAll function like this:

$condition = array('id'=>array(2,5,6,9,12,45,78,43,76));
$this->Artist->findAll($condition);

But the Query is written to the database is:
SELECT * from Artist WHERE (2) AND (5) AND (6) AND (9) AND (12) AND
(45) AND (78) AND (43) AND (76);

What results in returning every row because everything is true.

Is this a bug or is this not supported (yet?)?

Thnx!
- Charlie




--~--~-~--~~~---~--~~
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: Capistrano + PHP deployment

2007-09-21 Thread Christian Winther

Do share ? :)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Chris Hartjes
Sent: 21. september 2007 15:00
To: cake-php@googlegroups.com
Subject: Re: Capistrano + PHP deployment


On 9/21/07, cakeFreak <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> I read throught the *Automated PHP Deployment With Capistrano*
> tutorial
> =>
http://www.simplisticcomplexity.com/2006/8/16/automated-php-deployment-with-
capistrano
>
> but it seems outdated.

In what way do you think it's outdated?  I'm using Capistrano to
deploy my CakePHP app and have actually found that the newer version
of Capistrano makes it even easier to do it, reducing the need for the
previously hackish method of needing a Rails app in place to do
deployment.

I created a deploy.rb file that exports my code out of SVN, and it
would be dead simple to add features to it to move the old one out of
the way or to unroll any changes I had made.

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation
http://www.cakedevelopment.com

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: Calling stored procedures

2007-09-17 Thread Christian Winther

Use $this->Model->query() ?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Travis
Sent: 17. september 2007 20:50
To: Cake PHP
Subject: Re: Calling stored procedures


I'm interested in this as well, any suggestions?  Thanks!

On Jul 19, 11:51 pm, "Martin Schapendonk" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> What would be a nice way to callstoredproceduresand capture their
> output/return value from CakePHP?
>
> Regards,
>
> Martin
>
> --
>   Martin Schapendonk, [EMAIL PROTECTED]




--~--~-~--~~~---~--~~
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: CLI access hampered by session?

2007-09-16 Thread Christian Winther

Perhaps you have a php-cli.ini and a php.ini file in your configuration
directory of php?

That is a pretty wellknown way to do it, have a cli config without session
and other irrelevant components for web, and then a main for web.

Try to - if possible - to execute this command on your command line:  

php -m and check if session is loaded
php -i and check if the is a different ini path 

/Jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of haj
Sent: 16. september 2007 11:50
To: Cake PHP
Subject: CLI access hampered by session?


Hi,

I've been trying to call a controller via CLI. I basically followed
this Bakery tutorial:

http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron
-and-the-command-line

so, copied index.php and change it to take command line args. Then
upon calling an action via ssh, I get error like:


PHP Fatal error:  Call to undefined function: session_cache_limiter()
in /var/www/html/cake/libs/session.php on line 153

The session itself must be working since I'm using session to track
user login in regular (not CLI) web access pages.
This looks strange to me... Anyone think of reason of the error?




--~--~-~--~~~---~--~~
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: Commented Version of CakePHP Manual

2007-06-17 Thread Christian Winther [Cwi.dk]

If its not going to be official accepted by cakephp.org - I can host it on
cakephp.nu ( I have http://docs.cakephp.nu already ) and
http://logs.cakephp.nu ( IRC logs )

You can contact me by email or from IRC ( Jippi ) if you like the idea

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of rdoggsv
Sent: 17. juni 2007 17:26
To: Cake PHP
Subject: Re: Commented Version of CakePHP Manual


Nice idea , lets hope it will get a lot of comments and with time turn
into a great resource :)




--~--~-~--~~~---~--~~
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: Cake 1.2 - Data Validation - Multiple rules per field [hack/solution]

2007-04-12 Thread Christian Winther [Cwi.dk]

I'm using the validation URL I posted successfully in my enterprise
applications.
It works well with every aspect of Cake1.2 model error handling out of the
box.

Its true it might not be the 100% official way of doing it, nor close to the
1.2 syntax, but it's a good way to do it anyway :)

My guess would be that 1.2.x probably will end up being somewhat close to
the syntax it provides.

Sample code (slightly modified to my own needs, disregard the Danish
messages :))

It looks pretty generic, and that's why I guess 1.2 officially will look
very much like it :)

array(
 'field' => array(
  'someName' => array(
   'method',
   'message',
   'params'
  )
 )
);

var $validate   = array(
'user_id'   => array(
'model' => array(
'method'=> VALID_HAS_ONE_OF,
'message'   => 'Ikke en gyldig bruger',
'params'=> array('model' => 'User')
)
),
'frontpage' => array(
'enum'  => array(
'class' => 'Cake_Validator',
'method'=> 'validEnum',
'message'   => 'Ikke gyldig valgt (Forside)',
'params'=> array('Y','N')
)
),
'default'   => array(
'enum'  => array(
'class' => 'Cake_Validator',
'method'=> 'validEnum',
'message'   => 'Ikke gyldigt valg (Default)'
)
),
'active'=> array(
'enum'  => array(
'class' => 'Cake_Validator',
'method'=> 'validEnum',
'message'   => 'Ikke gyldigt valg (Aktiv)'
)
),
'title' => array(
'required'  => array(
'method'=> VALID_NOT_EMPTY,
'message'   => 'Du skal angive en titel'
)
),
'slug' => array(
'required'  => array(
'method'=> VALID_NOT_EMPTY,
'message'   => 'Du skal angive en SLUG'
),
'unique'=> array(
'method'=> VALID_UNIQUE,
'message'   => 'Denne SLUG er allerede brugt'
)
)
);

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Dr. Tarique Sani
Sent: 12. april 2007 14:57
To: [EMAIL PROTECTED]
Subject: Re: Cake 1.2 - Data Validation - Multiple rules per field
[hack/solution]


On 4/12/07, Christian Winther [Cwi.dk] <[EMAIL PROTECTED]> wrote:
>
> Any reason why you didn't use http://bakery.cakephp.org/articles/view/55 ?
>
Appears to be too complex and too different from what is already there
in 1.2 and most likely will not work with the new $form->input()
either

Like I noted at the bottom of my page - what I wrote is still 95% cake
original code to be used till cake has something similar.

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: Cake 1.2 - Data Validation - Multiple rules per field [hack/solution]

2007-04-12 Thread Christian Winther [Cwi.dk]

Hey
Any reason why you didn't use http://bakery.cakephp.org/articles/view/55 ?

/Jippi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Dr. Tarique Sani
Sent: 12. april 2007 08:45
To: [EMAIL PROTECTED]
Subject: Cake 1.2 - Data Validation - Multiple rules per field
[hack/solution]


I needed it now!!!

http://cheesecake-photoblog.org/doku.php?id=multiple_validations_per_field_i
n_cakephp_1.2

Not as elegant as I would want it but for now it works.

Hope that helps someone

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: logging cake errors

2007-03-29 Thread Christian Winther [Cwi.dk]

http://php.net/manual/en/function.set-error-handler.php  would probadly be
nicer ;)

I got a small utility class that mail me any errors that is above E_NOTICE

Quite nice way to get error reporting, even if debug === 0 :)

-- Christian

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of John David Anderson (_psychic_)
Sent: 29. marts 2007 22:46
To: cake-php@googlegroups.com
Subject: Re: logging cake errors



On Mar 29, 2007, at 2:32 PM, Charles Schaefer wrote:

> Good, but I don't saw an automatic log system in the cake!
> Am I wrong with this thought, or cake really haven't a log system?

$this->log("message");

:)

http://api.cakephp.org/ 
class_object.html#942f17c527c523372325ee54d343ad44

I think the logs are in /app/tmp/logs/.

-- John



--~--~-~--~~~---~--~~
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: CakePHP versus Symfony ?

2007-03-02 Thread Christian Winther [cwi.dk]

Did you even bother to search the group or google before asking ?.

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of surfivor
Sent: 2. marts 2007 19:39
To: Cake PHP
Subject: CakePHP versus Symfony ?



 Could anyone point me to some significant differences between CakePHP
and Symfony ? Also I am familiar with Ruby on Rails, so any
similarities or differences there might also be usefull.




--~--~-~--~~~---~--~~
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: Pass an array as a parameter

2007-03-02 Thread Christian Winther [cwi.dk]

Debug( func_get_args() )  would probadly output array( 0 => lala, 1 => id ) 

Not sure if that's what you want

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of zipman
Sent: 2. marts 2007 14:38
To: Cake PHP
Subject: Pass an array as a parameter


Hello,

is there any way that I can call a function through url and pass an
array as a parameter?

For example

if I have a function in my test controller
function lala($id)
{
}

I can call it through /tests/lala/id

but if
function foo($array)
{
}

where $array is an array

how can I call a controller function from a view and pass an array as
a parameter?

I have a view where I have a button and I have connected the onclick
event
with calling that function.

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



RE: Multiple file upload ?

2007-03-02 Thread Christian Winther [cwi.dk]

iF you just need a simple 'plain old multi upload' feature, just do:


And then debug( $this->data['Upload'] );  in your controller show contain an
array of file info (tmp path ect)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Mech7
Sent: 2. marts 2007 17:28
To: Cake PHP
Subject: Multiple file upload ?


Is there a explanation or tutorial anywhere which explains how to do
multiple file uploads and store the name in the database?

I have found this: http://thinkingphp.org/demos/cake-timer/
but it looks a little complicated and uses a perl script :(




--~--~-~--~~~---~--~~
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: spreadsheet_excel_writer and cakephp

2007-03-02 Thread Christian Winther [cwi.dk]

Debug = 0

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of floepi
Sent: 2. marts 2007 17:40
To: Cake PHP
Subject: Re: spreadsheet_excel_writer and cakephp


I have the same problem but i think it comes down to the little
annotation in cake which displays how long it took.



or something. Does anyone now how to turn that off ?

Cheers

Phil



On Jan 5, 2:12 am, "roman_coder" <[EMAIL PROTECTED]> wrote:
> Here is some code.  I also have the path topearin the vendors
> directory in my include path.
> .;C:\Program Files\xampp\htdocs\mem\vendors\Pear
>
> Call from within view:
>
>  vendor('Pear\Spreadsheet\Excel\Writer');
>
> $workbook = new Spreadsheet_Excel_Writer();
> $worksheet =& $workbook->addWorksheet();
>
> //Set Column Zoom to 75%
> $worksheet->setZoom(75);
>
> //Set Column Sizes
> $worksheet->setColumn(0,0,4.43);
>
> // Create a format for Titles
> $titleFormat =& $workbook->addFormat();
> $titleFormat->setBold();
> $titleFormat->setSize('14');
>
> $worksheet->write(0,1,'Events Details - Trust and
> Safety',$titleFormat);
> $workbook->send('ListVie1w.xls');
> $workbook->close();
> ?>
>
> Code from call outside of Cake:
> require_once 'Spreadsheet/Excel/Writer.php';
>
>  $workbook = new Spreadsheet_Excel_Writer();
> $worksheet =& $workbook->addWorksheet();
>
> //Set Column Zoom to 75%
> $worksheet->setZoom(75);
>
> //Set Column Sizes
> $worksheet->setColumn(0,0,4.43);
>
> // Create a format for Titles
> $titleFormat =& $workbook->addFormat();
> $titleFormat->setBold();
> $titleFormat->setSize('14');
>
> $worksheet->write(0,1,'Events Details - Trust and
> Safety',$titleFormat);
> $workbook->send('ListView.xls');
> $workbook->close();
> ?>




--~--~-~--~~~---~--~~
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: Extending model

2007-03-02 Thread Christian Winther [cwi.dk]

And its singleton ;)

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of jitka
Sent: 2. marts 2007 18:41
To: Cake PHP
Subject: Re: Extending model


Hi Zoltan,

if You're using CakePHP 1.2 already, then behavior is right place imo.
Behavior is for Model just like Component for Controller, with one
useful exception: it uses more callbacks ;)

http://docs.cakephp.nu/classes/show/ModelBehavior




--~--~-~--~~~---~--~~
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: model autoloading

2007-02-12 Thread Christian Winther [cwi.dk]

Hey
Sounds nice, but you would be better of to release it - and then ask for the
general public interest..

I don't know if I'm interested until ive checked it 'under the hood' :) -
but it does sound nice 

/Jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Darian Anthony Patrick
Sent: 12. februar 2007 15:52
To: cake-php@googlegroups.com
Subject: RFC: model autoloading


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Good day all,

We've been using some code internally for about a year now that
autoloads models.

It handles MySQL 4 and 5 right now, and works by looking at the foreign
key relations/constraints defined in the database schema, and creates
appropriate CakePHP models.

This code works fine, and works well, but it lacks some features that
I'd like to see:
- - ability to define validation and callbacks on generated models
- - ability to write them to the filesystem (this overlaps with Bake)
after first autoload
- - support for PostgreSQL

I'm considering releasing this code to the Bakery, but I first wanted to
gauge community interest.

Is runtime model autoloading something that you would use?

- --
Darian Anthony Patrick
Principal, Application Development
Criticode LLC
(215) 240-6566 Office
(866) 789-2992 Facsimile
Web:   http://criticode.com
Email: [EMAIL PROTECTED]
JID:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF0H8bKpzEXPWA4IcRAvqdAJ9fMwNQ55WdKHKuikq3u23MaZCRAQCeKRRa
H8LpYn5V+wZxcXgXURxUeIQ=
=6E9O
-END PGP SIGNATURE-



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



CakePHP and PHPDoctrine

2007-02-05 Thread Christian Winther [cwi.dk]
Hey

Im currently working on a semi-port of phpdoctrine for CakePHP - and was
wondering if anyone would like to help out or give some feedback on the
level of compat there should be between CakePHP model methods and Doctrine.

 

Currently it supports limited amount of form helpers ect.

 

/JIppi


--~--~-~--~~~---~--~~
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: Email Notification

2007-02-02 Thread Christian Winther [cwi.dk]

Hi
I'm currently working on an 'handler' framework for cake vendor dir :)
It's php5 only though, but it supports a few different nice things - the
real simple outline is:
You have a 'Handler' (singleton) where you can 'trigger' some default events
and your own custom ones
For each Handler, you have the option to attach any amount of observers,
that depending on the event you trigger, will be notified with relevant
data.
You also have the option to attach 'workers' - that could be a
FileLoggerWorker, or XmlLoggerWorker - your observers can use as a resource.

A really simple example of use would be something like this in my bootstrap
file:


vendor( 'EasyHandler/bootstrap' );
EasyHandlerConfig::getInstance()->addRoot( APP . 'EasyHandler' );

/* @var $phpErrorHandler PhpErrorHandler */
$phpErrorHandler = EasyHandlerFactory::getHandler('PhpError');
$phpErrorHandler->writeEvent(EH_MAIL, E_WARNING, true);
$phpErrorHandler->writeEvent(EH_LOG, E_STRICT, false);
$phpErrorHandler->loadWorker('File',array('filename' => 'php_errors.txt'));
$phpErrorHandler->loadObserver('PhpError');
$phpErrorHandler->loadObserver('PhpErrorMail',array('email' => '[EMAIL 
PROTECTED]'));
set_error_handler('cakeErrorHandler');


/**
 * Wrapper to make sure that the PHP errors is handled by our class
 *
 * @param integer $log_level
 * @param string  $log_text
 * @param string  $error_file
 * @param integer $error_line
 */
function cakeErrorHandler( $log_level, $log_text, $error_file, $error_line )
{
PhpErrorHandler::getInstance()->handleError( $log_level, $log_text,
$error_file, $error_line );
}


What it does should be rather simple to figure out, but in short :
a) vendor the boostrap for the framework
b) add a new search path ( APP . 'Easyhandler' ) - this is where the factory
will look for observers, workers, handler, exceptions ect.
c) Request the PhpErrorHandler from the factory (handles auto-loading of
interfaces ect. )
d) Enable two events ( EH_MAIL = mail event, and EH_LOG is logging event )
e) Attach a FileWorker that is going to output to php_errors.txt ( default
log path is in LOGS )
f) Load a PhpErrorObserver that is going to handle the error level filtering
ect. 
g) Load a PhpErrorMailObserver that will send me a nice email each time
there is a E_WARNING triggered somewhere
h) Change the default PHP error handler - so it uses my EasyHandler
framework

A few notes on this is that the PhpErrorHandler auto-enables logging for the
current level of error_reporting() you have, that's why they are omitted.
Also, if you prefer the error log to be in XML, just replace the line with:


$phpErrorHandler->loadWorker('Xml',array('filename' => 'php_errors.xml'));

That only requires the worker to implement the XmlLogger interface :)


Other examples could be in my AppController:

this->log   = EasyHandlerFactory::getHandler('Logger');
$this->cache= EasyHandlerFactory::getHandler('Cache');
$this->cache->loadObserver('CacheApc');
$this->benchmark= EasyHandlerFactory::getHandler('Benchmark');
$this->Event= EasyHandlerFactory::getHandler('CakeEvent');
$this->Event->addObserver( EasyHandlerFactory::getObserver('CakeSecurity')
);
$this->Event->addObserver( EasyHandlerFactory::getObserver('CakeMenu') );


Where one of the more interesting ones is Benchmark and Cache handler ;)

The Event handler is used to 'overtake' everything that is possible to
overtake from cake in the form of callbacks.



Function afterFilter() {
$this->Event->triggerControllerEvent( $this, __FUNCTION__);
}


Is going to trigger all observers in CakeEventHandler that implements the
CakeControllerInterface :)

The same is doable for models aswell

/Jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of ianh
Sent: 2. februar 2007 09:42
To: Cake PHP
Subject: Re: Email Notification


Hi All,

Fully agree that the way to use model callbacks for things like
sending emails is to use observers - there is a tutorial on the Bakery
on this. It is such a flexible way of doing things that I have started
to put quite a lot of business logic that might otherwise go elsewhere
into observers. I have found that I can log errors, access any model
easily (getModel method) and trigger emails etc without introducing
dependencies into my models and allowing my controllers to focus on
handling application flow and exceptions.

Ian



On 1 Feb, 22:25, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
> Hi Tarique
>
> >> What is the recommended approach for an AfterSave function triggering
> >> and sending an email notification on a saved or submitted form? Thanks.
>
> > I personally prefer doing this in the Controller as I tend to use a
> > component to send emails. Keeps the Model free of any dependencies
>
> > If at all you want to do this with the Model then I would suggest make
> > the Model Observable and the Email component should be an Observer
>
> I was having thoughts along those lines

RE: strange output of "//" during load helpers

2007-01-29 Thread Christian Winther [cwi.dk]

Do you use requestAction somewhere? That could be a reason for the two calls
to _loadHelpers :)  since there is called two actions for each request

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of jyrgen
Sent: 30. januar 2007 03:41
To: Cake PHP
Subject: strange output of "//" during load helpers


since a couple of days i don't get rid of a trailing double slash on
the top of *all* pages. i remember having placed some echo
statements eventually into core files in order to get acquainted
with what's going on behind the scenes.

tracked this down up to the &_loadHelpers() function in the view 
class,
where i put a pr($helpers); statement into line 604 of view.php.

this is what's on top of the pages now:

Array
(
[0] => Html
[1] => Form
[2] => Session
)

//

Array
(
[0] => Html
[1] => Session
)

As you can see loadHelpers() is called twice (why?), and in between
the output // is generated.

i don't get any further with this...

jyrgen




--~--~-~--~~~---~--~~
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: CakePHP Reference Project

2007-01-22 Thread Christian Winther [cwi.dk]

I have created a IRC channel on Freenode for the relevant discussions:
#cakephp.doc  ( irc://irc.rizon.net/cakephp.doc )

/jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dr. Tarique Sani
Sent: 22. januar 2007 13:33
To: cake-php@googlegroups.com
Subject: Re: CakePHP Reference Project


On 1/22/07, RichardAtHome <[EMAIL PROTECTED]> wrote:
 > Ok, I've had my moan about the documentation for cake ;-)
>
> Time to do something about it.

Great

> Anything else?

Addons / Plugins - which are truly plug and play

Making the app plugable into some popular CMS (Joomla?) and yet it can
still be used in stand alone mode.

And to put my time where my mouth is I am willing to spend some time
on fleshing out some of these things

Cheers
Tarique

-- 
=
PHP Applications for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=



--~--~-~--~~~---~--~~
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: Unoffical API / Beta RFC [new]

2007-01-22 Thread Christian Winther [cwi.dk]

I have created a IRC channel on Freenode for the relevant discussions:
#cakephp.doc  ( irc://irc.rizon.net/cakephp.doc )

/jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of RichardAtHome
Sent: 22. januar 2007 12:16
To: Cake PHP
Subject: Re: Unoffical API / Beta RFC [new]


tbh, I wasn't being off topic (kinda ;-). Jippi was asking what people
would like to see in a documentation project and I answered: Example
code.

It snowballed from there.

I'm definitely not having a dig at all the hard work done by everyone
on the CakePHP project. If I didn't think it had potential I wouldn't
have bothered righting the post.

Jippi, the app is looking great :-) How about posting a few tutorials
on how you glued all the various bits together? Include that in the
documentation and I think you are on to a winner!




--~--~-~--~~~---~--~~
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: CakePHP Reference Project

2007-01-22 Thread Christian Winther [cwi.dk]

Hi
Sounds like a nice thing... but wouldn't it be smarter to integrate it into
my API app as a plugin or something similar.
The best thing that could happen to cake would be a HUGE knowledge center,
with API, Doc, Manual, referenaces, snippets and everything relevant to Cake
codes. (Aka Bakery)

If your on IRC - holla me there (Im Jippi) - and we can talk about some
application enhancements that would benefit cake even more :)

/Jippi

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of RichardAtHome
Sent: 22. januar 2007 12:44
To: Cake PHP
Subject: CakePHP Reference Project


Ok, I've had my moan about the documentation for cake ;-)

Time to do something about it.

I'd like to create a 'Reference' Project and associated documentation.
Something that uses best practices and incorporates all the common
elements a commercial cake project would call on and illustrates how to
bind them together into a coherent whole.

What I'd like to end up with is a freely available project that people
can turn to whenever they say 'how do i'

I'm thinking of basing it on the blog tutorial as everyone understands
what a blog is and a fully featured blog should use pretty much all of
the bells and whistles most other projects require.

Before I start coding, I'd like to hear what functionality and features
people would like to see. My basic list would be something like:

Authentication
Multicolumn layouts
Themes
Incorporating a 3rd party WYSIWYG editor
File Uploads
RSS feeds (could a view be leveraged into providing these?)
Article Search
Site Navigation / breadcrumb components

Anything else? If someone suggests something outside of the scope of a
blog then I'm quite happy to change the application to something more
fitting. Suggestions for other applications are welcome too.

As I have to work for a living, this will be a part time project so
don't expect masses of code straight away ;-)




--~--~-~--~~~---~--~~
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: Unoffical API / Beta RFC [new]

2007-01-22 Thread Christian Winther [cwi.dk]

Hi
Yeah, this topic ended up with people discussing the quality of Cake
docs/manual instead of discussion WHAT I could add to improve the situation
for new Bakers

The ~3 first posts had relevance for the original topic, and then it went
completely off track :(

I'm sitting here now, with the feeling that I don't have a clue what people
felt about the API app I'm making, but a clear feeling that most people
aren't very happy about the current situation...
And without sounding like a saint or angel, I'm beginning to feel some of
the frustration the core team problem has when reading the group and looking
at one post after another with the endless discussion on how many things
there need improvement in the API/DOC/Manual, and yet so little action
behind those words.

I felt like doing this app for Cake because I wanted to contribute to the
project - I'm far from some godlike baker, actually, phpnut would probably
slap me around if he saw the code, but I don't care.. I'm just putting
action behind my words when I told gwoo I felt like API lacked some
features

So please, feedback on the TOPIC, not about how bad/lacking the current
is...

/Jippi

Ps. Yes, my English suck, and yes, I'm a little pissed off right :P

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dr. Tarique Sani
Sent: 22. januar 2007 10:40
To: cake-php@googlegroups.com
Subject: Re: Unoffical API / Beta RFC [new]


On 1/22/07, RichardAtHome <[EMAIL PROTECTED]> wrote:
> I'd love to contribute to CakePHP as I believe its the best thing to
> happen to PHP in all the time I've been programming with it (since
> PHP3).

Nice to know that - I wont go as far as saying CakePHP is the best
thing or bother with I am older than you in this ;)

> I was trying to illustrate that perhaps, if the documentation was
> available then the learning process would be faster and I would be in a
> better position to help others. As it stands, I'm no-where near up to
> speed with CakePHP to help out in any substantial way.

Again a common fallacy on public forums - I am too new/know too less
to help - You teach best what you want to learn the most.

> And your are right, this is one of the most friendly, a knowledgeable
> lists I've subscribed to and I'm keen to take a more active roll.

I notice that you *are* already more active than I am so

> I understand how OSS projects are developed, but lack of documentation
> has sunk other worthy projects in the past. I'd hate to see cake suffer
> the same misfortune.

Oh! its not that bad...

> I'm not asking for wikipedia scale documentation. What would really be
> useful would be to extend the sample Blog application to cover the
> stuff that make a site 'work'.

The IBM tutorials just provided that bit - and thank god they did not
do another blog

Cheers
Tarique

P.S. This thread has gone too off topic so EOT form my side
-- 
=
PHP Applications for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=



--~--~-~--~~~---~--~~
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: Unoffical API / Beta RFC [new]

2007-01-19 Thread Christian Winther [cwi.dk]



One idea will be to make sure each fuunction has it's introduction
version and if it is deprecated, the date for deprecation, adn then
subequent removal date.


Yea, that will come when / if Cake Core devs approve of it - the system can
handle any amount of @annotations
I use @since to make sure the API looks right for each user (1.1 or 1.2)

@deprecated is also active already, ref:
http://docs.cakephp.nu/classes/show/NumberHelper  ( parseHtmlOptions )


RSS feeds? What were you invisioning to use them for?

Comments / snippets / anything user-driven :)


Output to a suitable print layout would be good, with ability to print
a whole section.


Yeah, that's a good idea :)

/Jippi



--~--~-~--~~~---~--~~
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: Unoffical API / Beta RFC

2007-01-18 Thread Christian Winther [cwi.dk]


Hi
The login system shouldn't require any special browser enabled features...

Its just a plain old 'POST' form.
Does it not work for you or ?

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of MJ Ray
Sent: 19. januar 2007 00:48
To: cake-php@googlegroups.com
Subject: Re: Unoffical API / Beta RFC


"Christian Winther [cwi.dk]" <[EMAIL PROTECTED]> wrote:

--> http://docs.cakephp.nu/ <-- [...]
This post is meant as a RFC ( Request For Comments ) post on how it should
look, or perhaps some features that would be nice.


Try resizing the window and fonts: 600px width, for example, to see
page elements and lines colliding with each other.

What are the requirements of the login system?  Javascript?  Moderator
approval? Sending data to a foreign country?

Also seems some bug with & symbols, but I guess you know that.


- Manual page php.net style for each method or perhaps class
- Comment archive for each function ( Imagine 900 Model posts :p )
- RSS feeds


I can't see how to get from the function description to its source
code.

A very useful thing might be linking to the php manual for things
searched if they're not cakephp functions, or at least having an
easily-grabbable (accesskey or maybe style="position:fixed") search
box for it.

Another useful thing would be to document the changes in functions
(additions, removal, parameters) between cakephp versions over time.

Hope that helps,
--
MJR/slef
http://www.ttllp.co.uk/



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



Unoffical API / Beta RFC

2007-01-18 Thread Christian Winther [cwi.dk]


Greetings list

As we all know CakePHP has a great API website ( http://api.cakephp.org )
However, it lacks some features / goodies that can raise it to 'the next
level'.

So after some reading and learning - I have come up with a draft on how it
COULD look / work.

--> http://docs.cakephp.nu/ <--

It's still in very early beta / testing, so don't expect the perfect golden
solution for now :) 


This post is meant as a RFC ( Request For Comments ) post on how it should
look, or perhaps some features that would be nice.

Please note that this is not meant to 'overtake' any official CakePHP
websites, and thus I'm not going  to implement features that would compete
with The Bakery or its friends.

Its however most likely that if this little project of mine turns out
successful, it will be donated to Cake Foundation, and linked to The Bakery
user database and become tighter integrated with the CakePHP websites.

Features I plan to implement is:
- Manual page php.net style for each method or perhaps class
- Comment archive for each function ( Imagine 900 Model posts :p )
- RSS feeds

Best regards
Christian 'Jippi' Winther :)


--~--~-~--~~~---~--~~
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: File upload with AJAX

2007-01-03 Thread Christian Winther [cwi.dk]


I got a working ajax uploader using YUI

http://www.cwi.dk/upload.php

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ámon Tamás
Sent: 3. januar 2007 20:40
To: cake-php@googlegroups.com
Subject: Re: File upload with AJAX


Felix Geisendörfer wrote:
Hey, I'm currently doing a little series on JavaScript programming 


 
on my blog and I think this would be an excellent tutorial for one of my 
upcoming posts. So if you can wait I might write up an excellent how-to 
guide about this soon.


If you can't, here is the basic things you need to do (and I highly 
recommend you to use jQuery instead of prototype for it!):


   1. Attach an event to the 's onSubmit event
   2. In the callback function, create an iframe on the fly, hide it and
  set the form's 'target' attribute to match the name (or id I
  forgot) of the iframe

The name I think.

   3. Attach an onLoad function to the iframe
   4. Then execute the form submit event yourself
   5. In the onLoad callback of the iframe you should be able to access
  it's content (I think). Otherwise return some JS in the iframe
  that will pass some variables to window.parent, making them
  available to your real site


Well. It is mean I must to send the all form to the iframe, not only the 
file... What an easy :) I thinked in a difficultest way. That was the 
problem.



Of course this isn't complete, but I hope it helps.



It helps thanks.


--
Ámon Tamás
http://linkfelho.amon.hu





--~--~-~--~~~---~--~~
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: Active Resource Implementation

2006-11-27 Thread Christian Winther [cwi.dk]
Ah okay, i know of that pattern very well, thanks J

 

From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Mariano Iglesias
Sent: 27. november 2006 19:07
To: cake-php@googlegroups.com
Subject: RE: Active Resource Implementation

 

He meant Active Record Pattern:

 

 <http://en.wikipedia.org/wiki/Active_Record>
http://en.wikipedia.org/wiki/Active_Record

Active record is an approach to reading data from a database. A row in a
database table or view is wrapped into a class, thus an object instance is
tied to a single row in the database. After creation of an object, a new row
is added to the database upon save. Any object loaded gets its information
from the database; when an object is updated, the corresponding row in the
database is also updated. The wrapper class implements accessor methods for
each column in the table or view.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

  _  

De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Christian Winther [cwi.dk]
Enviado el: Lunes, 27 de Noviembre de 2006 02:45 p.m.
Para: cake-php@googlegroups.com
Asunto: RE: Active Resource Implementation

 

Can you guide me to some information regarding Active Resource Pattern -
couldn't find anything on google looking like it



 



--~--~-~--~~~---~--~~
 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: Active Resource Implementation

2006-11-27 Thread Christian Winther [cwi.dk]
Can you guide me to some information regarding Active Resource Pattern –
couldn’t find anything on google looking like it

 

From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Felix Geisendörfer
Sent: 27. november 2006 17:25
To: cake-php@googlegroups.com
Subject: Re: Active Resource Implementation

 

Afaik, this is something is planned for CakePHP 1.2. Right now it's still in
it's early phase, meaning the Datasource/Model object are undergoing some
major refactoring in order to make them more generic.

-- Felix Geisendörfer aka the_undefined

--
http://www.thinkingphp.org
http://www.fg-webdesign.de 



Pablo Viojo wrote: 

Hi all,

Are there any plans about implementing the Active Resource Pattern for
Cake?. I've searched the group index and trac but haven't found anything
about it.

Regards,

-- 
Pablo Viojo 
[EMAIL PROTECTED]
http://pviojo.net 



 



--~--~-~--~~~---~--~~
 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: Automatic plugin detection

2006-11-14 Thread Christian Winther

Hi 
Oh, that looks very cool - im going to check it out :)

Thanks

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dr. Tarique Sani
Sent: 9. november 2006 08:03
To: cake-php@googlegroups.com
Subject: Re: Automatic plugin detection


On 10/31/06, Christian Winther <[EMAIL PROTECTED]> wrote:
> plugins/$name/$name_uninstall.phpfile for
> deactivating the plugin ( removing tables )

We have something very similar in cheesecake photoblog - check out 1.5
Beta 1 from http://cakeforge.org/projects/cheesecake/

> and then somehow the plugin should 'publish' itself to cake what menu
> options it has, and what features it should add where and how

The plugin does publish itself on to the Addons page and gives a
management Interface.

HTH
Tarique

-- 
=
PHP Applications for E-Biz: http://www.sanisoft.com
Coppermine Picture Gallery: http://coppermine.sf.net
=



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



Automatic plugin detection

2006-10-31 Thread Christian Winther








Hello bakers 

 

I’ve been thinking about how to cake recognize
my plugins automatic – and adapt my views to the plugins there is active
on the app (Adding menu’s / features )

Does anyone have a good idea on how this
could be done ? 

 

My solution (partly) was something like: 

 

plugins/$name/$name_install.php  
  file
for activating the plugin ( setting up database fields )

plugins/$name/$name_information.php     basic
information about the plugin ( version, description, friendly name )

plugins/$name/$name_uninstall.php    file
for deactivating the plugin ( removing tables )

 

and then somehow the plugin should ‘publish’
itself to cake what menu options it has, and what features it should add where
and how 

 

Have anything like this been made in Cake
before ? Or perhaps some other framework where it would be possible to get ‘inspiration’
?

 

/Jippi




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






RE: Cake associations question (foreign keys)

2006-10-23 Thread Christian Winther

Hey

If you want to use constraints / foreingkeys ( FK ) under the MySQL database
server, you need to use the table type innodb instead of MyISAM ( default
for mysql )

http://dev.mysql.com/doc/refman/4.1/en/innodb-overview.html ( == 5.1 )
http://dev.mysql.com/doc/refman/5.0/en/innodb-overview.html ( == 5.0 )
http://dev.mysql.com/doc/refman/5.1/en/innodb-overview.html (  < 5.0 )

also read on these links for how to use these foreign keys :)

http://dev.mysql.com/doc/refman/5.1/en/example-foreign-keys.html 
http://dev.mysql.com/doc/refman/5.0/en/example-foreign-keys.html
http://dev.mysql.com/doc/refman/4.1/en/example-foreign-keys.html

Id recommend using EMS SQL Manager 2005 or other visual database editor when
playing with them, since it can rather quick be hard to keep track of all
your keys :)

When I use cake constraints - I always back it up with triggers and foreign
keys in mysql innodb aswell, better safe than sorry yes ? :)

/Christian Winther


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



RE: A different way to create ACL database

2006-10-21 Thread Christian Winther

Thats from the php.ini setting 

expose_php = On

you can make a php-cli.ini file and set it to off if you dislike this

/Jippi


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



RE: Refactoring Views

2006-10-20 Thread Christian Winther

> To be brief, what I've done is create a meta-framework that works 
> hand-in-hand with Cake (using Cake itself and a small number of external 
> scripts and processes) that is able to generate all of my views for me 
> using a series of reusable elements and helpers.
> This meta-framework knows when to expose information on a given screen 
> using what I call "applets" (nothing to do with Java).  Applets are a 
> collection of fields in a certain state and having certain properties 
> (or rather a collection of fields spanning multiple models associated 
> with an instance of an applet that is assigned to a particular view).

Is this a public meta-framework or a private closed source ?

/Christian


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



RE: Helpers and Components

2006-10-20 Thread Christian Winther

You could make your methods static and access them with ClassName::yourMethod 
aswell as $className->yourMethod

/Christian 

-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of davide
Sent: 20. oktober 2006 11:49
To: Cake PHP ML
Subject: Helpers and Components

Sometime ago, I developed my own helpers for formatting date. Everything is ok, 
but now I need those function even in the controller level. So I thought about 
components. Everything is still fine. Now I wouldn't like to duplicate the 
code, I would like something like using the components code from the helpers. 
Something like

class MyHelper...
   function dumb(param1, param2){
  return $this->controller->MyComponent->dumb(param1, param2);
   }
...

It seems not to working, so I ask. Which should be the best way for obtaining 
this feature? Maybe a static library referenced with the vendors()?

Bye
Davide

--
By the power of Greyskull...



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