Re: Problems with Auth-userScope

2011-02-11 Thread zero00
I dont wanna use ACL. I was under the impresion if I had a db row that had usernamepassword admin user1 pass1 0 user2 pass2 1 by using Auth-userScope - user1 would be denied - user2 would be granted acess -- Our newest site for the community:

Re: Problems with Auth-userScope

2011-02-11 Thread Stephen
User 1 would not be allowed to login. User 2 would be allowed to login. userScope is usually used for things like email activation (If the user clicks the private link in the email, it goes to a unique url, which then sets the userScope to 1 from 0 and that user can then login) On 11 February

Re: views = 1234... numbers

2011-02-11 Thread Sam Sherlock
FWIW the suggestions made by Ryan Jeremy are better than using the Model Query method as you lose out on the cake auto magic with the method $this-Video-doIncrement($id); vs $this-Video-query('UPDATE fociki_videos' . ' SET views = views + 1' . ' WHERE id = ' . $video['Video']['id']); this

Mapping incoming data

2011-02-11 Thread RhythmicDevil
Hi, I am using a SOAP web service as my datasource. The data that the model fetches from the web service is a complex object (nested arrays and objects). I want to map this returned data to an object that my app will use internally. There a couple of reasons for this: 1. If the names of fields in

Re: Does the CakePHP ready for 'Large Scale' web applications?

2011-02-11 Thread majna
Cleaner solution for master/slave using callbacks (or Behavior) function beforeSave() { $this-useDbConfig = 'master'; return true; } function afterSave() { $this-useDbConfig = 'default'; return true; } function beforeDelete() { $this-useDbConfig = 'master'; return true;

Cake and SOAP

2011-02-11 Thread RhythmicDevil
Hi, I have an application that uses SoapSource for one of its datasources. The Web Service that I am using only defines one method: sendTransaction. The data set that is sent to this method includes an element called TransactionCommand that contains a string that represents the actual command I

Help with ReST

2011-02-11 Thread Poliane Brito
Hello ppl! I'm trying to do a webservice using ReST, but when I request * http://localhost/webservice/produtos/ *I'm getting an error message: Not Found *Error: * The requested address *'/produtos'* was not found on this server. - *core.php*

permissions seems to keep changing

2011-02-11 Thread barricades
Hi there, trying to learn cakephp and loving it for the most part. But just when I thought I'd finally figured out the acl and auth components things started to get a bit weird. A couple of nights ago I finally got everything working only to discover that after an hour or two I had managed to

Re: pagination in controller

2011-02-11 Thread euromark
why didnt you try it? On 11 Feb., 04:44, chris...@yahoo.com chris...@yahoo.com wrote: Hi guys,... a ??? How can I have two or more pagination in same controller? if I put to together like this, ... will it work?   var $paginate = array('order' = array('Gift.created' = 'desc'));   var

Re: pagination in controller

2011-02-11 Thread Stephen
Wouldn't it be : var $paginate = array('order' = array('Gift.created' = 'desc', 'GiftPhoto.created' = 'desc')); or var $paginate = array('Gift' = array('order' = array('Gift.created' = 'desc')), 'GiftPhoto' = array('order' = array('GiftPhoto.created' = 'desc'))); ? On 11 February 2011

HOW TO DO THIS.

2011-02-11 Thread sanjibdhar...@gmail.com
I have a table id buyer_id item_code contractor_id price dt item_name Now I want display dt(date) wise billing but contactor also will be in sequence like this: Contractorbuyer_id item_code price item_name A

Re: Help with ReST

2011-02-11 Thread Poliane Brito
Well, If I call *http://localhost/webservice/produtos/index.xml, this appears, but...* On Fri, Feb 11, 2011 at 10:00 AM, Poliane Brito poli.br...@gmail.comwrote: Hello ppl! I'm trying to do a webservice using ReST, but when I request * http://localhost/webservice/produtos/ *I'm getting an

Re: HOW TO DO THIS.

2011-02-11 Thread Mattijs
Well, You can't sum price directly in your query since you are showing each record individually as well, so I guess you'll need a combination. a) in your controller: find('all', array('order' = 'Contractor.name, Table.dt')) b) in your view: sum up price while iterating. Whenever you get a new

Re: pagination in controller

2011-02-11 Thread Mattijs
It's the latter - setting pagination options array for each model you are paginating. On 11 feb, 13:51, Stephen step...@ninjacodermonkey.co.uk wrote: Wouldn't it be : var $paginate = array('order' = array('Gift.created' = 'desc', 'GiftPhoto.created' = 'desc')); or var $paginate =

error: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted when writing session

2011-02-11 Thread pang
when I try to write session by using $this-Session-write('User', $someone['User']); php report this error: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted when writing session. but it only happens for some users, not all. How could be the reason, I am pretty annoyed by

Re: error: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted when writing session

2011-02-11 Thread Jon Bennett
when I try to write session by  using $this-Session-write('User', $someone['User']); php report this error:  PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted when writing session. but it only happens for some users, not all. How could be the reason, I am pretty annoyed by

Re: HOW TO DO THIS.

2011-02-11 Thread sanjib dhar
What will be the function like?Can you please send me.I am new in cakephp. On Fri, Feb 11, 2011 at 6:55 PM, Mattijs mattijsmeib...@hotmail.com wrote: Well, You can't sum price directly in your query since you are showing each record individually as well, so I guess you'll need a combination.

Re: Cakephp App::import() broken

2011-02-11 Thread LunarDraco
You might want to remove your closing ? tag in the imported file(s). It is not needed in a pure php file (those that DON't mix php and html) which does not have any raw/html text to be displayed. And it will ensure you have no problem with a trailing whitespace. Which I think is probably the #1

Re: SWF Uploader ... or any Good One...?

2011-02-11 Thread huoxito
I used uploadify once and worked great though the app was not built on cakephp., lookin forward to try to implement it with cakephp -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help

Re: permissions seems to keep changing

2011-02-11 Thread barricades
By the way, I've been following the tutorial in the book about how to implement a simple acl and auth system plus the tor tutorial http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake2/index.html to make my permissions table i use function initDB() { $group =

Re: RE: HABTM w/ Multiple Select type Field and saveAll() on multiple records.

2011-02-11 Thread OldWest
Thanks for all of the comments. But nothing seems to be resolving this. I posted my code for the View, Controller and Model w/ a debug() dump. I am able to insert a single record just fine, but when it comes to adding multiple records, the index in the array becomes numerical and it needs to

Build a string from resultset array (following example)

2011-02-11 Thread rgreenphotodesign
I've followed the example listed on [url]http://nuts-and-bolts-of- cakephp.com/2008/05/13/build-a-string-from-a-resultset-array/[/url] to build a string to pass to a find IN statement. All looks to work expect it's encasing the new string in quotes. Here is what I have so far using cake 1.3.7

Re: Build a string from resultset array (following example)

2011-02-11 Thread rgreenphotodesign
I changed the query to this and it works, but not sure it's very Cakeish $conditions = array('Model.id IN ('.$stringOfIds.')'); On Feb 11, 2:01 pm, rgreenphotodesign rgr...@rgreenphotography.com wrote: I've followed the example listed on [url]http://nuts-and-bolts-of-

Re: Build a string from resultset array (following example)

2011-02-11 Thread Jeremy Burns | Class Outfit
You can use an array in the conditions: 'conditions' = array('Model.id' = $array) ...which does an 'IN' query, in which case you don't need to do the extracting etc. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Feb 2011, at 21:14, rgreenphotodesign

Re: SWF Uploader ... or any Good One...?

2011-02-11 Thread Meroe Meroe
I use meioupload. You have to ask yourself if you really need the javascript stuff or do you just need something that uploads without the bells and whistles. On Fri, Feb 11, 2011 at 2:32 PM, huoxito huox...@gmail.com wrote: I used uploadify once and worked great though the app was not built on

Re: SWF Uploader ... or any Good One...?

2011-02-11 Thread Shinya Koizumi
meioupload is there a demo page i can look? I went to the page wasn't able to find. i found the problem with uplodify is the button doesn't work on ipad since it's the browse button is flashswf file. I also need a uploader but not flash based but if it has the progressbar that would be great.

can any1 tell me whats the better image manager to work with CKeditor?

2011-02-11 Thread todbull
yah, i need to implement a img manager with CKeditor on my cakephp and i wanna know if u guys can help me out... thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with

Re: How to inherit / extend a content class

2011-02-11 Thread mfrday
Thanks for the reply Sam. I don't think I will have shared functionality per se, but I am trying to avoid putting all of the fields that are in the content table on each of the other tables / classes. I was thinking it would be best to use a single base class db table to store all of the

Populates Multiple Select but does not save selects

2011-02-11 Thread John H.
Hi all, I am working on a project for a client and had a programmer create the app. Funding is out so I am taking over the project myself and have little/no knowledge of cakePHP (I have used codeIgniter instead). I am having problems getting a multiple select to work. Can someone help? The

XML DataSource or solution

2011-02-11 Thread Carlos Paparoni
Hi everyone, I'm new to CakePHP and started using it in hopes of developing a project assigned to me in a course at my university as quickly as possible. The project requires that I avoid the use of databases completely, relying on XML files (or rather, file) to load, display, add, remove, search

Redirect URL format not as expected.

2011-02-11 Thread adam_g2000
Hi Guys, Firstly, this is my first post, so please be gentle and my apologies for any inevitable faux pas should I make any. Secondly, I am aware there seems to be much confusion around redirect, I have been studying both the Cookbook, CakePHP Application Development (Book) and a series of

cakephp on plesk

2011-02-11 Thread alexpes
I would install cakephp on plesk with this folders structure: /httpdocs/ - documentroot /httpdocs/app /httpdocs/cake I know it's not canonical structure but, for security reason, is it sufficient put this .htaccess... Order Allow,Deny Deny from All ...in app and cake folder? So doing app and

User to change password

2011-02-11 Thread Ed
I am new to Cake but, am diving in head first... I've tried several different types of coding examples on how to allow a User to change their password. This is the version I am trying and we (my group) do have Auth working, so 'User' needs to be Auth.User ... Can anyone give me an idea why it

HBTM with more than 2 ids

2011-02-11 Thread msujit
Hello all.I am learning and doing projects on PHP.While designing database i often come into situation where i need to join more than two tables.for example i have tables 1.users 2.works 3.certificates 3.exams users HBTM works and works HBTM users.so i created users_works table.but the problem is

WS - Security I

2011-02-11 Thread Wils
Hi all, Please, how could I implement ws security level I in cakephp? Is there any component? Behavior? I've been looking at the book without success :( Tkx Wils -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

pregunta

2011-02-11 Thread c.pfar...@gmail.com
Hola gente, escribo para hacer una consulta que no se cual es la forma más conveniente de resovlerla. Resulta que tengo un controlador con un Alta baja y modificación y lo quue quiero hacer es un log de todas las acciones que lleva el usuario logueado... por ejemplo si el usuario agrega una nueva

Re: Build a string from resultset array (following example)

2011-02-11 Thread rgreenphotodesign
Perfect! Thanks Jeremy. On Feb 11, 2:23 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: You can use an array in the conditions: 'conditions' = array('Model.id' = $array) ...which does an 'IN' query, in which case you don't need to do the extracting etc. Jeremy Burns

Re: SWF Uploader ... or any Good One...?

2011-02-11 Thread Sam Sherlock
check CakePHP Video Tutorials http://tv.cakephp.org for info on meio - not sure if it does progress bar moxiecode (makers of tiny mce) make a uploader that has html5 option that has progress bar -- you have to build it with ant https://*github*.com/*moxiecode*/*plupload * - S On 11

Re: can any1 tell me whats the better image manager to work with CKeditor?

2011-02-11 Thread Meroe Meroe
Need more input, lots! What issues are you having? On Thu, Feb 10, 2011 at 9:25 AM, todbull rkdesig...@gmail.com wrote: yah, i need to implement a img manager with CKeditor on my cakephp and i wanna know if u guys can help me out... thanks -- Our newest site for the community: CakePHP

Re: User to change password

2011-02-11 Thread Ryan Schmidt
On Feb 11, 2011, at 00:13, Ed wrote: I am new to Cake but, am diving in head first... I've tried several different types of coding examples on how to allow a User to change their password. This is the version I am trying and we (my group) do have Auth working, so 'User' needs to be Auth.User

Re: HOW TO DO THIS.

2011-02-11 Thread euromark
HOW TO DO THIS is not an appropriate title for your thread! by the way On 11 Feb., 18:27, sanjib dhar sanjibdhar...@gmail.com wrote: What will be the function like?Can you please send me.I am new in cakephp. On Fri, Feb 11, 2011 at 6:55 PM, Mattijs mattijsmeib...@hotmail.com wrote:

Re: WS - Security I

2011-02-11 Thread euromark
what is ws security level I? On 11 Feb., 13:23, Wils wils.soluti...@gmail.com wrote: Hi all, Please, how could I implement ws security level I in cakephp? Is there any component? Behavior? I've been looking at the book without success :( Tkx Wils -- Our newest site for the community:

Re: User to change password

2011-02-11 Thread euromark
even better: use $this-Auth-password() from the auth component (if you use it) On 11 Feb., 23:21, Ryan Schmidt google-2...@ryandesign.com wrote: On Feb 11, 2011, at 00:13, Ed wrote: I am new to Cake but, am diving in head first... I've tried several different types of coding examples on

Re: pregunta

2011-02-11 Thread Alejandro Gómez Fernández
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fijate aca: http://book.cakephp.org/view/1194/Logging#!/view/1194/Logging El capitulo 4.6 completo del manual seguramente va a servirte. Si necesitas alguna otra cosa, podes probar buscando en The Bakery que hay un componente o plugin (no

New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Krissy Masters
I do not think it matters if your new and need help or old cakepro and need help. Why the need to emphasize? New you say! Are you? Well then let me just drop everything, BREAKING NEWS! A NEW USER TO CAKE! Holy shit say it's not so! People on the board for more than a month can tell by the name

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Larry E. Masters
Old hag might get some of us old timers attention. -- Larry E. Masters On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters naked.cake.ba...@gmail.comwrote: I do not think it matters if your new and need help or old cakepro and need help. Why the need to emphasize? New you say! Are you? Well

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread thatsgreat2345
I think the ability to say whether you're new/old doesn't depend on how long you've been using cake but you knowledge of the ins and outs of cake and how it all works. On Feb 11, 4:52 pm, Krissy Masters naked.cake.ba...@gmail.com wrote: I do not think it matters if your new and need help or old

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Ryan Snowden
Or Noobhag Neat On 12 February 2011 09:04, Larry E. Masters php...@gmail.com wrote: Old hag might get some of us old timers attention. -- Larry E. Masters On Fri, Feb 11, 2011 at 6:52 PM, Krissy Masters naked.cake.ba...@gmail.com wrote: I do not think it matters if your new and need help

Re: XML DataSource or solution

2011-02-11 Thread Carlos Paparoni
To make an update on the situation: I made the code work with the Array DataSource up to a point. The problem right now is that it uses a $records array which is assigned statically in the Model, like this: ?php class State extends AppModel { var $name = 'State'; var $useDbConfig

Joins across tables?

2011-02-11 Thread Krissy Masters
Just curious if joins across database tables are supposed to work? Same server just different databases. Set up my public $useDbConfig = 'dataDb'; public $useDbConfig = 'optiDb'; (in each model depending on its db obviously) but now queries come across SQL Error: 1146: Table

Re: HOW TO DO THIS.

2011-02-11 Thread sanjib dhar
*HOW TO DO THIS is not an appropriate title for your thread! by the way *this means u don't know the answer right. On Sat, Feb 12, 2011 at 5:10 AM, euromark dereurom...@googlemail.comwrote: HOW TO DO THIS is not an appropriate title for your thread! by the way On 11

Re: Redirect URL format not as expected.

2011-02-11 Thread Jeremy Burns | Class Outfit
Take out your customer route - you don't need it. Just use links in the format: echo $this-Html-link( 'Text', array( 'controller' = 'controller_name', 'action' = 'action_name', $variable ) ); Cake will sort the rest out for

RE: HOW TO DO THIS.

2011-02-11 Thread Krissy Masters
Seriously? Euromark is a name I look for in responses because he knows what he is talking about! But after that comment I doubt you will see many responses to any of your questions. From SanJib = delete message. Also if you knew how to ask a question then maybe someone could answer it. K --

Re: HOW TO DO THIS.

2011-02-11 Thread Jeremy Burns | Class Outfit
Very respectful. Well done. I suspect he does know the answer. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Feb 2011, at 04:24, sanjib dhar wrote: HOW TO DO THIS is not an appropriate title for your thread! by the way this

Re: New vs Old and need help - FEMALE NEEDS HELP!

2011-02-11 Thread Jeremy Burns | Class Outfit
A couple of things get to me: - Really really long posts - get to the frikking point - Swathes of badly formatted code that no one is going to read - Constantly being 'new' - Asking for massive amounts of help before doing any research at all - Asking if something will work before even trying it -

Re: HOW TO DO THIS.

2011-02-11 Thread sanjibdhar...@gmail.com
OK sorry. On Feb 12, 9:58 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Very respectful. Well done. I suspect he does know the answer. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 12 Feb 2011, at 04:24, sanjib dhar wrote:

Re: Joins across tables?

2011-02-11 Thread ShadowCross
It works for me: class Country extends AppModel { var $useDbConfig = 'iso'; } class Address extends AppModel { var $useDbConfig = 'default'; var $belongsTo = array( 'Country' = array( 'className' = 'Country' ) ); } Whenever I access the Address

Re: Populates Multiple Select but does not save selects

2011-02-11 Thread ShadowCross
In your offers_controller.php, are you using $this-Offer-save() or $this-Offer-saveAll() ? (See: http://book.cakephp.org/view/1031/Saving-Your-Data to review the explanation of each). On Feb 10, 10:58 am, John H. john.ham...@gmail.com wrote: Hi all, I am working on a project for a client and

Re: HOW TO DO THIS.

2011-02-11 Thread sanjib dhar
solved by view sln. On Sat, Feb 12, 2011 at 10:43 AM, sanjibdhar...@gmail.com sanjibdhar...@gmail.com wrote: OK sorry. On Feb 12, 9:58 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Very respectful. Well done. I suspect he does know the answer. Jeremy Burns Class

Re: How to inherit / extend a content class

2011-02-11 Thread ShadowCross
Have you considered something like: Bookmark hasOne Content Message hasOne Content Post hasOne Content Content belongsTo Bookmark foreignKey = 'model_id' conditions 'model' = 'Bookmark' belongsTo Message foreignKey = 'model_id' conditions 'model' = 'Message' belongsTo

Re: Problems with Auth-userScope

2011-02-11 Thread ShadowCross
Have you tried moving the line parent::beforeFilter() below the lines where you set the AuthComponent variables (or possibly removing it alltogether)? It may be that the AuthComponent's loginAction is being processed in the AppController's beforeFilter(), before the userScope is being set in