Re: Another cakephp success story

2010-03-10 Thread WebbedIT
Tried adding my small hosting company as a host and end up at a page with a source of just dbr/ url: http://www.host-rater.com/hosts/submitForm2 Regards, Paul Gardner, Webbed IT Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

Re: Pagination conditions involving associated data

2010-03-10 Thread WebbedIT
counterCache is your friend: http://book.cakephp.org/view/816/counterCache-Cache-your-count Let cake automatically manage the count of photos in each album and then you have a condition available in your Album model. Saves on a boat load of extra queries and loops when paginating so much more

Re: I have an ORM problem

2010-03-10 Thread WebbedIT
Before you move to your view, make sure your controller is sending the right data to the view. In your controller run your find $books = $this-Book-find('all'); Then debug the results to make sure you are getting your Authors echo debug($books); If you are not then you need to look at why

Re: initialize model link make the apps very slow

2010-03-10 Thread WebbedIT
How slow is slow in your case? I am running apps with 50+ models quite happily using 1.2.5 and slightly smaller apps on 1.2.6 without issue. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you

Re: How to save data in an associative model without deleting the old related records.

2010-03-10 Thread WebbedIT
@Weather It is standard practice on a HABTM join table to delete all existing records then run a new insert, this is the most efficient way to do it as requires fewer SQL calls and PHP loops, plus it ensures there is no duplication of selected options which would cause problems at a later date

Re: Initial loading of Cake problem: Trying to get property of non-object in ...

2010-03-10 Thread WebbedIT
How have you installed Apache and PHP? I suggest you use a package such as WampServer 2 (what I use) or Xampp. 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

Re: SaveAll HABTM Saving to wrong tables...

2010-03-10 Thread WebbedIT
You're probably right nurvzy, but if many contacts can have the same phone number, then he could want a HABTM association. If so there are a few other issues with his setup Table contacts_phone should be contacts_phones, as nurvzy said, but it also requires an id field (all cake tables require

Re: Failed to initialize storage module: user

2010-03-10 Thread WebbedIT
If trying to get apache/php/mysql working on windows, I would stronly reccomend WampServer2 (what I use) or Xampp 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

Re: Another cakephp success story

2010-03-10 Thread John Andersen
Congratulations :) Now hereby my comments: 1) When search is not finding anything, don't assume that I would like to add the host, I may have entered the wrong URL, so I would like to stay in search! 2) Do not use Please contribute for adding new hosts, use the same term as elsewhere Add host!

possible bug with virtualFields

2010-03-10 Thread Ernesto
Hello. i have a simple app running 2 models Order hasMany Item Item belongsTo Order the code field in in both models but in ItemModel this is a virtual field var $virtualFields = array(code = CONCAT(Order.code, '-', Item.n)); here's the problem: $myItem = $this-Item-find(all, array(

Re: decimal validation

2010-03-10 Thread Eleazar
Hi, sorry to ask, still struggling with this... is it possible to allow integer numbers and decimals on the decimal validation rule? thanks On Mar 8, 7:19 pm, Eleazar gerrit.kru...@gmail.com wrote: Hi all, I'm not sure if it's possible or if I have to write my own regex, but my input data

Re: Exporting large amount of data from cake application

2010-03-10 Thread barduck
That's an interesting article that contains some useful information. However, I don't think it directly applies to my problem. I think that the techniques described in the article are best suited for situations when you have large amounts of complex data that you need to be able to display

Re: Pagination conditions involving associated data

2010-03-10 Thread WhyNotSmile
That's brilliant, thanks! On 10 Mar, 08:48, WebbedIT p...@webbedit.co.uk wrote: counterCache is your friend:http://book.cakephp.org/view/816/counterCache-Cache-your-count Let cake automatically manage the count of photos in each album and then you have a condition available in your Album

CakePHP + JS/AJAX - performing actions on browser window close - is it possible?

2010-03-10 Thread Anna P
Hello! I have a question, is there a way to perform an action, when user tries to close browser window? For example: in an on-line store, when unregistered user places some order and doesn't proceed to payment system (its order is still not paid) and wants to leave website/close browser window.

Re: find list with CONCAT returns empty data

2010-03-10 Thread Eleazar
Thank you both, you solved my problem! ^_^ Just on a side note, I still had to specify the fields, id and name in the find(list) function. Looks like if the 'name' field is virtual, it doesn't get picked up automatically. Thanks again!! On Mar 9, 1:49 pm, nurvzy nur...@gmail.com wrote: So in

pls help me in cake php model method

2010-03-10 Thread nagendran
i am beginner to cake php. my table name is tbl_admin i created one model with file name tbl_admin.php. Model code: class Eego_tbl_admin extends AppModel { var $name = 'tbl_admin'; function finduser() { //$ff=$this-query(select count(*) from tbl_admin where admin_username='admin'); return

Re: pls help me in cake php model method

2010-03-10 Thread Jeremy Burns
You are not conforming to Cake standards. So, whilst you could *probably* make it work your own way, you are miles better off following the guide. In your example: Your table should be called users (it should have a primary key called id) Your model should be called User (in a file called

Video Conférence within Cake !!

2010-03-10 Thread Abraham Boray
Anyone of u guys , know how to implement a video conference within cakePHP, like an existing API, Or Anyway, Hope I can Get Some Feed Back, I really Need this 4 a School project Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: Video Conférence within Cake !!

2010-03-10 Thread Renato de Freitas Freire
I think you may need something more then just cakephp, like some flash or java app to capture webcam and voice from users computer. -- Renato de Freitas Freire ren...@morfer.org On Wed, Mar 10, 2010 at 11:40 AM, Abraham Boray abrahambo...@gmail.comwrote: Anyone of u guys , know how to

RE: Video Conférence within Cake !!

2010-03-10 Thread Alan Asher
My first instinct is to embed skype or something like that. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Abraham Boray Sent: Wednesday, March 10, 2010 7:40 AM To: CakePHP Subject: Video Conférence within Cake !! Anyone of u guys ,

Re: I have an ORM problem

2010-03-10 Thread Mónico Briseño
Hi, all. Thanks Paul, for your time to help me in this ORM stuff. No authors in Book find command. Models ?php class Author extends AppModel { var $name = 'Author'; var $hasMany = 'Book'; } ? ?php class Book extends AppModel { var $name = 'Book';

Re: Checking RequestHandler::isPost() vs Controller's data

2010-03-10 Thread Jimmy Bourassa
Thanks Miles, Can you be a bit more specific regarding the bugs you've seen? Thanks, On 10 mar, 00:17, Miles J mileswjohn...@gmail.com wrote: Yes exactly. RequestHandler would force it only if the HTTP method is POST, where as $data would work no matter what source it came from. I prefer

cakephp blog

2010-03-10 Thread pzero
Hallo zusammen, Ich habe ein Blog mit Cakephp erstellt hab aber zwei Probleme die ich nicht lösen kann. Und zwar erstellt mein Blog beim editieren eines Posts ein neuer Post anstatt dass der post editiert wird. Ein zweites Problem ist wenn ich ein neuer Post erfassen will nur strings ohne

cakephp blog english

2010-03-10 Thread pzero
Good Morning together, I created a blog with Cakephp and now I have two issues. If i edit a post instead of updating this post my application create a new post, and the second issue is by adding a new post. If i write in my title and in my comment box text without blanks it works, but if i write

How to update multiple table data using saveall

2010-03-10 Thread newtocake
Hi, I want to update data of several tables when I edit them, but somehow, it creates new records. :( Does somebody have any idea? books table [id, name, user_id] users table [id, name, password] comments table [id, comment, user_id, book_id] [books_controller] var $uses =

Re: How to update multiple table data using saveall

2010-03-10 Thread josu jauregui
Hi! You may to assign an id to the object; if the object doesn´t have an id, cakephp creates a new record. Try this: function edit($id = null) { if (!empty($this-data)) { * $this-Book-id=$id;* $this-Book-saveall($this- data);

Re: How to update multiple table data using saveall

2010-03-10 Thread Jeremy Burns
debug($this-data) and check that the primary keys (id) have values in them. If they do, Cake should update those rows. If they are blank, Cake assumes you want to add new ones. When you create the form, populate the id field (hidden, I guess) with the value from the $this-data array. Jeremy

updateAll problem in 1.3RC1

2010-03-10 Thread Ernesto
Hello $this-Order-updateAll(array(date_purchase = date(Y-m-d H:i:s)), array(id = $order_id)); throws this error Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '16:31:34 WHERE

Re: updateAll problem in 1.3RC1

2010-03-10 Thread Jimmy Bourassa
Yes, it is documented in 1.2. The $fields array accepts SQL expressions. Literal values should be quoted manually. from http://book.cakephp.org/view/75/Saving-Your-Data On 10 mar, 10:34, Ernesto e.fanz...@gmail.com wrote: Hello $this-Order-updateAll(array(date_purchase = date(Y-m-d H:i:s)),

Re: How to update multiple table data using saveall

2010-03-10 Thread newtocake
Thank you! If I assign an id correctly, cake updates as I wanted! On Mar 11, 12:23 am, josu jauregui jos...@gmail.com wrote: Hi! You may to assign an id to the object; if the object doesn´t have an id, cakephp creates a new record. Try this: function edit($id = null) {                if

Re: Searchable behavior on two models

2010-03-10 Thread Foroct
Well it looks like this behaviour can't successfully index two different models. Moving back to an old fashioned 'find'. Thanks all. 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

sql like 's%' error

2010-03-10 Thread Glikis
Everything is explained in the link. http://bin.cakephp.org/view/1645372860 can anyone tell me my mistake ? thank you for you time! -- link says: //i write this in the controller $books = $this-Book-find('all', array(

Re: sql like 's%' error

2010-03-10 Thread designv...@gmail.com
'conditions' = array('Book.title LIKE' = 'S%'), NOT: 'conditions' = array('Book.title' = 'LIKE S%'), On Mar 10, 4:11 pm, Glikis nikosgli...@gmail.com wrote: Everything is explained in the link. http://bin.cakephp.org/view/1645372860 can anyone tell me my mistake ? thank you for you

Re: cakephp blog english

2010-03-10 Thread cricket
On Mar 10, 4:10 am, pzero domenico.gu...@gmail.com wrote: Good Morning together, I created a blog with Cakephp and now I have two issues. If i edit a post instead of updating this post my application create a new post, You need to include a hidden field in the form for the id. echo

Re: I have an ORM problem

2010-03-10 Thread Martin Duris
yeah, debug yout $book variable is good point (or just use print_r($book)) even that, i still think problem is Author - Name (acording to the your error log ...) 2010/3/10 WebbedIT p...@webbedit.co.uk: Before you move to your view, make sure your controller is sending the right data to the

MediaView feature request

2010-03-10 Thread Scott
I have a custom View implementation that provides file download very similar to the MediaView with one extra feature: by setting the var 'remove' the file will be unlinked after successful download. It makes one-off downloads simple (e.g. when creating a large zip file that we don't want stored

Re: decimal validation

2010-03-10 Thread cricket
This regexp should do it: '/^[0-9]+(\.?[0-9]+)?$/' But you should probably just use is_numeric() On Mar 10, 5:19 am, Eleazar gerrit.kru...@gmail.com wrote: Hi, sorry to ask, still struggling with this... is it possible to allow integer numbers and decimals on the decimal validation rule?

Re: Checking RequestHandler::isPost() vs Controller's data

2010-03-10 Thread Miles J
The main problem I always would run into would that it would not recognized a POST, so the form would do nothing. I would usually have to submit it twice before it worked. Never figured out why it did that. On Mar 10, 7:03 am, Jimmy Bourassa jboura...@gmail.com wrote: Thanks Miles, Can you be

Re: CakePHP + JS/AJAX - performing actions on browser window close - is it possible?

2010-03-10 Thread cricket
This isn't really a Cake question. You'd probably get a better response from a javascript list. I did something like that once. IIRC, you need to register a function to fire for body.onUnload because window.onClose is unreliable unless you used JS to open the window in the first place. Something

Re: Calling custom methods in related models

2010-03-10 Thread WebbedIT
We all have moments where we are sure there is something wrong with Cake, but most of the time it's our implementation of Cake :) Glad you found it. Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

cake php XML parser timing out after 30 seconds (not max_execution_time or max_input_time limit)

2010-03-10 Thread cartosys
code: $link = 'http://some.xml.feed.xml'; $parsed_xml = new XML($link); $parsed_xml = Set::reverse($parsed_xml); The XML feed at hand is one that took over a minute to load via browser. cakephp's XML returned an empty array after Set::reverse, and always after ~30

Re: Exporting large amount of data from cake application

2010-03-10 Thread Zaky Katalan-Ezra
Put this line into a script file, .sh ot .bat, without the square brackets. mysql -u[youruser] -p[youruserpassword] [yourdatabase] -eselect * from yourtable --xml data.xml Run the script from your site. When the script return use the text file data.xml. There is a security issues you need to

Re: cake php XML parser timing out after 30 seconds (not max_execution_time or max_input_time limit)

2010-03-10 Thread Martin Duris
dont know exact answer...but maybe i can help you or point you to some good way if i understand...you want to parse some xml from web - mean, download xml and parse it ... so, maybe u should try to avoid using cakephp defined functions (create some component to download and parse zml - witch you

Re: Exporting large amount of data from cake application

2010-03-10 Thread barduck
Zaky, thanks for your reply. But this doesn't really answer my question. I didn't ask how to generate an xml file from a sql query, I know how to do that... I asked how to do it from cake, as a response to a request, on demand, because I need to consider various input parameters, dynamically

Missing helper file using recaptcha plugin

2010-03-10 Thread Jesus Angel
Hi! The plugin http://www.holostek.net/recapthca-v0.8.0 doesn't work for me. I'm using it in my Users controller: class UsersController extends AppController { var $name = 'Users'; var $components = array( array('Recaptcha.Captcha', array(

Re: Missing helper file using recaptcha plugin

2010-03-10 Thread Jesus Angel
Forget it The directory permissions were wrong (700) and www-data couldn't find the captcha.php component. The missing_helper_file.ctp has the helpers path hardcoded: ?php echo sprintf(__(The helper file %s can not be found or does not exist., true), APP_DIR . DS . views . DS . helpers . DS .

Re: Searchable behavior on two models

2010-03-10 Thread Jon Bennett
hi, Well it looks like this behaviour can't successfully index two different models. Moving back to an old fashioned 'find'. I have the behaviour attached to multiple models, with no issues at all, not with saving or with retrieving. There's something amiss elsewhere. Cheers, J Check out

Introducing VaM Cart - CakePHP Shopping Cart

2010-03-10 Thread VaM
VaM Cart - Free, Open Source CakePHP Based Shopping Cart. Official Site - http://vamcart.com/ Online Demo - http://vamcart.com/demo/ Admin: http://vamcart.com/demo/admin/ Login: admin Password: password * Easy Installation. * CSS, JS minify and compress. * SEO - Search Engine Optimization. *

Re: sql like 's%' error

2010-03-10 Thread Glikis
I actually copied it from a book, and thats exactly how it was written. Thank you. 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

Login to the cms with cakephp

2010-03-10 Thread randi.dc
I have created a login module to log in the my cmc build on cake php. On the login screen check( 'Message.auth' ) ) $session- flash( 'auth' ); ? create( 'User', array( 'action' = 'login' ) ); ? message appears. And Loign doesn't work. ANy idea how to get this running? Please help Check out the

Re: Introducing VaM Cart - CakePHP Shopping Cart

2010-03-10 Thread Graham Weldon
Mothers, hide your daughters! Its GPL! Cheers, Graham Weldon e. gra...@grahamweldon.com p. +61 407 017 293 w. http://grahamweldon.com On 11/03/2010, at 5:25 AM, VaM wrote: VaM Cart - Free, Open Source CakePHP Based Shopping Cart. Official Site - http://vamcart.com/ Online Demo -

Re: Designing a form builder - Ideas

2010-03-10 Thread @pauldatta
@renato Very interesting. Why did you choose cake as a framework? I had to decide between CodeIgniter and Cake and though I've used CodeIgniter before, decided upon using Cake after much thought - I have no regrets :) Its pretty good. There is another tool you can use - lime survey -

Concept of seamless registration

2010-03-10 Thread Yura Linnyk
Hello fellow bakers, I've just baked a simple web-app, http://WhenDidYouLast.com, where I implemented a proof of concept I had been thinking for a while - a passwordless seamless registration, where you don't have to register and don't have to remember you password, just enter your email, check

Re: Help to decide to use cakephp

2010-03-10 Thread @pauldatta
Dear Tiago, I decided to use cake about a month ago over CodeIgniter and Symphony (other capable PHP frameworks) as I liked its automagic'ness and the fact that it actually caused programmers to write good code. The advantages of using Cake over other frameworks are many and I can assure you that

Re: Exporting large amount of data from cake application

2010-03-10 Thread Zaky Katalan-Ezra
Still, after you have your query you can send it to the script as a parameter. You can run script with a call to php system('path\to \your\script',$retval). The point is to use mysql to do the job alone with no additional buffer like php. Check out the new CakePHP Questions site

Re: Concept of seamless registration

2010-03-10 Thread Zaky Katalan-Ezra
You give access to whom ever have the link from the email. If I forward this mail to some one else you still recognize him as me. If you use authorizing links like this http://WhenDidYouLast.com /OIHOIUE9009OI8KHHHEF/ to identify your users it's possible to scan for url's like this ad probably

Re: How use __consruct in model

2010-03-10 Thread Jets
Thanks Andy...its working now... On Mar 9, 8:10 pm, Andy Dirnberger andy.dirnber...@gmail.com wrote: You need to do two things: 1. Accept all of the parent constructor's parameters 2. Call the parent constructor function __construct($id = false, $table = null, $ds = null) {  

doubt clarification

2010-03-10 Thread sooraj francis
hi I am new to cakephp. I am using apache version _2.2.15. i dont have access to to the htdocs. Is there any way i enable the mod reewrite option with in our cakephp application using .htaccess. How i can know whether mod_rewrite is enabled. Check out the new CakePHP Questions site

Re: Introducing VaM Cart - CakePHP Shopping Cart

2010-03-10 Thread humbao
Yeah, too bad. If that project wants traction or designers making nice templates which they can charge for, the license has got to go. Not to mention payment modules or other cool functionality. BSD/MIT all the way... Too bad Bakesale is AWOL and struggling to keep up with 1.2/1.3 but at

Re: sql like 's%' error

2010-03-10 Thread John Andersen
Hi Glikis, I suggest you study the CakePHP manual at http://book.cakephp.org/ and pay attention to http://book.cakephp.org/view/73/Retrieving-Your-Data#Complex-Find-Conditions-74 which is exactly about your issue. Also, if you only copy and don't understand what you are copying, then don't

Re: Login to the cms with cakephp

2010-03-10 Thread John Andersen
Please ensure that your php code and your html code is not mixed up in the login view! That seems to me to be your issue here! Enjoy, John On Mar 11, 5:25 am, randi.dc randi...@gmail.com wrote: I have created a login module to log in the my cmc build on cake php. On the login screen check(

Re: doubt clarification

2010-03-10 Thread John Andersen
Make a small script that will give you the php information: [code] ?php phpinfo(); ? [/code] Then look for the Apache configuration, find the row named Loaded Modules and in the adjoining cell, find mod_rewrite. If it is there, you have mod_rewrite available to you! Enjoy John On Mar 11,

Expandable Behaviour Data not available when record obtained via habtm

2010-03-10 Thread #2Will
Hi, I have a model with the expandable behaviour from debuggable, and its working great to add meta data to my content rows. When I add related content via a habtm relationship, the expanded fields arn't available. Has anyone else found this problem, and maybe an easy fix? so my contents table

Re: I have an ORM problem

2010-03-10 Thread WebbedIT
@monico can you show us what the echo debug($books); outputs and the structure of your two tables? HTH Paul 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