Re: Missing Database Table, two models are joined and asking new table
On Fri, Apr 25, 2014 at 3:25 AM, mdv mdv...@gmail.com wrote: I have 2 models - Issue and Publication But cakePHP is showing Error: Table issue_publications for model IssuePublication was not found in datasource default Give us more details. How these two models are related? Regards. MARCELO F ANDRADE | Belem, Amazonia, Brazil | http://about.me/mfandrade -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Missing Database Table
Did you correct database name in database.php ? Cake says table not found also in case of not found database. On 15 авг, 18:47, culp alan.culp...@googlemail.com wrote: Hello, I'm new to cake so please bear with me here. I've set up an application locally, tested it and all runs fine. I've uploaded it to a remote production server and, with exactly the same settings I'm getting the following error message Missing Database Table Error: Database table shipments for model Shipment was not found. Troubleshooting so far:- I've checked through phpmyadmin and the table does exist. I've cross checked core.php and phpmyadmin and the database names do match I've emptied the tmp/cache directories on the remote server. I've uncommented the line Configure::write('Cache.disable', true); in core.php Configure::write('debug', 3); on the remote site. Stilll having the same error messages. Possible theories:- The database name is gacworld_shipments the table name is shipments on the remote server, is the similar name causing a clash? My local version that works has a database named gacworldwide. On my local version I'm using the root mysql user, on the remote version I'm not, is it some sort of user priviledge problem? -- 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 their CakePHP related questions. 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
Re: Missing Database Table
Also check the location of your socket (check php.ini by echoing phpinfo();) and make sure it matches. Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Aug 2011, at 14:50, Dr. Loboto wrote: Did you correct database name in database.php ? Cake says table not found also in case of not found database. On 15 авг, 18:47, culp alan.culp...@googlemail.com wrote: Hello, I'm new to cake so please bear with me here. I've set up an application locally, tested it and all runs fine. I've uploaded it to a remote production server and, with exactly the same settings I'm getting the following error message Missing Database Table Error: Database table shipments for model Shipment was not found. Troubleshooting so far:- I've checked through phpmyadmin and the table does exist. I've cross checked core.php and phpmyadmin and the database names do match I've emptied the tmp/cache directories on the remote server. I've uncommented the line Configure::write('Cache.disable', true); in core.php Configure::write('debug', 3); on the remote site. Stilll having the same error messages. Possible theories:- The database name is gacworld_shipments the table name is shipments on the remote server, is the similar name causing a clash? My local version that works has a database named gacworldwide. On my local version I'm using the root mysql user, on the remote version I'm not, is it some sort of user priviledge problem? -- 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 their CakePHP related questions. 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 -- 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 their CakePHP related questions. 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
Re: Missing Database Table
you maybe connect to mysql server, but did u select right database? -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/18 Ed Propsner crotchf...@gmail.com I know this a common error but I'm not seeing what I'm overlooking here. I uploaded a project to remote server and the app complains that I'm missing DB tables. I assumed it was the cache and emptied it out but the problem still persists. The tables are there so that is not the issue. The app appears to be connected to the DB. It seems to be not just one or two tables it thinks are missing, but all tables. Thanks in advance, Ed -- 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 their CakePHP related questions. 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 -- 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 their CakePHP related questions. 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
Re: Missing Database Table
Are you seeing some but not all tables, or none at all? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 18 Feb 2011, at 08:55, Tilen Majerle wrote: you maybe connect to mysql server, but did u select right database? -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/18 Ed Propsner crotchf...@gmail.com I know this a common error but I'm not seeing what I'm overlooking here. I uploaded a project to remote server and the app complains that I'm missing DB tables. I assumed it was the cache and emptied it out but the problem still persists. The tables are there so that is not the issue. The app appears to be connected to the DB. It seems to be not just one or two tables it thinks are missing, but all tables. Thanks in advance, Ed -- 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 their CakePHP related questions. 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 -- 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 their CakePHP related questions. 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 -- 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 their CakePHP related questions. 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
Re: Missing Database Table
If all tables seems missing there are several possibilities: 1. App cannot cannot connect to DB (unfortunately Cake do not have separate error message for this case); 2. You select wrong database; 3. MySQL users rights are messed and you can connect, choose DB, but cannot select from tables there. On 18 фев, 14:54, Ed Propsner crotchf...@gmail.com wrote: I know this a common error but I'm not seeing what I'm overlooking here. I uploaded a project to remote server and the app complains that I'm missing DB tables. I assumed it was the cache and emptied it out but the problem still persists. The tables are there so that is not the issue. The app appears to be connected to the DB. It seems to be not just one or two tables it thinks are missing, but all tables. Thanks in advance, Ed -- 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 their CakePHP related questions. 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
Re: Missing Database Table
Check all are right or not.My db config is /app/config/database.php class DATABASE_CONFIG { var $default = array( 'driver' = 'mysql_ex', 'persistent' = false, 'host' = 'localhost', 'login' = 'root', 'password' = '', 'database' = 'sif_dev', 'prefix' = '', ); var $test = array( 'driver' = 'mysql', 'persistent' = false, 'host' = 'localhost', 'login' = 'user', 'password' = 'password', 'database' = 'test_database_name', 'prefix' = '', ); } Please reply if solved with how have u solved it. On Feb 18, 10:56 pm, Dr. Loboto drlob...@gmail.com wrote: If all tables seems missing there are several possibilities: 1. App cannot cannot connect to DB (unfortunately Cake do not have separate error message for this case); 2. You select wrong database; 3. MySQL users rights are messed and you can connect, choose DB, but cannot select from tables there. On 18 фев, 14:54, Ed Propsner crotchf...@gmail.com wrote: I know this a common error but I'm not seeing what I'm overlooking here. I uploaded a project to remote server and the app complains that I'm missing DB tables. I assumed it was the cache and emptied it out but the problem still persists. The tables are there so that is not the issue. The app appears to be connected to the DB. It seems to be not just one or two tables it thinks are missing, but all tables. Thanks in advance, Ed -- 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 their CakePHP related questions. 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
Re: Missing Database Table error
I think the new table should be called UsersVotes. No underscore. On 6/11/10, Andrew grie...@gmail.com wrote: Hello all, I've been using cakephp for a few months now and I love it!! I must admit I am still getting used to some of the concepts. At the moment I'm trying to add a database bridging table for a HasAndBelongsToMany Model. My three models involved are Users, Votes and Users_Votes. So when I call the view /users_votes/create/ I get the error message Missing Database Table Error: Database table user_votes for model UserVote was not found. Notice: If you want to customize this error message, create app/views/ errors/missing_table.ctp I am using Cakephp 1.3. - My database names are Users, Votes and Users_Votes - My model names are user, vote, and uservote - I think I have my models correct class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) ); } class UserVote extends AppModel { var $name = 'UserVote'; var $belongsTo = array ( 'Vote' = array ( 'className' = 'Vote', 'foreignKey' = 'id' ) ); } class Vote extends AppModel { var $name = 'Vote'; var $hasAndBelongsToMany = array ( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'vote_id', 'dependent' = true ) ); } Thanks! 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 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 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 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: Missing Database Table error
You can include the following in your model to specify the name of the table to use if you do not want to follow Cake's naming convention. Try this: [code] var $useTable = your table name; [/code] So your model will look something like this: [code] class User extends AppModel { var $name = 'User'; var $useTable = 'user_votes'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) ); } [/code] Hope this helps, Dima On Jun 11, 4:55 pm, Ed Propsner crotchf...@gmail.com wrote: All of my underscored table names work just fine, but this is something I wonder about: If both parts of the underscored table name are plural (users_votes) .. would the model be UsersVote or UserVote. Do both parts get singularized? In any case, your issue still seems to be with naming conventions. - Ed On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters luvz2...@gmail.comwrote: I think the new table should be called UsersVotes. No underscore. On 6/11/10, Andrew grie...@gmail.com wrote: Hello all, I've been using cakephp for a few months now and I love it!! I must admit I am still getting used to some of the concepts. At the moment I'm trying to add a database bridging table for a HasAndBelongsToMany Model. My three models involved are Users, Votes and Users_Votes. So when I call the view /users_votes/create/ I get the error message Missing Database Table Error: Database table user_votes for model UserVote was not found. Notice: If you want to customize this error message, create app/views/ errors/missing_table.ctp I am using Cakephp 1.3. - My database names are Users, Votes and Users_Votes - My model names are user, vote, and uservote - I think I have my models correct class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) ); } class UserVote extends AppModel { var $name = 'UserVote'; var $belongsTo = array ( 'Vote' = array ( 'className' = 'Vote', 'foreignKey' = 'id' ) ); } class Vote extends AppModel { var $name = 'Vote'; var $hasAndBelongsToMany = array ( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'vote_id', 'dependent' = true ) ); } Thanks! Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 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: Missing Database Table error
OK I've now worked out 100% what my problem was! The problem was because my two Models (vote user) were using $hasAndBelongsToMany they did not have to have the Full classname in, for instance: class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) ); } And I changed this to--- class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'user_id', 'dependent' = true ) ); } And it worked. That was the answer! On Jun 12, 11:36 am, Andrew grie...@gmail.com wrote: Thank you. After many different tries I ended up renaming my table to user_votes and everything seemed to work at last. It does get confusing! On Jun 12, 10:01 am, Dima dmitriy.pind...@gmail.com wrote: You can include the following in your model to specify the name of the table to use if you do not want to follow Cake's naming convention. Try this: [code] var $useTable = your table name; [/code] So your model will look something like this: [code] class User extends AppModel { var $name = 'User'; var $useTable = 'user_votes'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) );} [/code] Hope this helps, Dima On Jun 11, 4:55 pm, Ed Propsner crotchf...@gmail.com wrote: All of my underscored table names work just fine, but this is something I wonder about: If both parts of the underscored table name are plural (users_votes) .. would the model be UsersVote or UserVote. Do both parts get singularized? In any case, your issue still seems to be with naming conventions. - Ed On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters luvz2...@gmail.comwrote: I think the new table should be called UsersVotes. No underscore. On 6/11/10, Andrew grie...@gmail.com wrote: Hello all, I've been using cakephp for a few months now and I love it!! I must admit I am still getting used to some of the concepts. At the moment I'm trying to add a database bridging table for a HasAndBelongsToMany Model. My three models involved are Users, Votes and Users_Votes. So when I call the view /users_votes/create/ I get the error message Missing Database Table Error: Database table user_votes for model UserVote was not found. Notice: If you want to customize this error message, create app/views/ errors/missing_table.ctp I am using Cakephp 1.3. - My database names are Users, Votes and Users_Votes - My model names are user, vote, and uservote - I think I have my models correct class User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'user_id', 'dependent' = true ) ); } class UserVote extends AppModel { var $name = 'UserVote'; var $belongsTo = array ( 'Vote' = array ( 'className' = 'Vote', 'foreignKey' = 'id' ) ); } class Vote extends AppModel { var $name = 'Vote'; var $hasAndBelongsToMany = array ( 'UserVote' = array( 'className' = 'UserVote', 'foreignKey' = 'vote_id', 'dependent' = true ) ); } Thanks! Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 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 group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at
Re: Missing Database Table
Just a quick knee jerk reply. What happens if you access this link: http://localhost/Cake_Application/posts (in other words with index.php)? On Nov 16, 7:04 am, SugarCRM Geek naveenshurpale...@gmail.com wrote: hi all, Am new to Cake. i started by trying to create an application using Command Line Interface. My datasource configuration looks like this: Name: default Driver: mysql Persistent: false Host: 127.0.0.1 Port: 3306 User: root Pass: Database: cake_db inside the Database cake_db, i have 2 tables 'posts' 'items'. Based on these two tables,am being prompted to create the Model Controller. After giving all the right inputs, i get this message: --- The following Model will be created: --- Name: Post Associations: --- Look okay? (y/n) [y] y. same goes for the Contoller too. --- The following controller will be created: --- Controller Name: Posts var $scaffold; --- same for the Views also. but the problem is when i go to the URLhttp://localhost/Cake_Application/index.php/posts i get the following error message: Missing Database Table Error: Database table posts for model Post was not found. When i take a print_r($config); from dbo_mysql.php, i get this Array ( [persistent] = [host] = localhost [login] = root [password] = [database] = posts [port] = 3306 [connect] = mysql_pconnect [driver] = mysql [prefix] = ) where u can clearly see that the database it is showing is 'posts' ? why is it not taking the database name given by me i.e. 'cake_db' ? been in this problem thru the weekend, hope somebody gives me solution for this. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@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=.
Re: Missing Database Table
Also: when you navigate to the homepage: http://localhost/Cake_Application/ does everything appear ok? (with styles, etc.) Does it say it is able to connect to the database? Do all of the values appear correctly in Cake_Application/config/database.php ? On Mon, Nov 16, 2009 at 8:18 AM, jburns jeremybu...@me.com wrote: Just a quick knee jerk reply. What happens if you access this link: http://localhost/Cake_Application/posts (in other words with index.php)? On Nov 16, 7:04 am, SugarCRM Geek naveenshurpale...@gmail.com wrote: hi all, Am new to Cake. i started by trying to create an application using Command Line Interface. My datasource configuration looks like this: Name: default Driver: mysql Persistent: false Host: 127.0.0.1 Port: 3306 User: root Pass: Database: cake_db inside the Database cake_db, i have 2 tables 'posts' 'items'. Based on these two tables,am being prompted to create the Model Controller. After giving all the right inputs, i get this message: --- The following Model will be created: --- Name: Post Associations: --- Look okay? (y/n) [y] y. same goes for the Contoller too. --- The following controller will be created: --- Controller Name: Posts var $scaffold; --- same for the Views also. but the problem is when i go to the URLhttp://localhost/Cake_Application/index.php/posts i get the following error message: Missing Database Table Error: Database table posts for model Post was not found. When i take a print_r($config); from dbo_mysql.php, i get this Array ( [persistent] = [host] = localhost [login] = root [password] = [database] = posts [port] = 3306 [connect] = mysql_pconnect [driver] = mysql [prefix] = ) where u can clearly see that the database it is showing is 'posts' ? why is it not taking the database name given by me i.e. 'cake_db' ? been in this problem thru the weekend, hope somebody gives me solution for this. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/cake-php?hl=. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@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=.
Re: Missing Database Table
tried that too..!!! it shows the same error On Sep 8, 1:49 pm, Miles J mileswjohn...@gmail.com wrote: Do you have caching on? Try clearing your tmp/cache folders. Also try doing var $uses = array('Post'); in your controller. On Sep 8, 9:33 am, new2cakephp shabaris...@gmail.com wrote: yup that is how it is..!!! On Sep 8, 12:11 pm, Miles J mileswjohn...@gmail.com wrote: Make sure your filename is post.php and the model class name is Post. The filename is the biggest problem people have. On Sep 8, 6:26 am, new2cakephp shabaris...@gmail.com wrote: when I dohttp://localhost/cakephpinthebrowser i get cakephp home page everything is green, n it says Cake is able to connect to the database. is this how u check the connection..??? On Sep 8, 4:02 am, Dr. Loboto drlob...@gmail.com wrote: Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
tried that too..!! I guess there is connection to the database.. but when i check xampp/mysql/data/ I have the database that I have created.. On Sep 9, 6:38 pm, Miles J mileswjohn...@gmail.com wrote: Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
Since your on xampp, does your database information in your config file match the database found at localhost/phpmyadmin (or your online server)? On Sep 9, 3:47 pm, new2cakephp shabaris...@gmail.com wrote: tried that too..!! I guess there is connection to the database.. but when i check xampp/mysql/data/ I have the database that I have created.. On Sep 9, 6:38 pm, Miles J mileswjohn...@gmail.com wrote: Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
Please eloborate..!!! thanks On Sep 9, 8:33 pm, Miles J mileswjohn...@gmail.com wrote: Since your on xampp, does your database information in your config file match the database found at localhost/phpmyadmin (or your online server)? On Sep 9, 3:47 pm, new2cakephp shabaris...@gmail.com wrote: tried that too..!! I guess there is connection to the database.. but when i check xampp/mysql/data/ I have the database that I have created.. On Sep 9, 6:38 pm, Miles J mileswjohn...@gmail.com wrote: Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
Go to localhost/phpmyadmin in your browsers address bar. From there you should see all your database tables created on your localhost. Now open database.php within your Cake app and determine if the database names and users match up. Seems like you might be creating the posts table on the wrong db, or not at all. On Sep 9, 6:01 pm, new2cakephp shabaris...@gmail.com wrote: Please eloborate..!!! thanks On Sep 9, 8:33 pm, Miles J mileswjohn...@gmail.com wrote: Since your on xampp, does your database information in your config file match the database found at localhost/phpmyadmin (or your online server)? On Sep 9, 3:47 pm, new2cakephp shabaris...@gmail.com wrote: tried that too..!! I guess there is connection to the database.. but when i check xampp/mysql/data/ I have the database that I have created.. On Sep 9, 6:38 pm, Miles J mileswjohn...@gmail.com wrote: Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
you are awesome..!!! i jus screwed up the name of the database.!! thanks a ton..!!! thanks On Sep 9, 10:14 pm, Miles J mileswjohn...@gmail.com wrote: Go to localhost/phpmyadmin in your browsers address bar. From there you should see all your database tables created on your localhost. Now open database.php within your Cake app and determine if the database names and users match up. Seems like you might be creating the posts table on the wrong db, or not at all. On Sep 9, 6:01 pm, new2cakephp shabaris...@gmail.com wrote: Please eloborate..!!! thanks On Sep 9, 8:33 pm, Miles J mileswjohn...@gmail.com wrote: Since your on xampp, does your database information in your config file match the database found at localhost/phpmyadmin (or your online server)? On Sep 9, 3:47 pm, new2cakephp shabaris...@gmail.com wrote: tried that too..!! I guess there is connection to the database.. but when i check xampp/mysql/data/ I have the database that I have created.. On Sep 9, 6:38 pm, Miles J mileswjohn...@gmail.com wrote: Try putting var $useTable = 'posts'; in your Post model and see what happens. --~--~-~--~~~---~--~~ 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: Missing Database Table
Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
when I do http://localhost/cakephp in the browser i get cakephp home page everything is green, n it says Cake is able to connect to the database. is this how u check the connection..??? On Sep 8, 4:02 am, Dr. Loboto drlob...@gmail.com wrote: Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
Make sure your filename is post.php and the model class name is Post. The filename is the biggest problem people have. On Sep 8, 6:26 am, new2cakephp shabaris...@gmail.com wrote: when I dohttp://localhost/cakephpin the browser i get cakephp home page everything is green, n it says Cake is able to connect to the database. is this how u check the connection..??? On Sep 8, 4:02 am, Dr. Loboto drlob...@gmail.com wrote: Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
Can you post the controller action that throws this error? On Tue, Sep 8, 2009 at 12:09 AM, new2cakephpshabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
yup that is how it is..!!! On Sep 8, 12:11 pm, Miles J mileswjohn...@gmail.com wrote: Make sure your filename is post.php and the model class name is Post. The filename is the biggest problem people have. On Sep 8, 6:26 am, new2cakephp shabaris...@gmail.com wrote: when I dohttp://localhost/cakephpinthe browser i get cakephp home page everything is green, n it says Cake is able to connect to the database. is this how u check the connection..??? On Sep 8, 4:02 am, Dr. Loboto drlob...@gmail.com wrote: Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
this piece of code is in the post.php ?php class Post extends AppModel { var $name = 'Post'; } ? this piece of code in the posts_controller.php ?php class PostsController extends AppController { var $name = 'Posts'; function index() { $this-set('posts', $this-Post-find('all')); } function view($id = null) { $this-Post-id = $id; $this-set('post', $this-Post-read()); } } ? I have done nothing complicated..!!! jus followed the blog tutorials On Sep 8, 12:12 pm, brian bally.z...@gmail.com wrote: Can you post the controller action that throws this error? On Tue, Sep 8, 2009 at 12:09 AM, new2cakephpshabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table
Do you have caching on? Try clearing your tmp/cache folders. Also try doing var $uses = array('Post'); in your controller. On Sep 8, 9:33 am, new2cakephp shabaris...@gmail.com wrote: yup that is how it is..!!! On Sep 8, 12:11 pm, Miles J mileswjohn...@gmail.com wrote: Make sure your filename is post.php and the model class name is Post. The filename is the biggest problem people have. On Sep 8, 6:26 am, new2cakephp shabaris...@gmail.com wrote: when I dohttp://localhost/cakephpinthebrowser i get cakephp home page everything is green, n it says Cake is able to connect to the database. is this how u check the connection..??? On Sep 8, 4:02 am, Dr. Loboto drlob...@gmail.com wrote: Okay, I'll be more concrete - do Cake have access to database? Missing database table error page can be displayed in two cases - when there is no table and when there is no connection to database at all. On Sep 8, 2:33 pm, new2cakephp shabaris...@gmail.com wrote: yes, Dr I do have a connection to the database. I am doing the whole thing in XAMPP, executed the queries in phpmyadmin On Sep 8, 2:29 am, Dr. Loboto drlob...@gmail.com wrote: Do you have connection to your database? Do you have table named posts in that database? On Sep 8, 11:09 am, new2cakephp shabaris...@gmail.com wrote: Hi all, I am new to cakephp, started working on the blog tutorials, Missing Database Table Error: Database table posts for model Post was not found. have got this error, checked the naming conventions but still no solution help me on this thanks all --~--~-~--~~~---~--~~ 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: Missing Database Table Error
You have a HABTM assoc. between those two models so you need to have a join table named artists_comics. Create that with 2 columns, artist_id comic_id (note the singular). The type for the columns should match whatever you're using for artists.id comics.id (though not auto_increment/serial, of course). On Mon, Aug 17, 2009 at 6:39 PM, fightinggeekderrick.a.wea...@gmail.com wrote: I get this error when I try to load the scaffold view. I have tables called artists and comics in the comic database and models call artist.php and comic.php. i have no idea what I'm doing wrong. Missing Database Table Error: Database table artists_comics for model ArtistsComic was not found. -- View this message in context: http://www.nabble.com/Missing-Database-Table--Error-tp25015550p25015550.html Sent from the CakePHP mailing list archive at Nabble.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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database table error: possibly related to model caching
Is the missing table an actual table in the database? Sometimes it throws errors when your model associations are wrong. --~--~-~--~~~---~--~~ 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: Missing Database Table
Whenever I am oh so sure I have everything setup but I still get strange errors like this it is always one thing... cache. Empty out all the caches and refresh. Hopefully your table will be available again. On Sep 16, 8:35 am, simpleman996633 [EMAIL PROTECTED] wrote: Hi all, After running my Cake application locally i tried to upload it to my remote server, configured everything properly, checked all the tables, database access. But i couldn't solve the following error. I can't find enough resources too . Plz somebody help Missing Database Table Error: Database table acos for model Aco was not found. Notice: If you want to customize this error message, create app/views/ errors/missing_table.ctp I used the ACL component. Plz help --~--~-~--~~~---~--~~ 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: Missing Database Table
Hi! This seems to be an ACL table. I think there was a call like cake acl something to generate that tables. HTH Bernhard 2008/9/16 [EMAIL PROTECTED] [EMAIL PROTECTED] Whenever I am oh so sure I have everything setup but I still get strange errors like this it is always one thing... cache. Empty out all the caches and refresh. Hopefully your table will be available again. On Sep 16, 8:35 am, simpleman996633 [EMAIL PROTECTED] wrote: Hi all, After running my Cake application locally i tried to upload it to my remote server, configured everything properly, checked all the tables, database access. But i couldn't solve the following error. I can't find enough resources too . Plz somebody help Missing Database Table Error: Database table acos for model Aco was not found. Notice: If you want to customize this error message, create app/views/ errors/missing_table.ctp I used the ACL component. Plz help --~--~-~--~~~---~--~~ 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: Missing Database Table
Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = ‘Items’; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = ‘Item’; } ? 7) i visitedhttp://localhost/todo/itemsto see a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemsto see a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstosee a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
In the app/config/core.php do you have the debug set to 0 or 1 if it is set to zero set it to 1,2, or 3 as this will keep refreshing your cache. From what I have learned in the short time I been learning Cake the cache doesn't refresh as much will in production mode (debug set to 0) to help speed up the app. On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
Why is that a problem? It works exactly as it should... If you do not wish to cache your models, you can disable it in core.php (you shouldn't disable cache in production). On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstosee a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
In the app/config/core.php do you have the debug set to 0 or 1 if it is set to zero set it to 1,2, or 3 as this will keep refreshing your cache. From what I have learned in the short time I been learning Cake the cache doesn't refresh as much will in production mode (debug set to 0) to help speed up the app. Actually i haven't paid attention to what my debug level was. I will check that. Anyway, a change in the database in production is not likely to happen all the time. Regards, Luiz Poleto 2008/9/10 teknoid [EMAIL PROTECTED] Why is that a problem? It works exactly as it should... If you do not wish to cache your models, you can disable it in core.php (you shouldn't disable cache in production). On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ 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: Missing Database Table
Hi, forrestgump: Error: Database table itemss for model Items was not found. you should check your model. Is it called items instead of item? regards Guenther --~--~-~--~~~---~--~~ 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: Missing database table
@Joel I'd never fully read the API documentation on Model::find and Model::findAll before, thanks for the advice, find('all') works a lot better for what I needed done! In the name of Life, Liberty, and the pursuit of my sanity. Siebren Bakker(Aevum Decessus) On Fri, Jun 20, 2008 at 12:58, Joel Perras [EMAIL PROTECTED] wrote: On Jun 20, 11:52 am, Siebren Bakker [EMAIL PROTECTED] wrote: I'm not selecting more information than I need. findAll find in most situations, especially because of the recursive option. Really? That's odd, because findAll() is nothing more than a (deprecated) wrapper for find('all'). Actually, there are things that you can do with Model::find('all', ..) that are impossible with Model::findAll(), such as providing options to the new Containable behavior. Read the API if you have some free time. It's often quite enlightening. -Joel. --~--~-~--~~~---~--~~ 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: Missing database table
I guess if bake doesn't work, Cake can't see the tables. Make sure they are defined in the same database as users (!) Check your database config file in app/config - make sure that the stated user has access to the tables. Make sure that the model filenames are correct and correctly located (although the error message suggests all is correct there) On 20 Juny, 02:18, KURT [EMAIL PROTECTED] wrote: Below is the codes that I have done. ?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' = array( 'className' = 'Dealer', 'conditions' = '', 'order' = '', 'foreignKey' = 'dealer_id' ) );} ? ?php class Dealer extends AppModel { var $name = 'Dealer'; var $hasMany = array ('Product' = array( 'className' = 'Product', 'conditions' = '', 'order' = '', 'foreignKey' = 'dealer_id' ) );} ? ?php class ProductsController extends AppController { var $scaffold;} ? ?php class DealersController extends AppController { var $scaffold;} ? The tables 'dealers' and 'products' exists. My problem is when I access 'http://localhost/cookup/dealers'and 'http://localhost/cookup/products', cake give me an error 'Error: Database table dealers for model Dealer was not found.' or 'Error: Database table products for model Product was not found.'. Furthermore, when I try to use bake, I cannot bake dealer and products. I have another table called 'users' and that table is fine. What is my problem? --~--~-~--~~~---~--~~ 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: Missing database table
I ran into a similar problem, and found an interesting solution that took care of it right away. Clear out the contents of your /app/tmp/cache/models folder, and then try again and it should recognize your database tables if they exist. In the name of Life, Liberty, and the pursuit of my sanity. Siebren Bakker(Aevum Decessus) On Fri, Jun 20, 2008 at 03:10, leo [EMAIL PROTECTED] wrote: I guess if bake doesn't work, Cake can't see the tables. Make sure they are defined in the same database as users (!) Check your database config file in app/config - make sure that the stated user has access to the tables. Make sure that the model filenames are correct and correctly located (although the error message suggests all is correct there) On 20 Juny, 02:18, KURT [EMAIL PROTECTED] wrote: Below is the codes that I have done. ?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' = array( 'className' = 'Dealer', 'conditions' = '', 'order' = '', 'foreignKey' = 'dealer_id' ) );} ? ?php class Dealer extends AppModel { var $name = 'Dealer'; var $hasMany = array ('Product' = array( 'className' = 'Product', 'conditions' = '', 'order' = '', 'foreignKey' = 'dealer_id' ) );} ? ?php class ProductsController extends AppController { var $scaffold;} ? ?php class DealersController extends AppController { var $scaffold;} ? The tables 'dealers' and 'products' exists. My problem is when I access 'http://localhost/cookup/dealers'andhttp://localhost/cookup/dealers%27and 'http://localhost/cookup/products', cake give me an error 'Error: Database table dealers for model Dealer was not found.' or 'Error: Database table products for model Product was not found.'. Furthermore, when I try to use bake, I cannot bake dealer and products. I have another table called 'users' and that table is fine. What is my problem? --~--~-~--~~~---~--~~ 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: Missing database table
On 20 Juny, 10:33, Siebren Bakker [EMAIL PROTECTED] wrote: I ran into a similar problem, and found an interesting solution that took care of it right away. Clear out the contents of your /app/tmp/cache/models folder, and then try again and it should recognize your database tables if they exist. Good call! I usually disable caching for development for this and myriad similar reasons. --~--~-~--~~~---~--~~ 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: Missing database table
If you turn debug mode to 1, cache is refreshed so any changes in the database will be recognized :-) On 20 jun, 11:06, leo [EMAIL PROTECTED] wrote: On 20 Juny, 10:33, Siebren Bakker [EMAIL PROTECTED] wrote: I ran into a similar problem, and found an interesting solution that took care of it right away. Clear out the contents of your /app/tmp/cache/models folder, and then try again and it should recognize your database tables if they exist. Good call! I usually disable caching for development for this and myriad similar reasons. --~--~-~--~~~---~--~~ 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: Missing database table
@Marsellus. Makes sense, I ran into this problem in the beta version of my site, which has debug set to 2 so I can see the SQL dump, and make sure that I'm not selecting more information than I need. findAll find in most situations, especially because of the recursive option. In the name of Life, Liberty, and the pursuit of my sanity. Siebren Bakker(Aevum Decessus) On Fri, Jun 20, 2008 at 08:58, Marcelius [EMAIL PROTECTED] wrote: If you turn debug mode to 1, cache is refreshed so any changes in the database will be recognized :-) On 20 jun, 11:06, leo [EMAIL PROTECTED] wrote: On 20 Juny, 10:33, Siebren Bakker [EMAIL PROTECTED] wrote: I ran into a similar problem, and found an interesting solution that took care of it right away. Clear out the contents of your /app/tmp/cache/models folder, and then try again and it should recognize your database tables if they exist. Good call! I usually disable caching for development for this and myriad similar reasons. --~--~-~--~~~---~--~~ 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: Missing database table
On Jun 20, 11:52 am, Siebren Bakker [EMAIL PROTECTED] wrote: I'm not selecting more information than I need. findAll find in most situations, especially because of the recursive option. Really? That's odd, because findAll() is nothing more than a (deprecated) wrapper for find('all'). Actually, there are things that you can do with Model::find('all', ..) that are impossible with Model::findAll(), such as providing options to the new Containable behavior. Read the API if you have some free time. It's often quite enlightening. -Joel. --~--~-~--~~~---~--~~ 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: Missing database table trying to bake a model
You mean you copied the whole 'console' directory into your app directory? I can't see how that would make a difference as far as baking models go, but even if it did it doesn't seem a very efficient solution considering how many directories and files are in the console directory. Out of interest, how many databases are you connecting to, and what engine are they using? On Nov 20, 3:51 pm, uae2k [EMAIL PROTECTED] wrote: well ... maybe this is the solution I have copied console to the app folder and it works fine with me On Nov 20, 8:30 am, uae2k [EMAIL PROTECTED] wrote: I have the same problem and I tried your way but without any result Any one can help here ! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Missing database table trying to bake a model
Recently, they changed the way that bake runs (tripped me up too). You need to run it from your /app directory and add the bake directory to your path. There's a note at the top of bake.bat script that gives better/fuller instructions. Hope this helps On Nov 20, 10:03 am, Scronkey [EMAIL PROTECTED] wrote: You mean you copied the whole 'console' directory into your app directory? I can't see how that would make a difference as far as baking models go, but even if it did it doesn't seem a very efficient solution considering how many directories and files are in the console directory. Out of interest, how many databases are you connecting to, and what engine are they using? On Nov 20, 3:51 pm, uae2k [EMAIL PROTECTED] wrote: well ... maybe this is the solution I have copied console to the app folder and it works fine with me On Nov 20, 8:30 am, uae2k [EMAIL PROTECTED] wrote: I have the same problem and I tried your way but without any result Any one can help here ! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Missing database table trying to bake a model
I have the same problem and I tried your way but without any result Any one can help here ! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Missing database table trying to bake a model
well ... maybe this is the solution I have copied console to the app folder and it works fine with me On Nov 20, 8:30 am, uae2k [EMAIL PROTECTED] wrote: I have the same problem and I tried your way but without any result Any one can help here ! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Missing database table trying to bake a model
I have found out why this was happening and with two very small adjustments in cake/console/libs/tasks/model.php I can successfully bake models in either the mysql or the firebird database. All the functionality is there and ready to go, it just appears it has yet to be 'turned on'. (using latest branch checkout) In the function __interactive, a new model is created twice with the following code: tempModel = new Model(false, $useTable); this is after the request if validation is required, and tempOtherModel = new Model(false, $useTable); this is after the request if associations are required. However, the constructor for Model can take a third parameter, $ds, but as this is not passed in either case, the new Model uses the 'default' dbConfig. Once I added the existing variable $useDbConfig to both calls, such as: tempModel = new Model(false, $useTable, $useDbConfig); the models are correctly baked. My concern now is why is this functionality not enabled? Am I going about this the wrong way? I could not find any tickets on this so if this is the correct way, should I write a ticket? If I'm on the right track I will investigate the related problem when trying to bake the relevant controllers and views, which currently only display the list of 'default' models when I try to use my alternate firebird database config. If I'm not on the right track, can anyone enlighten me? On Nov 11, 12:31 pm, Scronkey [EMAIL PROTECTED] wrote: This occurs when trying to setup an additional database connection to a Firebird server. I'm using mysql for the bulk of my app (with no problems), but in trying to set up access to a few tables in my Firebird db some oddness occurs. I have the entry in the database.sql config file and bake presents me with the correct list of tables to choose from when I try to create a model so it can obviously successfully connect to the server and database in question. When presented with the first question (supplying validation criteria) I get the following error (regardless if want validation or not): Error: Missing database table 'employees' for model 'Model' Note that the table name is correct, but it seems to be trying to locate a model called 'Model'. This oddness made me think that could be a bug, (also considering cake can connect and return a list of tables) so I started hunting. Several hours have passed and I'm now getting quite lost and cross-eyed from the code and was hoping someone with more familiarity of Cake's innards could help. I've traced the error to the __interactive function in console/libs/ tasks/model.php, to the line: $tempModel = new Model(false, $useTable); I assumed this is a call to the __construct method in cake/libs/model/ model.php but I'm lost trying get any further. If no one has an immediate thought of why this occurs, then perhaps someone can tell me how can I get diagnostic messages from within model.php? As there is no active browser (shell bake) and I can't seem to access the shell-out() function to dump messages I can't easily narrow down where this actually falls over. Any advice or tips ? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: missing database table / camelcase error
Are you using PHP4 on the live server? Are you forgetting to have var $name = 'GroupType' at the top of your models? PHP4 cannot get a case sensitive version of a class name - so when it looks at your model it assumes it to be Groupttype, unless you have a var $name with the correct case. On Oct 15, 10:26 am, Adam D [EMAIL PROTECTED] wrote: Hi, I just moved my site to a new server and I'm getting a missing database error for all of my model. Cake appears to be omitting the underscores on the conversion from model name to database table, so, for a model like GroupType, it's looking for a table named grouptypes instead of group_types. Where is this conversion controlled? How could a move between servers have caused this error? FWIW, if I set $useTable explicitly, everything works. - Adam --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: missing database table / camelcase error
Ugh. To document my own ineptitude... The issue was that the new server had the site defaulted to php4. An argument for setting $name properly, I suppose. - Adam On Oct 14, 8:26 pm, Adam D [EMAIL PROTECTED] wrote: Hi, I just moved my site to a new server and I'm getting a missing database error for all of my model. Cake appears to be omitting the underscores on the conversion from model name to database table, so, for a model like GroupType, it's looking for a table named grouptypes instead of group_types. Where is this conversion controlled? How could a move between servers have caused this error? FWIW, if I set $useTable explicitly, everything works. - Adam --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
http://www.cakephp.org/pastes/addCan you create some pastes of your code?On 7/21/06, Matt2012 [EMAIL PROTECTED] wrote:Dont know whats happening - CAKE loading fine the homepage definitely connecting to the right database but what ever table I putinuseTable its saying its missing. (I started off with the default table'trains' for model Train).Not had this problem before. Anyone any ideas? --~--~-~--~~~---~--~~ 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: Missing Database Table
well theres not all that much to it (I think you can ignore the view?) http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276 I appreciate the extra eyes..! --~--~-~--~~~---~--~~ 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: Missing Database Table
What versions of the following are you using: PHP, DB Type and Version (i.e. MySQL 5), CakePHP?What operating system are you running the webserver on?And can you dump the SQL schema for your database as well? One thing to double check is that the table name is the plural form instead of singular. i.e. 'trains' instead of 'train'Set your debuge level in /app/config/core.php to 3 as well to get some more error messages. On 7/21/06, Matt2012 [EMAIL PROTECTED] wrote: well theres not all that much to it (I think you can ignore the view?)http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276 I appreciate the extra eyes..! --~--~-~--~~~---~--~~ 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: Missing Database Table
Apache version 1.3.34 (Unix) MySQL version 4.1.19-standard PHP version 4.4.2 // -- -- Table structure for trains -- CREATE TABLE `trains`( `id` int(11) NOT NULL AUTO_INCREMENT , `start_loc` varchar(255) , `end_loc` varchar(255) , `start_datetime` datetime , `end_datetime` datetime , `created` datetime , `updated` datetime , PRIMARY KEY (`id`)) TYPE=MyISAM; //ERROR ON DEBUG 3 Missing Database Table No Database table for model Train (expected trains), create it first. Notice: this error is being rendered by the app/views/errors/missing_table.thtml view file, a user-customizable error page. 0 query took ms Nr Query Error AffectedNum. rows Took (ms) --~--~-~--~~~---~--~~ 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: Missing Database Table
class DATABASE_CONFIG { var $default = array('driver' = 'mysql', 'connect' = 'mysql_connect', 'host' = 'localhost', 'login' = '', 'password' = '', 'database' = 'X', 'prefix' = ''); } for security ive hidden the database name but I have double checked that its right on the right server and contains the table trains ps it wont recognise any tables for any models - there will be something really obvious but I cant work out what. I have other sites working on this server so mod_rewrite etc is ok... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---