getInsertID

2006-05-05 Thread monty

I'm using the first stable version of Cake and postgres.
I'm performing a query using Model->query function to insert a new
record
and i want to get the last inserted id from this query using
Model->getInsertID.
Howeever this function gives me blank. It works however if i insert a
new record
using Model->Save

Has anyone noticed this? or am i using incorrectly.
Thanks for help.
Simon.


--~--~-~--~~~---~--~~
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: change database on the execution

2006-05-05 Thread comechao

Tkz man!!! :D


--~--~-~--~~~---~--~~
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: change database on the execution

2006-05-05 Thread bigdog

http://groups.google.com/group/cake-php/browse_thread/thread/f12ecdb3a6019d83?hl=en


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



change database on the execution

2006-05-05 Thread comechao

I have 2 daabases, one for users, one for other things. Can i change
database on the execution? Couse my authentication use one database and
rest of application use other database...

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



Re: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

calzone,

Yes as I note in the doc, I didn't test that script it was just a 
sample. Here is the same script actually implemented into an app of 
mine. This is put in the app_controller.php or your App. You will have 
to set the session information to whatever you use for your user 
authentication.

Ryan

  var $components = array('Acl');
   var $beforeFilter = array('checkAdmin');
   
function checkAdmin()
{
$aco = $this->name . ":" . $this->action;
   
if($this->Session->read('User.logged') === true)
{
   

if($this->_checkAccess($this->Session->read('User.username'), $aco))
{   
return;
}
else
{
$this->redirect('/admin/users/login/');
}   
}else{
if($this->_checkAccess('User', $aco))
{   
return;
}
else
{
$this->redirect('/admin/users/login/');
}   
}
}
   
function _checkAccess($aro, $aco)
{
 // Check access using the component:
$access = $this->Acl->check($aro, $aco, $action = "*");

//access denied
if ($access === false)
{
return false;
}
//access allowed
else
{
return true;
}
}

--~--~-~--~~~---~--~~
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: How to accomplish SELECT [not *] and WHERE clause?

2006-05-05 Thread calzone

Thank you, it looks like that's the stuff I need!


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread calzone

I'm making progress.

I actually got a usable UI to appear at mysite.com/acm

It had some errors about missing tables, and then missing fields.  I
took wild guesses that the missing fields should be varchar 32 to see
what would happen.

Once I stopped getting errors, I tried adding the code below to
posts_controller.php (this is the blog tutorial controller).  But now
I'm getting a php error:

Fatal error: Call to undefined function: _checkaccess() in
/var/www/vhosts/chriskausel.com/httpdocs/app/controllers/posts_controller.php
on line 12

And here's the code, lifted straight from the documentation.  I'm not
sure if I was supposed to change anything or not.

var $components = array('Acl');
var $beforeFilter = array('checkAcl');
function checkAcl()
{
$aco = $this->name . ":" . $this->action;

if($this->_checkAccess($this->Session->read('User.username'), $aco))
{   
return;
}
else
{
//Not Allowed Action
}
}


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



Cake and Plesk or other Managed Hosting software

2006-05-05 Thread calzone

Does anyone have any experience using cake in production mode under
Plesk or other managed hosting software?

There are two specific questions I have:

1) Is it possible to install cake in production mode without confusing
plesk? (plesk automatically sets virtual host roots in apache at
/var/www/vhosts/domainname.com/httpdocs/ with plenty of required
folders only accessible to root under domainname.com and two required
folders created by plesk under httpdocs)

2) It would be ideal if cake could be installed on the server once, and
have it available to all clients on the server.  So I'm picturing
something like /usr/share/cake or maybe /var/www/vhosts/shared/cake
with the contents of webroot extracted to the virtual hosts directory.
Has anyone done anything like this or does anyone think it's feasible?


--~--~-~--~~~---~--~~
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: Extending the blog tutorial to include login?

2006-05-05 Thread Samuel DeVore
I think the plan for the cake bakery tutorial is to include this.  https://trac.cakephp.org/wiki/BuildingCakeBakery
On 5/5/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote:
I would like help in what skills should I learn before building alogin authentication features in my cake apps. Thanks!On 5/5/06, roberts.sean <[EMAIL PROTECTED]
> wrote:>> The blog tutorial was great, but I think it left out a crucial step:> securing it from malicious users who want nothing more than to make a> series of "hahaha lol owned you" posts on your blog.  The section in
> the manual on ACL was interesting, but it said that you should already> have your own user authentication setup.  The rdAuth tutorial in the> Wiki was confusing at best.>> Does anyone know of a tutorial that extends the blog tutorial to
> include a minimal amount of security?  I've gotten as far as writing a> small script to determine whether or not a user's login credentials are> any good, but when it comes down to making this persistent among my
> pages I'm pretty lost!>> If anyone knows of a tutorial like this, or can explain to me how I> would go about maintaining a persistent "logged in" status for a user> among different models and controllers I would really appreciate it.
>> 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  -~--~~~~--~~--~--~---


Re: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread calzone

TracyB,

At the risk of coming across as a complete moron, I need to ask:

how did you know to set up user.php and permission.php, how did you
know what to put inside, and how did you know what to do with
config.php?

I'm totally in the dark.


--~--~-~--~~~---~--~~
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: Extending the blog tutorial to include login?

2006-05-05 Thread Carlos Mauricio Samour

I would like help in what skills should I learn before building a
login authentication features in my cake apps. Thanks!

On 5/5/06, roberts.sean <[EMAIL PROTECTED]> wrote:
>
> The blog tutorial was great, but I think it left out a crucial step:
> securing it from malicious users who want nothing more than to make a
> series of "hahaha lol owned you" posts on your blog.  The section in
> the manual on ACL was interesting, but it said that you should already
> have your own user authentication setup.  The rdAuth tutorial in the
> Wiki was confusing at best.
>
> Does anyone know of a tutorial that extends the blog tutorial to
> include a minimal amount of security?  I've gotten as far as writing a
> small script to determine whether or not a user's login credentials are
> any good, but when it comes down to making this persistent among my
> pages I'm pretty lost!
>
> If anyone knows of a tutorial like this, or can explain to me how I
> would go about maintaining a persistent "logged in" status for a user
> among different models and controllers I would really appreciate it.
>
> 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
-~--~~~~--~~--~--~---



Re: Extending the blog tutorial to include login?

2006-05-05 Thread John Anderson


On May 5, 2006, at 2:33 PM, roberts.sean wrote:

>
> The blog tutorial was great, but I think it left out a crucial step:
> securing it from malicious users who want nothing more than to make a
> series of "hahaha lol owned you" posts on your blog.  The section in
> the manual on ACL was interesting, but it said that you should already
> have your own user authentication setup.  The rdAuth tutorial in the
> Wiki was confusing at best.

The Blog tute is meant to be extremely simple. While  security is an  
important part of any application, the Blog in the tute isn't a real  
application, but a tool for teaching folks about Cake.

> Does anyone know of a tutorial that extends the blog tutorial to
> include a minimal amount of security?  I've gotten as far as writing a
> small script to determine whether or not a user's login credentials  
> are
> any good, but when it comes down to making this persistent among my
> pages I'm pretty lost!

Cake automatically starts a session, you just need to read up on  
sessions in PHP. That's how you manage persistent information using  
the system. You can use sessions however you want, but Cake has some  
helps there, too. There's sections in the manual that address those  
helps, but read the PHP docs (and Google) for info about using  
Sessions first.

> If anyone knows of a tutorial like this, or can explain to me how I
> would go about maintaining a persistent "logged in" status for a user
> among different models and controllers I would really appreciate it.

Depends what you want to do I guess. The beforeFilter in controllers  
is a great place to put access checking functions. But that all  
depends on how you're using your sessions.

--- J

--~--~-~--~~~---~--~~
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: LDAP AppModel?

2006-05-05 Thread John Anderson


On May 5, 2006, at 1:00 PM, elijah wrote:

>
> I am working on an interface for managing scalable mail systems (to be
> released under GPL) and I would like to use Cake!
>
> The user directory is stored in LDAP. I have a bunch of PHP code which
> uses reflection and crude to access the LDAP data in a clean way,  
> and I
> want to convert it over to cake.
>
> Has anyone done this already?

I  have an LdapUser Model I'm using in an application if you'd be  
interested in seeing it. I'd have to take some of our own information  
out of it, but you might find it useful.

The basic idea is that you set $useTable to false in the model, and  
just write your own find and findAll() functions based on LDAP  
queries rather than SQL queries.

The LDAP connection happens in the model constructor, and I also  
close the connection using __destruct().

It should be pretty easy if you're already using working code to do  
this.

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



Re: Something like RJS

2006-05-05 Thread RosSoft

Why do you need to access the view object? Exactly what do you want to
do?
Do a print_r($this); from a helper function to see what objects are
accessible (the view and the controller aren't directly accessible)

If you really need to access the view, create a function within the
helper like

function init(&$view)
{
$this->view =& $view;
}

Then in your view, call $myhelper->init($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
-~--~~~~--~~--~--~---



Extending the blog tutorial to include login?

2006-05-05 Thread roberts.sean

The blog tutorial was great, but I think it left out a crucial step:
securing it from malicious users who want nothing more than to make a
series of "hahaha lol owned you" posts on your blog.  The section in
the manual on ACL was interesting, but it said that you should already
have your own user authentication setup.  The rdAuth tutorial in the
Wiki was confusing at best.

Does anyone know of a tutorial that extends the blog tutorial to
include a minimal amount of security?  I've gotten as far as writing a
small script to determine whether or not a user's login credentials are
any good, but when it comes down to making this persistent among my
pages I'm pretty lost!

If anyone knows of a tutorial like this, or can explain to me how I
would go about maintaining a persistent "logged in" status for a user
among different models and controllers I would really appreciate it.

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



Re: Newbie problems

2006-05-05 Thread BoBB
Instead of checking to see if $this->Post->save() works and then erroring out if it doesn't, check on $this->Post->validates() and if that works, then save the data. I had a similar problem with validations and thats how i got it to work.
On 5/5/06, tinmar <[EMAIL PROTECTED]> wrote:
I try to validate but i can't see error messagethe  Model :class Post extends AppModel{var $name = 'Post';var $validate = array('title'  => VALID_NOT_EMPTY,
'body'   => VALID_NOT_EMPTY);}The controler and add methodclass PostsController extends AppController{var $name = 'Posts';function index()
{$this->set('posts', $this->Post->findAll());}function view($id = null){$this->Post->id = $id;$this->set('post', $this->Post->read());
}function add(){if (!empty($this->data)){if ($this->Post->save($this->data)){$this->flash('Your post has been saved.','/posts');
}}else{$this->validateErrors($this->Post);//set the values for thetagErrorMsg  $this->render();}}
}?>And the viewAdd Posturl('/posts/add')?>">
Title:input('Post/title', array('size' =>'40'))?>atagErrorMsg('Post/title', 'Title isrequired.') ?>a
Body:textarea('Post/body', array('rows'=>'10'))?>btagErrorMsg('Post/body', 'Body is required.') ?>b
submit('Save') ?>Thanks in advanceTinmar
--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

TracyB,

done by cake

~rpeterson

>Is there something that has to be done to initialize the session? or is
>that done automatically by cake?
>
>
>>
>
>  
>


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread TracyB

Is there something that has to be done to initialize the session? or is
that done automatically by cake?


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



LDAP AppModel?

2006-05-05 Thread elijah

I am working on an interface for managing scalable mail systems (to be
released under GPL) and I would like to use Cake!

The user directory is stored in LDAP. I have a bunch of PHP code which
uses reflection and crude to access the LDAP data in a clean way, and I
want to convert it over to cake.

Has anyone done this already? Do people know of example code I could
look at for a Model which doesn't use SQL? I see a lot of SQL specific
stuff in the Model class... will this be a problem? Do I need to just
create a new datasource, or will I also need a new Model class?

A search of LDAP in this group returns this post:

http://groups.google.com/group/cake-php/browse_thread/thread/10725875f0daa3d7/81445a990af7379f

> From: olle
> Andreas,
> The newer Datasources in Cake are created to enable this kind of
> datasources as Model-fodder.
> Someone used LDAP data instead of database rows this week, and a
> webservice shouldn't be impossible either (the Datasource ideas came
> about with webservices, and RSS feeds and such, in mind).

Sounds like just what I want. Any idea how I could track down the
someone using LDAP data instead of database rows?

thanks,
-elijah


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

TracyB ,

Ignore that last email. I will figure out whats up, commenting it out 
wouldnt work cause then the variables wouldnt be int he session. duh.

~rpeterson

>Thanks for the swift fix :)
>
>I'm getting another issue now though - I deleted the old installation
>and have no files except the new ACM in plugins, and user.php and
>permission.php (empty models) in the models directory.
>
>When I try to go to http://mysite/acm, I get:
>
>Fatal error: Call to a member function write() on a non-object in
>C:\xampp\htdocs\cake\app\plugins\acm\config.php on line 23
>
>It seems to have a problem with:
>$this->Session->write('ACM.AutoLoad',false);
>
>If I knew more PHP I'd just try to fix it myself, but I come from an
>ASP(ick) background.
>
>Tracy
>
>
>>
>
>  
>


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

TracyB,

>Fatal error: Call to a member function write() on a non-object in
>C:\xampp\htdocs\cake\app\plugins\acm\config.php on line 23
>
>It seems to have a problem with:
>$this->Session->write('ACM.AutoLoad',false);
>
I will look at it here to see if I can figure out whats up. For now, you 
can simply comment out the AutoLoad settings by just adding // to each 
of the lines so:

$this->Session->write('ACM.AutoLoad',false);

will become

//$this->Session->write('ACM.AutoLoad',false);

I will work on figuring out why it is not able to use the session object.

~rpeterson



--~--~-~--~~~---~--~~
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 installation on Wamp

2006-05-05 Thread graylag

Thanks Troy.  I was running the latest release of Cake 1.0.1.2708 that
threw the error.  I rolled back to verson 0.10.9.2378_final which works
fine.


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread rpeterson

Hey All!

Ok, I uploaded a new release ACM 0.10.0.7 that will work with CakePHP
1.0, also added Install instuctions in docs and in the notes of the
release. See the change log for what was done.

Let me know if you have other issues.

~rpeterson


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread TracyB

Thanks for the swift fix :)

I'm getting another issue now though - I deleted the old installation
and have no files except the new ACM in plugins, and user.php and
permission.php (empty models) in the models directory.

When I try to go to http://mysite/acm, I get:

Fatal error: Call to a member function write() on a non-object in
C:\xampp\htdocs\cake\app\plugins\acm\config.php on line 23

It seems to have a problem with:
$this->Session->write('ACM.AutoLoad',false);

If I knew more PHP I'd just try to fix it myself, but I come from an
ASP(ick) background.

Tracy


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



OT: Tips on web-uploading 2.0

2006-05-05 Thread Martin Westin

I'd like to ask for tips on how to improve uploading of files in a
web-browser and at the same time present what I have found myself.

I am developing a really small filemanager really BIG files. I am
talking about anything from a few MB to a few GB files. Obviousy this
presents a few problems for the good old upload form.

Problem 1 - servers limit the maximum filesize. As I will primarily use
this on my own server I can set it any way I like.
Problem 2 - POSTing big multipart forms (files) requires the server to
decode the upload which uses lots of RAM and CPU. I have not tested at
which point my server crashes but I imagine a 4GB DVD image would do
the trick. I also have yet to try to force raw binary encoding in the
upload but I imagine sandbox sequrity will prevent me from doing to
much to the headers using something like javascript.
Problem 3 - There is a PUT request that can be made to configured
servers. This simply uploads raw binary filedata. Problem is you can't
do PUT request from browsers AFAIK. The only working example I have
seen is a Java Applet. Looking at Flash docs suggests it is not up to
the job either.
Problem 4 - the browser stalls for a lng time when uploading big
files. There are a few AJAX ways to get feedback to the user which is
good.

So what I can do to pretty up my uploads is to first make an AJAX
progressbar. This takes care of 10-100MB at least since the server can
handle those sizes. I can let the user upload many files at once in the
same form. This can also be "Ajaxed" if I want but all files are
bundled and POSTed as one large chunk of data, which is bad. I could
probably que them using some javascript/ajax callbacks.

I can also buy the only Java Applet I have found and use it even though
it is pretty ugly to look at. Links to the apples and other pages on
this topic below:

Upload applet as a price
http://upload.thinfile.com/

Ajaxed pretty uploader with source
http://labs.beffa.org/w2box/

Multi-file upload article
http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/

PHP PUT support
http://www.php-editors.com/php_manual/features.file-upload.put-method.html

W3C's own PUT application... really ugly java application
http://jigsaw.w3.org/Winie/help.html

Any tips, links to souce of articles and other ínfo greatly
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
-~--~~~~--~~--~--~---



Re: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread calzone

Ryan :)

There may be a lot of us because cake 1.x just got dugg this week and I
think there's been a massive newbie influx.

Thanks for your patience and persistence.


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



Newbie problems

2006-05-05 Thread tinmar

I try to validate but i can't see error message

the  Model :

class Post extends AppModel
{
var $name = 'Post';

var $validate = array(

'title'  => VALID_NOT_EMPTY,
'body'   => VALID_NOT_EMPTY

);

}

The controler and add method
set('posts', $this->Post->findAll());
}
function view($id = null)
{
$this->Post->id = $id;
$this->set('post', $this->Post->read());
}

function add()
{
if (!empty($this->data))
{
if ($this->Post->save($this->data))
{
$this->flash('Your post has been saved.','/posts');
}
}
else
{

$this->validateErrors($this->Post);//set the values for the
tagErrorMsg
  $this->render();
}

}
}

?>


And the view

Add Post


Title:input('Post/title', 
array('size' =>
'40'))?>atagErrorMsg('Post/title', 'Title is
required.') ?>a


Body:textarea('Post/body', 
array('rows'=>'10'))
?>btagErrorMsg('Post/body', 'Body is required.') ?>b


submit('Save') ?>



Thanks in advance 
Tinmar


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

TracyB,

I found some issues, I just realized I was still running 0.1 of cake so 
I am working on getting some bugs worked out of it here with 1.0 and 
will get it updated as soon as I get it all working.

Ryan

>I would jump on IRC if I weren't at work :) Ports blocked and all that.
>I just downloaded cake from the cakephp.org website today, so I'm
>guessing I'm running the most recent - 1.0.1.2708.
>
>I created an empty user and permission model because the first errors
>were looking for models for those 2 tables (i have a permissions table
>rather than a roles table). Those are the only files I have in addition
>to the ACM folder in plugins.
>
>Now, I'm not sure if this would affect anything, but I'm running cake
>from a subdirectory rather than the documentroot. I can change this to
>test if you like.
>
>Thanks,
>Tracy
>
>
>>
>
>  
>


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Dominik Schlütter

Hi,

TracyB wrote:

> I've downloaded the ACM plugin and can see it by going to
> http://mysite/acm - however, I'm getting some errors even though I'm
> pretty sure I have my database set up right.

Yes, that's a problem that git introduces with the 1.0 release.

> SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause'

See

for a solution - if there's no database given, CakePHP inserts a blank
in fornt of the fieldname (inside the backticks).

> I created my database tables by looking at the fields listed in the
> cake\scripts\acl.php file and the column 'lft' does exist in both the
> aros and acos tables, so I'm not sure what the issue is.

Your database is probably correct, that has to be changes in the ACM
plugin.


Regards,

Dominik.


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread TracyB

I would jump on IRC if I weren't at work :) Ports blocked and all that.
I just downloaded cake from the cakephp.org website today, so I'm
guessing I'm running the most recent - 1.0.1.2708.

I created an empty user and permission model because the first errors
were looking for models for those 2 tables (i have a permissions table
rather than a roles table). Those are the only files I have in addition
to the ACM folder in plugins.

Now, I'm not sure if this would affect anything, but I'm running cake
from a subdirectory rather than the documentroot. I can change this to
test if you like.

Thanks,
Tracy


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

calzone,

I just realized I was working with cake 0.1 so I am working on fixing it 
up to make sure it all works with 1.0

Ryan

>Hi Ryan,
>
>I'm running cake_1.0.1.2708
>
>I'm not sure why my plugins dir wouldn't be readable by my webserver,
>it's below the site root and I'm pretty sure everything gets permission
>masked upon creation and upload.  open_basedir certainly has access to
>it if that's what you mean?
>
>Maybe I can take a peek at the documentation in the source if it's on
>the index page ;)
>
>Thanks much for your help (and for putting this together in the first
>place).
>
>
>>
>
>  
>


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread calzone

Hi Ryan,

I'm running cake_1.0.1.2708

I'm not sure why my plugins dir wouldn't be readable by my webserver,
it's below the site root and I'm pretty sure everything gets permission
masked upon creation and upload.  open_basedir certainly has access to
it if that's what you mean?

Maybe I can take a peek at the documentation in the source if it's on
the index page ;)

Thanks much for your help (and for putting this together in the first
place).


--~--~-~--~~~---~--~~
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: pretty URL's problem

2006-05-05 Thread ivan

I'm working on a windows machine.

should that make any diference?


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

Tracy,
The best place I would be able to help you is if you could jump on the 
irc channel #CakePHP , but if not I will attempt to assist you in 
getting ACM running. I am really excited to get it as easy to install 
and setup as possible.

First, what version of Cake are you using? Just so I have a record of 
what install people are having issues with.

Have you loaded any controllers into the system yet? I may need to make 
some adjustments on the order by lft query to see if ACO or AROS exist.

I will get back to you with more information once I have lookied into it 
a little further.

~rpeterson




--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread TracyB

Hi there:

I've downloaded the ACM plugin and can see it by going to
http://mysite/acm - however, I'm getting some errors even though I'm
pretty sure I have my database set up right.

For instance, I get:

SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause'
Warning: Invalid argument supplied for foreach() in
C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on
line 63

SQL Error in model Aco: 1054: Unknown column ' lft' in 'order clause'
Warning: Invalid argument supplied for foreach() in
C:\xampp\htdocs\cake\app\plugins\acm\controllers\acm_controller.php on
line 80

when I go to the "Permissions" page.

When I go to "Managed Controllers" I get:
Warning: Invalid argument supplied for foreach() in
C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line
4

And when I go to "Users & Groups" I get:

SQL Error in model Aro: 1054: Unknown column ' lft' in 'order clause'
Warning: Invalid argument supplied for foreach() in
C:\xampp\htdocs\cake\app\plugins\acm\views\acm\privileges.thtml on line
4

I created my database tables by looking at the fields listed in the
cake\scripts\acl.php file and the column 'lft' does exist in both the
aros and acos tables, so I'm not sure what the issue is.

I'm able to AutoLoad users with no problems.

Anyhow, if this is something I screwed up, sorry to bother you :)
Tracy
rpeterson wrote:
> Hey Everyone!
>
> ACM Plugin is now ready to rock! We currently released version 0.10.0.4
> pending bug fixes to version 1.0. The project can be found at:
> http://cakeforge.org/projects/acm/ .
>
> What is ACM?
>
> ACM is a simple web-interface will plug into your exisitng CakePHP
> application by simply droping it into the plugin directory. Alowing you
> to easily manage your ACL Permissions.
>
> Note: Thie project was origonal called ACL Admin, since then we have
> decided to rename it and open it as a whole new project.
>
> I am usualy on irc if you have any questions.
>
> ~rpeterson
>
> **Many thanks to gwoo for all his help on geting this project
> available**


--~--~-~--~~~---~--~~
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: Using Oracle with Cake

2006-05-05 Thread [EMAIL PROTECTED]

The latest CakePHP 1.x has a dbo_odbc.php.  Have you tried setting up
your Oracle as ODBC and using that??


--~--~-~--~~~---~--~~
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: How to accomplish SELECT [not *] and WHERE clause?

2006-05-05 Thread [EMAIL PROTECTED]

findAll is only for performing a select on all or certain fields with
where clause.
findBySQL is deprecated.  Use query instead.
It also looks like query can be cached and execute cannot.

And if you are doing joins then I would SERIOUSLY recommend the
associations.


--~--~-~--~~~---~--~~
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: HABTM doesn't seem to be working

2006-05-05 Thread [EMAIL PROTECTED]

Sounds like you are on track.  You are modifiying an existing DBO file
to make the necessary changes to create valid SQL statement for Oracle.
 What other less obtrusive way could their be?  And what is not ideal?
You are making a new controller for Oracle that doesn't currenlty exist.


--~--~-~--~~~---~--~~
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 installation on Wamp

2006-05-05 Thread [EMAIL PROTECTED]

You know with WAMP you can right click in the toolbar and add new
directories like nothing.  So, you could put CakePHP and your app where
you want them and then just point WAMP to that app directory using the
WAMP in your system tray.

I am running WAMP on XP x64 and don't get this problem.  Try deleting
everything and extracting all files again.


--~--~-~--~~~---~--~~
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: Setup problems on linux

2006-05-05 Thread [EMAIL PROTECTED]

I made one change to the bootstrap.php file so that my cake directory
actually resides in my app directory.  Then I can just copy my app
directory to any documentroot and run www.domain.com/app and know that
everything for that app is in one directory.

So, look at bootstrap files.  I think it is either index.php or
bootstrap.php in the webroot directory where you make app_dir and
cake_root look the same.


--~--~-~--~~~---~--~~
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: IBM DB2

2006-05-05 Thread hems


williamn wrote:
> Hi all,
>
> Can I use CakePHP with IBM DB2?
> 
> Thanks,
> --William

yes  we can use na
iam  also  working on tht


--~--~-~--~~~---~--~~
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: Access Control Manager (ACM) Plugin Now Available!

2006-05-05 Thread Ryan J. Peterson

calzone,

I apologize for not having any documentation available at the moment, I 
have it on the index page not thinking that you wouldn't be able to read 
that if it didn't install correctly, I will post some shortly. What 
version of cake are you running? Also make sure that your plug-ins dir 
is readable by your web server. I will be on IRC today and this evening 
so feel free to jump on.

~rpeterson

>care to explain how to get this working?
>
>there seems to be zero documentation at cakeforge or in the download.
>
>the closest I got was a lucky guess to go to mysite.com/acm at which
>point I got:
>
>Warning:
>loadplugincontroller(/var/www/vhosts/mysite.com/httpdocs/app/plugins/acm/acm_app_controller.php):
>failed to open stream: Permission denied in
>/var/www/vhosts/mysite.com/httpdocs/cake/basics.php on line 303
>
>Fatal error: loadplugincontroller(): Failed opening required
>'/var/www/vhosts/mysite.com/httpdocs/app/plugins/acm/acm_app_controller.php'
>(include_path='.:/usr/share/pear:/var/www/vhosts/mysite.com/httpdocs:/var/www/vhosts/mysite.com/httpdocs/app/')
>in /var/www/vhosts/mysite.com/httpdocs/cake/basics.php on line 303
>
>
>>
>
>  
>


--~--~-~--~~~---~--~~
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: News rss

2006-05-05 Thread h3raLd

Ciao Davide,

è bello vedere anche qualche italiano in questo newsgroup, di tanto in
tanto :)

Yes, CakeBaker is one of the most frequently updated Cake-related
blogs, but there are also many others... I keep a list on my site of
various Cake-related blogs, articles and resources:

http://www.h3rald.com/tags/show/cakephp/

Happy baking!


--~--~-~--~~~---~--~~
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: Setup problems on linux

2006-05-05 Thread MJ Ray

On 2006-05-05 04:14:44 +0100 lifebythedrop <[EMAIL PROTECTED]> 
wrote:

> I'm trying to setup cake on a linux server with apache. I do not have
> access httpd.conf, so my DocumentRoot is locked as www.  Here is my
> setup
> 
> DocumentRoot = /home/treetothee/www
> Core Cake = /home/treetothee/cake
> App Dir = /home/treetothee/app [...]

IMO, at the moment, the simplest is to put cake/ and all its contents 
(even app/) under your DocumentRoot. Once you get that working, *then* 
start moving things outside the docroot.

You will need mod_rewrite and permission to use it from your .htaccess

-- 
MJ Ray <[EMAIL PROTECTED]>  www.ttllp.co.uk  +44 870 4321 9 10
Web, localisation, koha, databases, gnu/linux and statistics
Registered in England and Wales, partnership number OC303457

--~--~-~--~~~---~--~~
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: News rss

2006-05-05 Thread MJ Ray

On 2006-05-04 09:22:41 +0100 davide <[EMAIL PROTECTED]> wrote:

> I was searching for a feed service about the news on cake[1].

http://cakebaker.wordpress.com/feed/rdf seems to carry most things of 
interest, although not an exact feed of the page you want.

-- 
MJ Ray <[EMAIL PROTECTED]>  www.ttllp.co.uk  +44 870 4321 9 10
Web, localisation, koha, databases, gnu/linux and statistics
Registered in England and Wales, partnership number OC303457

--~--~-~--~~~---~--~~
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: Multi user login

2006-05-05 Thread CraZyLeGs

othAuth
the latest version:
othy.wordpress.com/2006/04/28/othauth-01-is-about-to-be-released/

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