Re: To use App Controller or not to use

2011-01-05 Thread Slav
app_controller.php should go in /app ... not in /app/controllers On Jan 4, 11:00 pm, Joshua Muheim psybea...@gmail.com wrote: I don't know if that's your question, but yes you need to create a files app/controllers/app_controller.php; you should NEVER change anything in the cake directory, so

Re: memory allocation- no pages will load

2011-01-05 Thread vikram sharma
i think you need to increase the memory in php.ini file in xampp xampp\php\php.ini file incease memory . On Wed, Jan 5, 2011 at 7:05 AM, roundrightfarm roundrightf...@gmail.comwrote: Would this explain why a even a static page will not load? Literally none of my pages would load. Actually,

Re: Documenting a small CakePHP project: Best practices? --psybear

2011-01-05 Thread Joshua Muheim
OK, I downloaded the plugin, placed it in app/plugins/api_generator, and run the installation tutorial. The two tables have been created and populated with some stuff. But now I don't know how to open the API. I guess I have to open myapp.localhost/api_classes or something, but this is not found.

Re: memory allocation- no pages will load

2011-01-05 Thread AD7six
On Jan 5, 2:35 am, roundrightfarm roundrightf...@gmail.com wrote: Would this explain why a even a static page will not load?  Literally none of my pages would load. Actually, the problem fixed itself, with me doing nothing.  I first encountered the problem, walked away for about 2 hours,

Acl

2011-01-05 Thread Jens Dittrich
Hello everyone, I have a problem with Acl. I have an Application where my ACO's are my Controllers and their functions. My ARO's should be Roles that People are in. The setup looks like this: User hasOne Person Person hasAndBelongsToMany Roles In the tutorials the setup is simpler, there you have

Re: Acl

2011-01-05 Thread alaxos
Hi, AFAIK, the standard permission check done by the pair Auth + Acl only works if your users belong to one role only. If your users can have many roles, you are not in the standard Acl tree structure. This means that you will have to implement your own authorization logic. This may probably be

mvs framework

2011-01-05 Thread Miqdad Ali
i want to create my own mvc frame work from where i have to start ??? any suggessions Miqdad Ali http://www.miqdadali.co.cc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: mvs framework

2011-01-05 Thread AD7six
On Jan 5, 12:13 pm, Miqdad Ali mr.miqdad@gmail.com wrote: i want to create my own mvc frame work from where i have to start ??? a pen and paper? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

Re: mvs framework

2011-01-05 Thread Jeremy Burns | Class Outfit
Then maybe write to Google and ask them where they think you start writing a new search engine. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Jan 2011, at 11:20, AD7six wrote: On Jan 5, 12:13 pm, Miqdad Ali mr.miqdad@gmail.com wrote: i want to

Re: Acl

2011-01-05 Thread Jens Dittrich
Thank you for your answer. I already thought that belonging to more than one groups would break the standard Acl way. So what about this setup: User hasOne Person Person hasOne Role Can I use bindNode in User to bind it to Person and in Person bindNode to bind it to Role? Regards, Jens On 5

how to set minimum date for $form-input('date')

2011-01-05 Thread gilsilas
I know the attribute minYear and I aware that I can make validate in the model. but is there a way to print date field with minimum date and not only minimum year ? tnx, GIl. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

can you bypass model associations in a find

2011-01-05 Thread roundrightfarm
I'm having to do a find('all') with recursive = 2 to get at the data I need in my array. Unfortunately using this level of recursion also pulls in a bunch of unneeded data, creating a monster array which is stretching the memory limits. Is there some syntax (perhaps involving 'fields') that will

Re: can you bypass model associations in a find

2011-01-05 Thread Jeremy Burns | Class Outfit
The Containable behaviour is your very best friend: http://book.cakephp.org/view/1323/Containable Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Jan 2011, at 13:10, roundrightfarm wrote: I'm having to do a find('all') with recursive = 2 to get at the

Re: Using a helper in a view of the PagesController

2011-01-05 Thread Matthias
But I only want to load the helper in one specific page, not in all pages. I would do the first line ($this-helpers[] ...) in the action of the controller, if it were a normal controller. As described here: http://book.cakephp.org/view/1096/Using-Helpers Check out the new CakePHP Questions site

Re: Problem with virtual fields and a findBy Method which should return null (or empty)

2011-01-05 Thread OR
I fixed it, i should be careful using SUM Methods, cause they produce null-records... Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: How to get work PHPRtfLite in cake ???

2011-01-05 Thread Abu Zaid
Thanks Ryan, the problem is solved. This is how to use PHPRtfLite with cakePHP : 1. download PHPRtfLite and then extract to temporary folder. 2. Copy the lib Folder from PHPRtfLite to this folder : app/vendors/ 3. rename the lib folder with phprtf 4. make a new layout and give it named rtf.ctp.

Re: can you bypass model associations in a find

2011-01-05 Thread roundrightfarm
Thanks for your help. Got it to work... but can you please explain why this didn't work $orders = $this-Order-find('all', array('conditions'=array('Order.week_id'=$week_id)), array('contain' = array('Box' = array('Item'))) ); and

Re: Default Page

2011-01-05 Thread Nicolas400
Hi, thanks. But where is the controller ? Because I want to pick a random article from my model and show it using the home.ctp template. Best regards On 23 dic 2010, 02:38, Amit Badkas amit.sanis...@gmail.com wrote: Hi, By default CakePHP renders app/views/pages/home.ctp view for '/' URL,

Re: Default Page

2011-01-05 Thread Nicolas400
Hi, I found pages_controller.php !!! This is what I need. Best Regards. On 5 ene, 11:48, Nicolas400 nico.mach...@gmail.com wrote: Hi, thanks. But where is the controller ? Because I want to pick a random article from my model and show it using the home.ctp template. Best regards On 23

Handling spatial data in CakePHP

2011-01-05 Thread ehrlichja
I have a database with a field for spatial data and a cakephp interface for it. In MySQL I can save the data by doing: INSERT INTO nodes (Location) VALUES (GeomFromText('POINT(42.450071 -76.487664)')) How can I make Cake take the latitude and longitude from a web form and insert it in this

Dear All..

2011-01-05 Thread test test
I am Deepak. i am new to cake php.. can you please suggest me some good online tutorials to me. so that i can learn cake PHP faster.please help Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you

Re: Dear All..

2011-01-05 Thread AD7six
On Jan 5, 12:47 pm, test test test05041...@gmail.com wrote: I am Deepak. i am new to cake php.. can you please suggest me some good online tutorials to me. so that i can learn cake PHP faster.please help this is a pretty awesome resource: http://lmgtfy.com/?q=cakephp+tutoriall=1 Check out

Re: Handling spatial data in CakePHP

2011-01-05 Thread AD7six
On Jan 5, 3:01 pm, ehrlichja ehrlic...@gmail.com wrote: I have a database with a field for spatial data and a cakephp interface for it. In MySQL I can save the data by doing: INSERT INTO nodes (Location) VALUES (GeomFromText('POINT(42.450071 -76.487664)')) How can I make Cake take the

CSV Helper

2011-01-05 Thread sherzo
Hi All I'm using CSV helper to export my report as CSV. I added CSV in my controller and in my view I'm using the following codes: $line = array ( Parameter1,Parameter2); $csv-addRow($line); $line = array ( Parameter3,Parameter4); $csv-addRow($line); echo $csv-render('test.csv',

Re: mvs framework

2011-01-05 Thread mark_story
On Jan 5, 6:13 am, Miqdad Ali mr.miqdad@gmail.com wrote: i want to create my own mvc frame work from where i have to start ??? any suggessions Miqdad Alihttp://www.miqdadali.co.cc Instead of creating yet another PHP

Re: file download code

2011-01-05 Thread cricket
On Wed, Jan 5, 2011 at 12:20 AM, Miqdad Ali mr.miqdad@gmail.com wrote: $fl = http://localhost/uscb/app/webroot/.$fl_name; The path should be absolute from the root of the server, eg. /var/www/.. As Jeremy says, though, you should look at MediaView t do this. Check out the new

Re: how to set minimum date for $form-input('date')

2011-01-05 Thread cricket
On Wed, Jan 5, 2011 at 7:45 AM, gilsilas gilsi...@gmail.com wrote: I know the attribute minYear and I aware that I can make validate in the model. but is there a way to print date field with minimum date and not only minimum year ? You could set the $minYear as a class var then validate with

Re: can you bypass model associations in a find

2011-01-05 Thread cricket
On Wed, Jan 5, 2011 at 9:44 AM, roundrightfarm roundrightf...@gmail.com wrote: Thanks for your help.  Got it to work... but can you please explain why this didn't work $orders = $this-Order-find('all',                        array('conditions'=array('Order.week_id'=$week_id)),                

Video Points, Cost

2011-01-05 Thread chris...@yahoo.com
Hi guys, I need help with video points,... I'm creating feature that users can promote their videos, groups,... etc... in my social network site. In order to do that we need video promotion cost, which is in this case is points. And ADMIN can update points any time from control panel. Say default

Re: Help with odd controller issue when trying to add new action

2011-01-05 Thread Russell
Thanks! I'm not sure why, but setting debug to 2 actually caused it to immediately load correctly. I then set debug back to 0, and it continued to work. Not really sure why, but hey...whatever works. :-) Russell On Jan 4, 5:57 pm, cricket zijn.digi...@gmail.com wrote: On Sun, Jan 2, 2011 at

Re: Help with odd controller issue when trying to add new action

2011-01-05 Thread cricket
On Wed, Jan 5, 2011 at 5:58 PM, Russell russell.g.one...@gmail.com wrote: Thanks!  I'm not sure why, but setting debug to 2 actually caused it to immediately load correctly.  I then set debug back to 0, and it continued to work.  Not really sure why, but hey...whatever works. :-) Reset the

CakePHP + nginx + VPS

2011-01-05 Thread Dave Maharaj
Just curious if any one has set this type of install up. Cake on nginx? So far just getting everything set up and ended up with srv/www/domain.com/public_html/app = all my files I want to keep cake folder outside web access so I was going to use lib/{cakeversions}/cake Any tips /

Re: Dear All..

2011-01-05 Thread LipeDjow
LOL Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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

Re: CakePHP + nginx + VPS

2011-01-05 Thread Jon Bennett
Just curious if any one has set this type of install up. Cake on nginx? So far just getting everything set up and ended up with srv/www/domain.com/public_html/app = all my files I want to keep cake folder outside web access so I was going to use lib/{cakeversions}/cake Any tips /

RE: CakePHP + nginx + VPS

2011-01-05 Thread Dave Maharaj
Right on thanks. Will check his blog to. Dave I do: project (svn repository) trunk - libs - - cakephp - - - cakephp-version - app (named after the project usually) - - webroot - this is the nginx doc root. All you need in webroot/index.php for the above to work is to point cake at the correct

Re: CakePHP + nginx + VPS

2011-01-05 Thread Miles J
Ive done this many times, here's my nginx setup: domain1.com/ ---public/ --app/ ---private/ ---logs/ domain2.com/ ---public/ --app/ ---private/ ---logs/ The public folder contains the cake/php app files. Private contains anything that's shouldn't be accessible, and logs is logs. The

Re: export to excle

2011-01-05 Thread LipeDjow
Hi dude, You can use PHPExcel classes. http://www.phpexcel.net Import it to Cake with something like: App::import('Vendor', 'PHPExcel', array('file' = 'PHPExcel.php')); It worked like a charm for me. Check the documentation and examples to achieve your needs. HTH, LipeDjow Check out the new

Fatal Error

2011-01-05 Thread Dave Maharaj
Yep Im the on setting up the new install on nginx but something unrelated maybe? Im getting Fatal error: Call to undefined function mysql_query() in / libs/1.3.6/cake/libs/model/datasources/dbo/dbo_mysql.php on line 600 Anyone have anyideas why? The site im attempting to put up just came

Bootstrap access to a model?

2011-01-05 Thread Greg Skerman
Hi, So i've ditched the idea of having one controller call another. Instead, i've decided a better approach might be to use routes, and have custom routes stored in a database, added at runtime in bootstrap.php, and of course cached. This will allow people to define their own simple routes for

Re: Fatal Error

2011-01-05 Thread Andras Kende
Look like mysql module is not loaded, try: sudo aptitude install php5-mysql make sure ?php phpino(); shows mysql stuff too... Andras Kende http://www.kende.com On Jan 5, 2011, at 9:47 PM, Dave Maharaj wrote: Yep Im the on setting up the new install on nginx but something unrelated

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread Amit Badkas
Hi, What do you mean by It can't find the users controller? Isn't the logout link outputting the URL correctly and/or isn't the redirection in logout() action working correctly? Also you have used Configure::read('Routing.admin') to set the 'logoutRedirect' URL but as per the

Re: Video Points, Cost

2011-01-05 Thread Amit Badkas
Hi, The code in action uses $id but from where does it come/initialize? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Jan 6, 2011 at 1:55 AM, chris...@yahoo.com chris...@yahoo.comwrote: Hi guys, I need help with video points,... I'm creating feature that users

Re: Fatal Error

2011-01-05 Thread adilraufk...@gmail.com
just delete your all cache files in cache folder and refresh the browser ... might be it is just a cache problem, i had once experienced the same problem. On Jan 6, 7:47 am, Dave Maharaj m...@davemaharaj.com wrote: Yep Im the on setting up the new install on nginx but something unrelated maybe?

RE: Fatal Error

2011-01-05 Thread Dave Maharaj
Hmm.I know php was running because I did php info before putting cake. Just ran sudo command [..] 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. But will check phpinfo now. Thanks, Dave From: Andras Kende [mailto:and...@kende.com] Sent:

Re: file download code

2011-01-05 Thread Miqdad Ali
user download file first time it will download 0b file but after that it's downloading correct file Miqdad Ali http://www.miqdadali.co.cc On Thu, Jan 6, 2011 at 1:11 AM, cricket zijn.digi...@gmail.com wrote: On Wed,

RE: Fatal Error

2011-01-05 Thread Dave Maharaj
LOL the simple things! Maybe it's this or that... something complicated because surely deleting the cache just passes by even considering it! Thanks you very much! Back on track now :) Dave -Original Message- From: adilraufk...@gmail.com [mailto:adilraufk...@gmail.com] Sent:

RE: Fatal Error

2011-01-05 Thread Dave Maharaj
Nope still nothing. Got my hopes up for a second there. Said missing database driver but now back to the FATAL ERROR. From: Dave Maharaj [mailto:m...@davemaharaj.com] Sent: Thursday, January 06, 2011 1:31 AM To: cake-php@googlegroups.com Subject: RE: Fatal Error Hmm.I know php was

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread John Maxim
It's here: http://book.cakephp.org/view/1271/logoutRedirect $this-Auth-logoutRedirect = array(Configure::read('Routing.admin') = false, 'controller' = 'members', 'action' = 'logout'); It can't find the users controller from App/ .. since I enabled Admin routing I guess. Whenever I go to

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread John Maxim
and of course I meant this, typo: $this-Auth-logoutRedirect = array(Configure::read('Routing.admin') = false, 'controller' = 'users', 'action' = 'logout'); On Jan 6, 2:11 pm, John Maxim goog...@gmail.com wrote: It's here:http://book.cakephp.org/view/1271/logoutRedirect

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread Amit Badkas
Hi, Your explanation is somewhat confusing for me. But following is my attempt to explain you about the solution you need. First of all, if you looked at the description of 'logoutRedirect' parameter, it says 'specify where you want the user to go after they are logged out, with the default

Re: Fatal Error

2011-01-05 Thread Ryan Schmidt
On Jan 5, 2011, at 23:43, Dave Maharaj wrote: On Jan 5, 2011, at 9:47 PM, Dave Maharaj wrote: Im getting Fatal error: Call to undefined function mysql_query() in / libs/1.3.6/cake/libs/model/datasources/dbo/dbo_mysql.php on line 600 Got my hopes up for a second there. Said missing