Re: Blog tutorial - I get a blank page

2009-05-28 Thread John Andersen
Please confirm that your view directory is named views not view! John On May 28, 1:54 am, cshehadi csheh...@gmail.com wrote: Hi, I'm trying to get through the blog tutorial, and trying to view my first page at: http://server/post/index but I'm getting a blank page.  I'm sure the

Re: set and field of more words

2009-05-28 Thread fain182
I'm having some trouble figuring out what the problem is here. Could you clarify why you want a variable name with spaces? ok, i want to have a form-input() that make me a select, for example, if the field's name is group: in controller: $this-set('groups', $array_of_value); in view: echo

Associated models foreach loop/pagination - not sure how to include them.

2009-05-28 Thread number9
I'm working with the searchable behaviour and have got it setup and running OK, but I'm really not sure how I set associated data for output in the view. I have a search.ctp file which shows related data such as categories, users etc. I know normally to retrieve the data I would just do a find,

Re: welcome to cake-php members

2009-05-28 Thread number9
I am learning cakephp and have found the following very helpful: http://book.cakephp.org - overview of all (or most) cakephp stuff. http://bakery.cakephp.org - articles/code related to cakephp projects. Good place to learn about behaviours and different things. I have also found lots of cool

Re: Database design

2009-05-28 Thread harpax
Thanks for that hint with the condition. I edited my models accordingly and it works as expected regards, harpax On 27 Mai, 15:27, Martin Westin martin.westin...@gmail.com wrote: I would choose separate tables for comments, shoutbox and guestbook. The reason is that one day soon you might

Re: Error Installation CakePHP 1.2.

2009-05-28 Thread andy
If you remove the echo $html-meta('icon'); line, does the page display correctly? On May 27, 6:17 am, iammikek mi...@brightstorm.co.uk wrote: We're getting the same issue with php5.2.5 using the cake_1.2.3.8166 release so suggest the issue doesnt only apply to php4. Anyone got any ideas why

Re: Error Installation CakePHP 1.2.

2009-05-28 Thread Mike Karthauser
On Thu, May 28, 2009 11:43 am, andy wrote: If you remove the echo $html-meta('icon'); line, does the page display correctly? it doesnt make any difference with that line removed. On May 27, 6:17 am, iammikek mi...@brightstorm.co.uk wrote: We're getting the same issue with php5.2.5

invalid tree model struct in Xml

2009-05-28 Thread andrzejborkow...@gmail.com
so i have problem with Xml component my arry from find loks like that array( [Invoice] = array(...) [Seler] = array(...) so its good... after $xml = new Xml($invoice); xml loks like that (this is stupid...) invoice ... /seler .../invoice after $result = Set::reverse($xml); arr loks like

Re: invalid tree model struct in Xml

2009-05-28 Thread AgBorkowski
this working right $arr['data']['Invoice'] = $invoice['Invoice']; $arr['data']['Client'] = $invoice['Client']; $arr['data']['Seller'] = $invoice['Seller']; $arr = new Xml($arr); echo 'pre'; echo $arr; //echo new Xml($invoice['Client']); echo '/pre'; debug(Set::reverse($arr)); On May 28, 12:53 

Re: Star Rating Help

2009-05-28 Thread Henrique Machado
Great work! Henrique Machado 2009/5/27 schneimi michael.schne...@arcor.de I read about some bakery criterias the plugin doesn't match (like styles and tests), but you are right, I could give it a try anyway. You're welcome to use it. Btw I just put up a new version that also supports

Problem Uploading Flash

2009-05-28 Thread Arak Tai'Roth
So I have a problem uploading a flash video using MeioUpload in CakePHP. Here is my controller code for the add function: function add() { if (!empty($this-data['Video'])) { $mrClean =

Authenticating a CakePHP app within an already built system

2009-05-28 Thread Jenski
Hi Guys, We have an intranet, and I have decided to use CakePHP to build an application within it. We currently authenticate the users and their username/password (hashed) is stored in sessions I've managed to get this info in the bootstrap file of CakePHP so I now have

Re: Blog tutorial - I get a blank page

2009-05-28 Thread cshehadi
I apologize for the typo - I meant to write: /app/views/posts/ On May 28, 2:04 am, John Andersen j.andersen...@gmail.com wrote: Please confirm that your view directory is named views not view!    John On May 28, 1:54 am, cshehadi csheh...@gmail.com wrote: Hi, I'm trying to get through

why support php-4

2009-05-28 Thread devportals
hi friends, I couldn't understand why cake still support php-4? Don't u think going with pure php-5 way will make cake more robust? Regards, Bala. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Database and Model Design for HABTM

2009-05-28 Thread Luke
Hi, I am still a Cake newbie, but maybe someone give me a hint on my issue. I am trying to learn cake by developing a recipe site. There are Maincategories and Subcategories. F.e. BBQ - (Pork, Beef, Vegetarian) Main Dish - (Vegetarian) A recipe can belong to different Categories, so a

Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
In the model: $this-find(first, array( conditions=array( OrderDetail.id= ) ; Produces the following SQL where clause: WHERE `OrderDetail`.`id` = NULL That will never match any records (comparing anything directly with NULL always results in NULL, ie.

Re: Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread Jon Bennett
The correct syntax should be: WHERE `OrderDetail`.`id` IS NULL try: $this-find(first, array( conditions=array( OrderDetail.id=NULL ) ; hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett

Re: Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
Sorry, should have made that a bit more clear: The value is coming from a form posting. The value is a PHP null in the form post array so the condition is actually: $price = $this-Price-find(first, array( conditions=array(

Re: Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
Problem appears to be this line in cake/libs/model/datasource/ dbo_source.php $null = ($value === null || (is_array($value) empty($value))); Should be: $null = ($value == null || (is_array($value) empty($value))); I'm the value is being cast from a null to

Re: set and field of more words

2009-05-28 Thread rich...@home
Close, it should be: postOfTheMonths :-) On May 28, 9:11 am, fain182 fain...@gmail.com wrote: I'm having some trouble figuring out what the problem is here. Could you clarify why you want a variable name with spaces? ok, i want to have a form-input() that make me a select, for example,

Re: set and field of more words

2009-05-28 Thread fain182
$this-set( ??, $array_of_value); // PostOfTheMonths doesn't work, postOfTheMonths neither Close, it should be: postOfTheMonths you mean something like: camelized + pluralized + first letter in lowercase: postOfTheMonths ? it doesn't works! -- pietro

Feedback from TranslateBehavior creator needed

2009-05-28 Thread Grzegorz Pawlik
Hello, I have some issues while working with TranslateBehavior. I'll try get to the point: There's ArticleVersion model, which have this fields: id, name: varchar, introduction:text, created:datetime. I've defined to name and introduction fields to be translatable: var $actsAs =

Re: Authenticating a CakePHP app within an already built system

2009-05-28 Thread Teh Treag
Jenski, I've recently done something in a similar situation. The legacy application saved a session variable with the userid of the logged in user. For the integration of the CakePHP portions, I use that session variable. If the variable is set, the user is logged in and I know their

Determine which database driver is being used

2009-05-28 Thread blake
Hello, Not sure if this has been discussed before, but I couldn't find it. As much as I hate to do it, I think I may need to use my first custom query out of this entire website (either that or use a recursive search, which is running thousands of queries instead of just 1). My biggest issue

Form Helper to build Multiple Forms from data array from Find ('all')

2009-05-28 Thread christo
Hi, I'm pretty new to cakephp, so thank in advance for any input. I am attempting to build a series of forms in a view with form helper based on a set of data from a find('all') in my controller. The layout is that I have a course table and a schedule table, with each schedule record having a

Re: Blog tutorial - I get a blank page

2009-05-28 Thread christo
Start with a fresh install and go through the tutorial again? maybe you missed something. On May 28, 6:21 am, cshehadi csheh...@gmail.com wrote: I apologize for the typo - I meant to write: /app/views/posts/ On May 28, 2:04 am, John Andersen j.andersen...@gmail.com wrote: Please

Re: How do I bake pre-existing tables with non-conforming names?

2009-05-28 Thread christo
can't you just bake them to get the files and then tweak your models as needed for your foreign keys and such? On May 27, 8:52 pm, Jorge Garifuna garif...@gmail.com wrote: Any updates on this? On Tue, May 26, 2009 at 1:41 PM, Jorge Garifuna garif...@gmail.com wrote: I have a few

Re: Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread Gwoo
test case? this could be a problem with the proper defaults not being set for the table. --~--~-~--~~~---~--~~ 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

Re: Database and Model Design for HABTM

2009-05-28 Thread d
The only thing i see, and this may be a result of your description and not how you actually want the app to work, is that a recipe belongs to one subcategory, and it is the subcategories which HABTM main categories. In your example, steak belongs to the subcategory of beef, which in turn is in

Re: why support php-4

2009-05-28 Thread Miles J
Sadly enough, tons of people still use PHP4. But dont worry, I believe 1.3 (or maybe it was 2.0) will be pure PHP 5. On May 28, 3:14 am, devportals balasa...@gmail.com wrote: hi friends, I couldn't understand why cake still support php-4? Don't u think going with pure php-5 way will make cake

Re: Blog tutorial - I get a blank page

2009-05-28 Thread Miles J
Can I see your index actions code? And the view for it. --~--~-~--~~~---~--~~ 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,

temporary tables in cake.

2009-05-28 Thread MalContented
Hi, I am trying to use temporary tables for some data manipulation but they don't seem to work... Consider this simplified code: $sql = 'create temporary table t_hold select * from hold'; $result = $model-query ( $sql ); // This returns true $sql = 'select * from t_hold'; $result =

Re: temporary tables in cake.

2009-05-28 Thread Malcolm McLean
Oops, sorry. Forget this - I had a stupid typo in my code (it must be too late, I'm going home). Mal On 28 May, 18:29, MalContented goo...@mmcsoftware.co.uk wrote: Hi, I am trying to use temporary tables for some data manipulation but they don't seem to work... Consider this simplified

Re: Blog tutorial - I get a blank page

2009-05-28 Thread cshehadi
I've done this, no such luck, unfortunately. And I'm new to CakePHP, but not new to sys admin, or PHP programming, so I'm not in over my head here. On May 28, 12:54 pm, christo christia...@gmail.com wrote: Start with a fresh install and go through the tutorial again? maybe you missed

Re: Blog tutorial - I get a blank page

2009-05-28 Thread Gwoo
anything in the server error logs? #cakephp on irc.freenode.net for some real-time 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

Re: why support php-4

2009-05-28 Thread Gwoo
Don't u think going with pure php-5 way will make cake more robust? You can build a very robust application with Cake right now. One of the immediate goals was to ensure Cake runs on anything. This goal was more important than the perceived robustness of php5. There is nothing stopping you

Re: Blog tutorial - I get a blank page

2009-05-28 Thread cshehadi
sure, it's copied straight out of the tutorial: [u...@staging cakedir]# cat app/controllers/posts_controller.php ?php class PostsController extends AppController { var $name = 'Posts'; function index() { $this-set('posts', $this-Post-find('all')); } } ?

Re: Blog tutorial - I get a blank page

2009-05-28 Thread cshehadi
unfortunately no. When I check http headers, using Firefox plug-in I get: 200 OK When I use the command line browser links, locally, connecting to: http://localhost/cakedir/posts/index I get Error reading from socket On May 28, 1:37 pm, Gwoo gwoo.cake...@gmail.com wrote: anything in the

Problem with DISTINCT query....

2009-05-28 Thread Matt
I am trying to get a distinct list of invoices based on the customer_id using the following line: $this-set('invoices', $this-Invoice-findAll(null, 'DISTINCT customer_id')); Problem is that it doesn't work as it should since the query comes out like this: SELECT DISTINCT

Pagination with contain problem

2009-05-28 Thread Xoubaman
User HABTM Group Group HABTM User When calling pagination I get these queries: SELECT COUNT(*) AS `count` FROM `groups` AS `Group` INNER JOIN `groups_users` AS `GroupsUser` ON (`GroupsUser`.`group_id` = `Group`.`id` AND `GroupsUser`.`user_id` = 1) WHERE 1 = 1 SELECT `Group`.`id`,

Re: Pagination with contain problem

2009-05-28 Thread Xoubaman
$this-paginate['Group'] = $parametros; near the end is $this-paginate ['Group'] = $parameters; On May 28, 8:39 pm, Xoubaman xouba...@gmail.com wrote: User HABTM Group Group HABTM User When calling pagination I get these queries: SELECT COUNT(*) AS `count` FROM `groups` AS `Group` INNER

View Images

2009-05-28 Thread Dave Maharaj :: WidePixels.com
This is a simple question that has me stumped. A user uploads an image that gets saves to webroot/img/user/photos Now in the profile there is the thumbnails of the photos...but how do I get the url for that so when clicked they can view the full image in webroot/img/user/photos/large? thanks

Re: user/group dependent redirect

2009-05-28 Thread draikin
Ok. I solved the problem. Here are the steps and changes I made to my code. I hope this can help someone to fix an similar problem. 1.) app_controller $this-Auth-loginRedirect = '/users/loginRedirect'; $this-Auth-autoRedirect = false; 2.) users_controller function login() {

Re: Possible Bug? $this-find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
I'll try and get a test case done at work tomorrow. That said, I've never written a unit test before but I can post the code required to duplicate it easily... On 28 May, 17:51, Gwoo gwoo.cake...@gmail.com wrote: test case? this could be a problem with the proper defaults not being set for the

Re: users/edit function cake changes the password even when no password is provided

2009-05-28 Thread rich...@home
If you are using the Auth component, Auth will hash the blank password. The workaround I've found for this is to use a dummy password field (e.g. new_password) instead of the real password field, then in your controller::save() do if (!empty($this-data) { if

problem with cake console

2009-05-28 Thread Paulos23
Hi ppl, I have read some previous posts about cake console but nothing rly helped me.I want to use cake console to build an ACL app but i am facing a problem.I am using Xampp and the directory is: C:\Program Files\xampp ,my app path is at: C:\Program Files\xampp\htdocs\my_cake \app. Then i open

Multiple Accounts w/ Multiple Users in one Cake app

2009-05-28 Thread modethirteen
Hello, I'm fairly saavy at writing cake apps at this point but I am not sure where to start with this one. What I need to accomplish is a single Application with a single database but multiple accounts (companies), each with multiple users (employees). As much as would love to put each company

Add id to validate array

2009-05-28 Thread ross.hagg...@googlemail.com
Hi Is it possible to add an id to the model $validate array? I want to add an id that's relative to the fieldname for ajax validation. Cheers R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Saving record HABTM

2009-05-28 Thread ross.hagg...@googlemail.com
I have a HABTM association, productsAssets. As admin add a product they can select if they want to some assets. If selected they are redirect to the asset library and can then select 1 or many assets for the product_id stored in a session. When i submit one of the assets, the post values being

Re: problem with cake console

2009-05-28 Thread Sam Sherlock
I think you have not added cake to your path, anyway you don't need to alter the cake.bat file This screencast helped me set up cake console http://cakephp.org/screencasts/view/6 as a result I am now a happy baker :) - S 2009/5/28 Paulos23 paulitosthe...@gmail.com Hi ppl, I have read some

PHP SQL Server interface is not installed - Wamp server solution

2009-05-28 Thread icc97
I have now got found the solution to this problem, but thought I would share my experiences as doing a google search for this title shows up nothing but cake source code. I got the error message PHP SQL Server interface is not installed when trying to bake model for a SQL Server database. My

Missing Database table error: possibly related to model caching

2009-05-28 Thread Robert
Hi All, I am having a problem with one of our websites, all of the pages are broken, each one saying that a database table is missing. This is actually a project i have in Subversion, and is the 13th checkout of identical code. All 13 sites use the same database file structure. Upon trying to

Re: RFC 6160

2009-05-28 Thread Braulio
Hello. I just want to add a couple of comments. On May 25, 3:40 am, WebbedIT p...@webbedit.co.uk wrote: If anyone is confused with this post it is in relation to the below posting which Braulio could not reply to due to it's age:

Re: Missing Database table error: possibly related to model caching

2009-05-28 Thread Miles J
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

Re: Forms with math computations and multiple buttons

2009-05-28 Thread espontaneo
Thanks for answering my questions. The number helper is only for the view right? Can I use it on my component/controller? I have search through the internet and people don't recommend it. brian-263 wrote: OK, I understand. Why don't you use the currency method?

Re: why support php-4

2009-05-28 Thread Marcelo Andrade
On Thu, May 28, 2009 at 2:21 PM, Miles J mileswjohn...@gmail.com wrote: Sadly enough, tons of people still use PHP4. But dont worry, I believe 1.3 (or maybe it was 2.0) will be pure PHP 5. On May 28, 3:14 am, devportals balasa...@gmail.com wrote: hi friends, I couldn't understand why cake

Re: Blog tutorial - I get a blank page

2009-05-28 Thread Marcelo Andrade
On Wed, May 27, 2009 at 7:54 PM, cshehadi csheh...@gmail.com wrote: (..) If you're using Apache web server, please check your error_log file to see if you've got a Segmentation fault error. If that's the case, you could fix it reinstalling your Apache+PHP webserver. Best regards. -- MARCELO

Count array

2009-05-28 Thread Dave Maharaj :: WidePixels.com
Whats the easiest way to count the number of items in an array? I use the data in the array so its more than just a count. I simply want to find if the array has more than 5 items then pass a variable to the view to use a different div. Example: [Entry] = Array

Re: why support php-4

2009-05-28 Thread Miles J
What is there in PHP 5 anyways besides more functions, the class features (private, public, protected, static, constant), etc. On May 28, 6:44 pm, Marcelo Andrade mfandr...@gmail.com wrote: On Thu, May 28, 2009 at 2:21 PM, Miles J mileswjohn...@gmail.com wrote: Sadly enough, tons of people

Re: Count array

2009-05-28 Thread Marcelo Andrade
On Thu, May 28, 2009 at 11:05 PM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Whats the easiest way to count the number of items in an array? I use the data in the array so its more than just a count. I simply want to find if the array has more than 5 items then pass a

Re: View Images

2009-05-28 Thread Braindead
I would save the files using the user id as part of the filename e.g. user_12.jpg --~--~-~--~~~---~--~~ 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

Cake php connection with MS Sql Server 2000

2009-05-28 Thread manohar
hi, When I am trying to connect with MS Sql Sever 2000 database, it shows Notice (1024): Please change the value of 'Security.salt' in app/ config/core.php to a salt value specific to your application [CORE\cake \libs\debugger.php, line 556] Your tmp directory is writable. The FileEngine is