Re: pretty URL problem
might be a long shot but the problem might have been in your url.. looking at it as you wrote it here it says hellworld.. My laymans guess with no knowledge of your code or naming scheme will come with one guess hellworld shoulda been helloworld if you copy pasted that from your address bar and it shoulda been helloworld.. maybe thats where the problem lay.But I might be wrong :-POn 5/14/06, upake [EMAIL PROTECTED] wrote: I think i found the solution, i was running php 4.3.2, upgraded to php5 seems to work fine now! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Database retrieval problem
Hi, I just installed CakePHP 1.0.1.2708 and followed the blog tutorial to get an idea of what CakePHP is all about. Although installation and the blog tut. went fine, I cannot get any data from the database. I do not get any errors. After setting the debug level to 3, I see that the variable that should contain the data retrieved from the database is empty. A test variable which I created in the controller, $this-set('tryout',This is a test); can be viewed in the view via 'echo Tryout is .$tryout'. No problem here. Connecting via the commandline to the database and performing a query on it, as the user configured in CakePHP, works. Is it because this version of CakePHP only works with PHP5 ? (still use PHP4 myself) Regards Moob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Unable to Load Controller with Ajax task list Tutorial by Graham Bird
I'm trying the Ajax task list tutorial at http://grahambird.co.uk/cake/tutorials/ajax.php. However, I am getting the following error when trying to load it: Fatal: Unable to load controller TasksController Fatal: Create Class: ?php class TasksController extends AppController { } ? I've copied and pasted the example, and even downloaded the example but still get the same error. I have 2 programs already working on this Cake installation so I don't think there are any problems there. I've posted the controller code below. Thanks in advance for any help ?php class TasksController extends AppController { var $name = 'Tasks'; //var $helpers = array('Html', 'Javascript', 'Ajax'); function index() { $this-set('data', $this-Task-findAll()); } function add() { if (!empty($this-params['data'])) { if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll()); $this-render('todo', 'ajax'); } else { // do nothing } } } function done($id) { $this-Task-id = $id; $this-params['data']['Task']['done'] = 1; if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } function undo($id) { $this-Task-id = $id; $this-params['data']['Task']['done'] = 0; if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll()); $this-render('todo', 'ajax'); } } function delete($id) { //if (isset($this-params['form']['id'])){ // $id = intval(substr($this-params['form']['id'], 5)); // } //end if $this-Task-del($id); //delete should return same as add $this-set('data', $this-Task-findAll()); $this-render('done', 'ajax'); } } ? --~--~-~--~~~---~--~~ 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: Database retrieval problem
I would make sure that in the controller class and in the model you define the $name varlike var $name = 'Tryout';in the model andvar $name = 'Tryouts';in the controller On 5/14/06, moob [EMAIL PROTECTED] wrote: Hi,I just installed CakePHP 1.0.1.2708 and followed the blog tutorial toget an idea of what CakePHP is all about. Although installation and theblog tut. went fine, I cannot get any data from the database. I do not get any errors.After setting the debug level to 3, I see that the variable that shouldcontain the data retrieved from the database is empty. A test variablewhich I created in the controller, $this-set('tryout',This is a test); can be viewed in the view via 'echo Tryout is .$tryout'. Noproblem here.Connecting via the commandline to the database and performing a queryon it, as the user configured in CakePHP, works. Is it because this version of CakePHP only works with PHP5 ? (still usePHP4 myself)RegardsMoob --~--~-~--~~~---~--~~ 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: Database retrieval problem
This is noted in the manualin the tutorialhttp://manual.cakephp.org/chapter/18and the sections for controller and model http://manual.cakephp.org/chapter/6 and http://manual.cakephp.org/chapter/7On 5/14/06, Samuel DeVore [EMAIL PROTECTED] wrote:I would make sure that in the controller class and in the model you define the $name var like var $name = 'Tryout';in the model andvar $name = 'Tryouts';in the controller On 5/14/06, moob [EMAIL PROTECTED] wrote: Hi,I just installed CakePHP 1.0.1.2708 and followed the blog tutorial toget an idea of what CakePHP is all about. Although installation and theblog tut. went fine, I cannot get any data from the database. I do not get any errors.After setting the debug level to 3, I see that the variable that shouldcontain the data retrieved from the database is empty. A test variablewhich I created in the controller, $this-set('tryout',This is a test); can be viewed in the view via 'echo Tryout is .$tryout'. Noproblem here.Connecting via the commandline to the database and performing a queryon it, as the user configured in CakePHP, works. Is it because this version of CakePHP only works with PHP5 ? (still usePHP4 myself)RegardsMoob --~--~-~--~~~---~--~~ 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: Unable to Load Controller with Ajax task list Tutorial by Graham Bird
what is the name of the file? is it tasks_controller.php?On 5/14/06, Reggie [EMAIL PROTECTED] wrote:I'm trying the Ajax task list tutorial at http://grahambird.co.uk/cake/tutorials/ajax.php.However, I am getting the following error when trying to load it:Fatal: Unable to load controller TasksControllerFatal: Create Class:?php class TasksController extends AppController{}?I've copied and pasted the example, and even downloaded the example butstill get the same error. I have 2 programs already working on this Cake installation so I don't think there are any problems there.I'veposted the controller code below.Thanks in advance for any help?phpclass TasksController extends AppController{ var $name = 'Tasks';//var $helpers = array('Html', '_javascript_', 'Ajax');function index() {$this-set('data', $this-Task-findAll()); }function add() {if (!empty($this-params['data'])) {if ($this-Task-save($this-params['data'])) {$this-set('data', $this-Task-findAll()); $this-render('todo', 'ajax');} else {// do nothing}}} function done($id) {$this-Task-id = $id;$this-params['data']['Task']['done'] = 1;if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll());$this-render('done', 'ajax');}}function undo($id) { $this-Task-id = $id;$this-params['data']['Task']['done'] = 0;if ($this-Task-save($this-params['data'])) { $this-set('data', $this-Task-findAll());$this-render('todo', 'ajax');}}function delete($id) { //if (isset($this-params['form']['id'])){ // $id = intval(substr($this-params['form']['id'], 5)); // } //end if$this-Task-del($id); //delete should return same as add$this-set('data', $this-Task-findAll());$this-render('done', 'ajax');}}? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routes question
Hi. I've read the docs about the routes, looked at the source but i can't figure out the purpose of :names in the route definitions. For what o can understand, :names are supposed to be matched in the URL in some special way that i can't understand. For example, can i extract a route component and passed it off as a parameter? For example: $Routes-connect('/:module/:controller/:action', array('controller'=':controller', action=':action', ':module')); With this, the controller would be the 2nd element and the action the 3rd. The first element would always be passed as a parameter to all actions. Can i do something like this? Can someone please shed some light on the subject? For what i can see, the router mechanism is a very powerful one, but IMHO is still lacking some doc. Thanks in advance. -- Gonçalo Marrafa [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 -~--~~~~--~~--~--~---
How to save NULL in a numerical field ? i.e how to get the quotes out of the SQL request.
Hi all, I'm wondering how to save the value NULL in a numerical field. Cake is doing `parent_id`='NULL'. In that case Mysql transforms NULL into 0 if it is a numerical field. I don't want 0, I want NULL to be stored. I read that "To set a date or numeric column to NULL, use an unquoted NULL or null or \N." (http://elib.cs.berkeley.edu/admin/mysql/nulls.html) Is there a way to get ridden of the quotes used by the save() function for this field ? Olivvv --~--~-~--~~~---~--~~ 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: Database retrieval problem
If that's from your index page, no search was performed and you haven't set the variable (or it has been set with something that isn't an array) which you later use in your view. You need to put $this-Post-findAll() back in your code somewhere Cheers, AD7six --~--~-~--~~~---~--~~ 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: Help understanding sessions
Thanks for the link AD7six. Good article that helps highlight the risks involved. I think that it also adds weight to the argument for developing a strong authentication module for Cake. Rolling your own is fine if you know what you are doing, but this article has pointed out the weaknesses in the authentication system I am using. Regards, Langdon AD7six wrote: Hi GregL, I think all you would need is a 'remember me' cookie to do what you are thinking about, there isn't anything complex about doing this as far as I can see - set a cookie with the username and password (encrypted) and check for the presence of the cookie when doing authentication. As for security, if you google for session security you'll get plenty of results and explenations. However, if you consider having session time outs of 1 month for your online bank account - it should be quite apparent why sessions have security implicaitons ;) Here's the first result I found: http://shiflett.org/articles/security-corner-feb2004 Cheers, AD7six --~--~-~--~~~---~--~~ 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: Help understanding sessions
Thanks for the link, that was very illuminating. It highlights my ignorance on one point: the relationship between a session and a cookie. I thought they were coupled, that the login info I want to store was stored in the session which was implemented as a cookie. Can I have the login info in a cookie of its own, and turn up security to high and have secure sessions with a one-month login cookie, and feel safe about 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 -~--~~~~--~~--~--~---
Cake Migrations available
Saw a post on this a while ago (http://groups.google.com/group/cake-php/browse_thread/thread/74e4ed3cf4dee595/b1368e18be1aaee3) and I had the idea, so I did it. Cake Migrations in CakePHP's answer to RoR Migrations. Take a look at http://joelmoss.info/2006/05/15/cake-migrations/ for info and the snippet. I would also love to get some feedback and what you would like to see more of. --~--~-~--~~~---~--~~ 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: hasOne relationship kills findAll()
Is there a way to debug SQL queries anywhere? --~--~-~--~~~---~--~~ 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 Migrations available
Hey that's pretty cool!. Thanks.On 5/14/06, joelmoss [EMAIL PROTECTED] wrote: Saw a post on this a while ago( http://groups.google.com/group/cake-php/browse_thread/thread/74e4ed3cf4dee595/b1368e18be1aaee3)and I had the idea, so I did it. Cake Migrations in CakePHP's answer toRoR Migrations.Take a look at http://joelmoss.info/2006/05/15/cake-migrations/ forinfo and the snippet.I would also love to get some feedback and what you would like to seemore of.www.dospuntocero.info --~--~-~--~~~---~--~~ 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: hasOne relationship kills findAll()
in config/core.php try upping the DEBUG define to 2 you can get a dump of the queries that way On 5/14/06, tom [EMAIL PROTECTED] wrote: Is there a way to debug SQL queries anywhere? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---