Re: my .htaccess only in documentroot can be use, other .htacess can't be use
Don't spam the group with duplicate problems. Describe/show your directory structure and .htaccess files. The reason nothing else but the index works is because your htaccess files are not functioning correctly. On Jan 1, 10:27 pm, RIMOE wrote: > hi, > everyone, > happy new year. > > my site only inhttp://test.mysite.com can be show very good(can saw the > green css) > but thehttp://test.mysite.com/mails cann't be show anything > thehttp://test.mysite.com/index.php/mails can be show ,have no the css and > pic > > what can I do for the question. > my apache setting > > > Allowoverride All > > > Allowoverride All > > > Allowoverride All > > > thanks > > limeng --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem Cake php
Ugh.. That's normal debug data. Set debug to 0 in config/core.php to turn this off. On Dec 31, 4:29 am, garza2002 wrote: > I have CakePHP v 1.0.0.2363. It is working fine in my actually server. > But i want to transfer to another server. In this new server with the > same configuration i obtain this error when i make a consult to the > database through a controller. > > 2 queries took 1 ms Nr Query Error Affected Num. rows Took (ms) > 1 DESC `sections` 14 14 1 > 2 SELECT `Section`.`id`, `Section`.`name`, `Section`.`parent_id`, > `Section`.`title`, `Section`.`content`, `Section`.`description`, > `Section`.`url`, `Section`.`controller`, `Section`.`order`, > `Section`.`hits`, `Section`.`accesskey`, `Section`.`enabled`, > `Section`.`admin`, `Section`.`static` FROM `sections` AS `Section` > WHERE (`Section`.`url` = 'n1302-felices-fiestas') LIMIT 1 > > I hope you can help me. > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
I'd like to help, but It's way too late for me to be reading that bad of a run-on sentence. Could you try rephrasing the question with some punctuation? On Dec 26, 10:04 pm, mona wrote: > thanks for the reply but when i click on add button to submit the form > value in the database it is displaying the error like array to string > conversion something like that how to print the value of array you me > the above link but in all that page file uploading having different > table different controller so can i make new table for file uploading > and but i want to store file data in my main table enteries how can i > do that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem related to dropdown box
http://groups.google.com/group/cake-php/browse_thread/thread/5ff7e9219837cb61/a39bdc58592a8133?lnk=gst&q=dropdown+belongsto#a39bdc58592a8133 On Dec 26, 11:46 am, mona wrote: > How to fetch data from a database and display in dropdown box. > For e.g i have one table enteries and another table name as section > when i add new entry then at my add view all the section should > display in dropdown box and i have section_id field in entry table > because i m saving only id of the section in the entry table so how to > do this and i have one more field submenu it should also display its > content in dropdown box and when i change value in section dropdown > menu the content of sub menu dropdown box also change --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model association
var $hasmany = array('People', 'Post', 'Tag); On Dec 26, 11:51 am, mona wrote: > How to make association between three of four tables because i m > fetching data on my table from three different tables --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to change the layout of your pages in cake php
Also, more controller properties: http://book.cakephp.org/view/51/Controller-Attributes On Dec 26, 12:27 pm, MikeB wrote: > function login() > { > $this->layout = 'newlayout'; > > } > > Should work. > > On Dec 26, 11:54 am, mona wrote: > > > I am making login page but due to default settings of cakephp my > > layout is not looking good i m using table on my login page but if i > > customize cakephp default page and delete the cakephp logo and all > > that things on display the contents then my layout is not looking good > > how to make my login page properly aligned in cakephp so that its look > > good i need fast answers please can anybody help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to change the layout of your pages in cake php
function login() { $this->layout = 'newlayout'; } Should work. On Dec 26, 11:54 am, mona wrote: > I am making login page but due to default settings of cakephp my > layout is not looking good i m using table on my login page but if i > customize cakephp default page and delete the cakephp logo and all > that things on display the contents then my layout is not looking good > how to make my login page properly aligned in cakephp so that its look > good i need fast answers please can anybody help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
Have you tried printing the array to see what it contains? The array holds everything that $_FILE[] normally would. Use these values to upload your file, then set the variable to the name of the file or whatever you want inserted into the database. Cake does not have an automagic way to handle file uploads, it takes a couple of lines in the controller to take care of this. Google cakephp file upload for more examples. http://letmegooglethatforyou.com/?q=cakephp+file+upload On Dec 26, 11:50 am, mona wrote: > In my add view i have one form which contain file upload option i want > to send all the values of form in one table but file upload option is > displaying error like array to string conversion because the query is > like that ("insert into enteries(section,list,submenu,file) values > ('shopping','list','sub',array)") why file field is having array as a > value how to do file uploading from a form in cakephp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
DebugKit for 1.2 Final throws error
I decided to try out the debug kit toolbar that Gwoo mentioned in the release notice and I'm getting the following error: Cannot redeclare class View in cake\libs\view\view.php on line 921 The app I'm working on doesn't have anything special and I followed the 2 instructions in the debugkit readme to the letter. I dropped the debug_kit folder into the plugins directory and added var $components = array('DebugKit.Toolbar'); to my app_controller.php (AppController class). Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Test Suite and HABTM Models - Not Working
Fixed it! I grabbed the nightly build for 1.2.x.x_31.10.2008 and everything is going smoothly now. Thanks for the suggestions and link Anupom. On Oct 31, 9:50 am, MikeB <[EMAIL PROTECTED]> wrote: > Thanks Anupom, > > That got me past the missing table cake errors, but now 2/3 of the > tests that cake generated are failing. > > Here is my post.test.php > > App::import('Model', 'Post'); > > class PostTestCase extends CakeTestCase { > var $Post = null; > var $fixtures = array('app.post'); > > function start() { > parent::start(); > $this->Post = & ClassRegistry::init('Post'); > } > > function testPostInstance() { > $this->assertTrue(is_a($this->Post, 'Post')); > } > > function testPostFind() { > $results = $this->Post->recursive = -1; > $results = $this->Post->find('first'); > $this->assertTrue(!empty($results)); > > $expected = array('Post' => array( > 'id' => 1, > 'name' => 'Lorem ipsum dolor sit amet' > )); > $this->assertEqual($results, $expected); > } > > } > > The two cases that fail both reference testPostFind(). After a little > poking around, $this->Post->find('first') does not return anything at > all. The sql queries insert my data from the fixture and truncate it 3 > times before finally dropping the tables. However, the query that I > believe is being generated from find('first') is being run on my > default connection, as opposed to the test connection. Shouldn't this > query be run on the test database since that's where the dummy data is > being inserted? > > Any help is appreciated. > > On Oct 31, 12:48 am, Anupom <[EMAIL PROTECTED]> wrote: > > > Hi Mike, > > > I think the RC3 bake script still generates old style code, like the > > following - > > > App::import('Model', 'Post'); > > > class TestPost extends Post { > > var $cacheSources = false; > > var $useDbConfig = 'test_suite'; > > > } > > > class PostTestCase extends CakeTestCase { > > var $Post = null; > > var $fixtures = array('app.post', 'app.tag'); > > > function start() { > > parent::start(); > > $this->Post = new TestPost(); > > } > > . > > . > > . > > > Unfortunately this old style is redundant and does not work with > > associations (without some hacks). But GOOD news is that - Tim and Nate have > > come up with an even better solution and that works with associations > > flawlessly. Edit your test files and make it like the following - it's gonna > > work like a charm. > > > App::import('Model', 'Post'); > > > class PostTestCase extends CakeTestCase { > > var $Post = null; > > var $fixtures = array('app.post', 'app.tag'); > > > function start() { > > parent::start(); > > $this->Post =& ClassRegistry::init('Post'); > > } > > . > > . > > . > > > Read Tim's blog on this for more > > info.http://debuggable.com/posts/testing-models-in-cakephp---now-let%27s-g... > > > On Fri, Oct 31, 2008 at 3:18 AM, MikeB <[EMAIL PROTECTED]> wrote: > > > > I'm having a problem with the Cake Test Suite throwing errors about > > > HABTM join tables not being found. I've successfully recreated the > > > problem on a much smaller scale. > > > > I've created a very basic 3 table database: > > > > posts (id, name) > > > posts_tags (post_id, tag_id) > > > tags (id, name) > > > > I've baked each model without incident. When I go to test.php and try > > > to run the post.test.php test that was generated for me, it gives me > > > this error: > > > > Error: Database table posts_tags for model PostsTag was not found. > > > > I'm using a default AND test db connection. > > > Cake 1.2 rc3 > > > CakePHP Test Suite v 1.2.0.0 > > > SimpleTest v1.0.1 > > > > Keep in mind that I have not touched any of these files. They are all > > > freshly baked out the oven. > > > > Any ideas? > > > -- > > Anupom Syamhttp://syamantics.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Test Suite and HABTM Models - Not Working
Thanks Anupom, That got me past the missing table cake errors, but now 2/3 of the tests that cake generated are failing. Here is my post.test.php App::import('Model', 'Post'); class PostTestCase extends CakeTestCase { var $Post = null; var $fixtures = array('app.post'); function start() { parent::start(); $this->Post = & ClassRegistry::init('Post'); } function testPostInstance() { $this->assertTrue(is_a($this->Post, 'Post')); } function testPostFind() { $results = $this->Post->recursive = -1; $results = $this->Post->find('first'); $this->assertTrue(!empty($results)); $expected = array('Post' => array( 'id' => 1, 'name' => 'Lorem ipsum dolor sit amet' )); $this->assertEqual($results, $expected); } } The two cases that fail both reference testPostFind(). After a little poking around, $this->Post->find('first') does not return anything at all. The sql queries insert my data from the fixture and truncate it 3 times before finally dropping the tables. However, the query that I believe is being generated from find('first') is being run on my default connection, as opposed to the test connection. Shouldn't this query be run on the test database since that's where the dummy data is being inserted? Any help is appreciated. On Oct 31, 12:48 am, Anupom <[EMAIL PROTECTED]> wrote: > Hi Mike, > > I think the RC3 bake script still generates old style code, like the > following - > > App::import('Model', 'Post'); > > class TestPost extends Post { > var $cacheSources = false; > var $useDbConfig = 'test_suite'; > > } > > class PostTestCase extends CakeTestCase { > var $Post = null; > var $fixtures = array('app.post', 'app.tag'); > > function start() { > parent::start(); > $this->Post = new TestPost(); > } > . > . > . > > Unfortunately this old style is redundant and does not work with > associations (without some hacks). But GOOD news is that - Tim and Nate have > come up with an even better solution and that works with associations > flawlessly. Edit your test files and make it like the following - it's gonna > work like a charm. > > App::import('Model', 'Post'); > > class PostTestCase extends CakeTestCase { > var $Post = null; > var $fixtures = array('app.post', 'app.tag'); > > function start() { > parent::start(); > $this->Post =& ClassRegistry::init('Post'); > } > . > . > . > > Read Tim's blog on this for more > info.http://debuggable.com/posts/testing-models-in-cakephp---now-let%27s-g... > > > > On Fri, Oct 31, 2008 at 3:18 AM, MikeB <[EMAIL PROTECTED]> wrote: > > > I'm having a problem with the Cake Test Suite throwing errors about > > HABTM join tables not being found. I've successfully recreated the > > problem on a much smaller scale. > > > I've created a very basic 3 table database: > > > posts (id, name) > > posts_tags (post_id, tag_id) > > tags (id, name) > > > I've baked each model without incident. When I go to test.php and try > > to run the post.test.php test that was generated for me, it gives me > > this error: > > > Error: Database table posts_tags for model PostsTag was not found. > > > I'm using a default AND test db connection. > > Cake 1.2 rc3 > > CakePHP Test Suite v 1.2.0.0 > > SimpleTest v1.0.1 > > > Keep in mind that I have not touched any of these files. They are all > > freshly baked out the oven. > > > Any ideas? > > -- > Anupom Syamhttp://syamantics.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Test Suite and HABTM Models - Not Working
I'm having a problem with the Cake Test Suite throwing errors about HABTM join tables not being found. I've successfully recreated the problem on a much smaller scale. I've created a very basic 3 table database: posts (id, name) posts_tags (post_id, tag_id) tags (id, name) I've baked each model without incident. When I go to test.php and try to run the post.test.php test that was generated for me, it gives me this error: Error: Database table posts_tags for model PostsTag was not found. I'm using a default AND test db connection. Cake 1.2 rc3 CakePHP Test Suite v 1.2.0.0 SimpleTest v1.0.1 Keep in mind that I have not touched any of these files. They are all freshly baked out the oven. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Does Cake issue a HTTP 404 status code for missing pages.
It does indeed respond with a 404 Not Found header. On Oct 26, 7:44 pm, Mathew <[EMAIL PROTECTED]> wrote: > Hi, > > When Cake produces the 404 error page for missing pages. Does it send > a "http/1.1 404 Not Found" response code or does it send a "http/1.1 > 200 OK" response code? > > Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Linking to non-admin action from admin-action
Thank you all for your responses. I appreciate the help. On Oct 10, 3:21 pm, mark_story <[EMAIL PROTECTED]> wrote: > Matthew, > > If you'd like open an RFC ticket about this subject, the router was > rebuilt in 1.2 from the ground up. If there is enough community > support to change it so you must specify the use of a prefix at all > times how the prefixes are handled can be changed in a future version. > > -Mark > > On Oct 10, 8:59 am, Mathew <[EMAIL PROTECTED]> wrote: > > > $html->link('View > > User',array('admin'=>false,'controller'=>'users','action'=>'view','id' > > => $user['Users']['id'])); > > > The prefix string needs a boolean value. If your prefix had been > > "chicken_add" then you would pass "chicken"=>false. > > > I dislike Cake's implementation of the Router defaulting to the > > prefix. I think the Router should default to "view()" rather then > > "admin_view()", and that you have to pass 'admin'=>true rather then > > 'admin'=>false. > > > The reason this is such a problem is when you have elements or plugins > > used inside an admin view then all the routes are broken. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using requestAction() on a hidden method i.e. _navigation()
Good point. I'm all for following best-practices. However, what if, for examples sake, I didn't need to include the navigation in every page? I would be wasting time querying/compiling a list of categories that wouldn't be accessed in the view. This is assuming that by writing code in AppController it would be called for every page regardless of whether or not it's needed. Thanks for your time/patience. On Oct 10, 3:24 am, Dave J <[EMAIL PROTECTED]> wrote: > Why not simply get the categories in AppController, and set them to > something like $siteNavigation, so that's it available to all pages > (including elements). > > $this->set('siteNavigation', $this->Categories->find(...)); > > It also removes the extra overhead of requestAction. Just remember to > include the Categories model in AppController. > > On Oct 9, 2:10 pm, MikeB <[EMAIL PROTECTED]> wrote: > > > I need to be able to create a navigation used across my site on many > > pages. This particular navigation is table-driven from the categories > > table. It seems like using requestAction() of the categories > > controller in an element, navigation.ctp, would be the perfect > > solution. > > > I got all that to work fine, but it occurred to me that I would > > probably need to make the navigation() action hidden, i.e. > > _navigation(). However, when I try $this->requestAction('/categories/ > > navigation') it gives me a 'max nesting level' error. I tried changing > > the param to '/categories/_navigation' but that had no change. > > > Here is the exact error: > > Fatal error: Maximum function nesting level of '100' reached, > > aborting! > > > Any thoughts? Am I going about this the wrong way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Linking to non-admin action from admin-action
I have a users controller with 2 actions, view() and admin_add(). I've tried to create a link in the admin_add view that points the user to view(), however it keeps /admin/ in the url it generates. I'm using the link method in the Html helper and I don't understand how to prevent this. Here is some code: $html->link('View User', array('controller'=>'users', 'action'=>'view', 'id' => $user['Users']['id'] ) ); This creates the url: /admin/users/view/1 And I'm looking for just /users/view/1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using requestAction() on a hidden method i.e. _navigation()
I need to be able to create a navigation used across my site on many pages. This particular navigation is table-driven from the categories table. It seems like using requestAction() of the categories controller in an element, navigation.ctp, would be the perfect solution. I got all that to work fine, but it occurred to me that I would probably need to make the navigation() action hidden, i.e. _navigation(). However, when I try $this->requestAction('/categories/ navigation') it gives me a 'max nesting level' error. I tried changing the param to '/categories/_navigation' but that had no change. Here is the exact error: Fatal error: Maximum function nesting level of '100' reached, aborting! Any thoughts? Am I going about this the wrong way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---