Re: Mod Rewrite problem

2009-02-09 Thread Webweave
Here's a good writeup from the bakery: http://bakery.cakephp.org/articles/view/mod-rewrite-on-godaddy-shared-hosting On Feb 9, 5:53 am, thankyou wrote: > I'm not very familiar with modrewrite -- do I just add the text > "RewriteBase" to the .htaccess file? > &

Re: Mod Rewrite problem

2009-02-08 Thread Webweave
You need to add the RewriteBase to the .htaccess files in the folder where you blog is. Assuming that blog.mywebsite.com is set up to serve the files from the /blog folder, you just need to make sure you have the .htaccess files as described here: http://book.cakephp.org/view/37/Apache-and-mod_re

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread Webweave
Just means that there is a child table that has at most one row that is related to the parent, but also could have none. On Feb 7, 1:53 am, WebbedIT wrote: > Forgive me for asking what seems a dumb question .. but what is a zero > to one relationship (don't snigger too loudly ... but I'll never

Re: Can a variable defined in one view file be used in another ?

2009-02-07 Thread Webweave
Personally, I like the ability to pass variables to elements, it allows me to reuse them on the same view. For instance I have a page that displays two tables of the same type of data: one is volunteer time slots that people can still sign up for, and the other is to show the time slots that the

Re: Customized View for each User

2009-02-06 Thread Webweave
You get the currently authenticated user information from the Auth object, so in your controller, you reference: $userId = $this->Auth->user('id'); You can then use the value in your find to restrict the data. On Feb 3, 7:47 pm, psa wrote: > Hello. > > I'm new to cakePHP. > I have this problem

Re: Beginner: Cake PHP and XAMPP (windows)

2009-02-05 Thread Webweave
That error is usually seen when your .htaccess files are not in the right places. Look at http://book.cakephp.org/view/37/Apache-and-mod_rewrite On Feb 4, 8:43 am, Celso wrote: > I thanks! I did! However, I have this error: > >   Error: NotesController Create the class below in file: app \ >

Re: trouble when i try to use OOP with Cake

2009-02-05 Thread Webweave
There is no requirement to have a one-to-one relationship between models and controllers. Chris Hartjes talks about this in his blog: http://www.littlehart.net/atthekeyboard/2009/01/04/cakephp-mythbusters/ You can run your entire application with a single controller if that makes sense for you.

Re: Calling select queries within find()

2009-02-03 Thread Webweave
The only change you need to make is to add the model name in front of the star, and to make sure the count syntax results in a usable field name: find('all', array('fields' => array('Post.*', '(SELECT COUNT(1) FROM comments Comment WHERE Comment.post_id = Post.id) AS comment_count'))); On Feb 3,

Re: utf-8 encoding problem

2009-02-03 Thread Webweave
The "ci" flavors are for case-insensitive versions, so if you want "John" to be equal to "john" with no case conversion, you use one of them. The utf8_bin is the "normal" collation. On Feb 3, 10:28 am, BrendonKoz wrote: > While on this subject, which MySQL table encoding is the "normal", > defa

Re: Auth not hashing passwd with scaffolded controller?

2009-02-03 Thread Webweave
Once you turn on Auth, the passwords will get hashed automagically by Cake (assuming you have 'Auth' in your $components, and your beforeFilter logic is right). If you have existing rows that were added before you turned Auth on, you will likely need to update them so that they get stored in the

Re: utf-8 encoding problem

2009-02-03 Thread Webweave
://www.google.com/search?hl=en&rls=ig&q=%D9%85%D9%82%D8%A7%D9%84&btnG=Search, but even that does the correct search. On Feb 3, 3:50 am, mohammad al-ani wrote: > Webweave i didn't know how to explain my problem well because of my poor > English but to know what i mean with my

Re: how to config my habtm?

2009-02-02 Thread Webweave
You simply tell the model what the name of the table is as described here: http://book.cakephp.org/view/436/useTable You can always use existing table structure, it's just a little easier with things that follow the Cake convention. I do something similar with the primary key fields in my DB, si

Re: utf-8 encoding problem

2009-02-02 Thread Webweave
Well, that to me would seem to mean that you are indeed trying to access the page from a page that is not defined as UTF-8. >From Firefox, if I type مقال into the Google search box, I get a return search of http://www.google.com/search?q=مقال&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-30 Thread Webweave
The exponential number would happen if your join isn't right. Are you saying that it's fetching 8 million rows, or that you think there's a looping bug in the code? On Jan 19, 7:48 am, Dan wrote: > On Jan 16, 4:57 pm, Miles J wrote: > > > Why do you even need to grab 2800? > > I need to load t

Re: for create home.ctp page

2009-01-30 Thread Webweave
Read the cookbook, and then run 'cake bake' to build your skeleton views is the easiest thing: http://book.cakephp.org/view/108/The-CakePHP-Console On Jan 29, 11:18 pm, sagu wrote: > Hey group  I am just beginner with cake php framework.. > So how to create .ctp  file --~--~-~--~~--

Re: my html can't be show very good.

2009-01-30 Thread Webweave
Most of the IDE's and editors will let you do a global search and replace like that. I use NetBeans, and would just do a shift-command-H to bring up the "Replace in projects" dialog (another argument for using a modern IDE). On Jan 24, 2:03 am, Rimoe wrote: > Thanks,it's the reason. > > but the

Re: Any one looking for a freelance work

2009-01-30 Thread Webweave
Post your req at http://withcake.com/ On Jan 25, 12:55 am, Novice Programmer wrote: > Hello, > > Please get in touch with me if you are looking for a freelance work. I have > a site based on cakephp and want to add a few features to it. > > -- > Thanks & Regards, > Novice. --~--~-~--~---

Re: utf-8 encoding problem

2009-01-30 Thread Webweave
How did you save your files? Are you working on Windows (using character set windows-1256) ? Windoze by default saves files on the file system with the default ANSI character set. In order to get it to save as UTF-8, you have to explicitly tell it to (e.g. in Notepad change the dropdown for encod

Re: Vote for add Cakephp into Netbeans

2009-01-30 Thread Webweave
gt; need for debugging cake since it is properly structured classes, > methods etc. It is just a super-sized php application. > > So it would seem the only perk is interface design, which I tend to > avoid in IDEs since they usually add alot of extraneous code. > > Just my opinion tho

Re: AJAX in CakePHP

2009-01-30 Thread Webweave
The AjaxHelper utilizes the ever-popular Prototype and script.aculo.us libraries for Ajax operations and client side effects (see: http://book.cakephp.org/view/208/AJAX) You can use any JS libraries you want, and most of them have articles in the Bakery about how to do so. Try http://tinyurl.com

Re: CakeAmfphp

2009-01-30 Thread Webweave
A quick search gives a Bakery article about it: http://tinyurl.com/c838jz The first result is the CakeAMFPHP site, and the second is the Bakery article on using it. On Jan 29, 11:10 pm, laaptu wrote: > I am new to the cakephp framework. I am an actionscript programmer and > I need to have exten

Re: Hello to all !!! How to code for Cakephp

2009-01-30 Thread Webweave
Best place to start is http://www.cakephp.org, and read the Cookbook at http://book.cakephp.org/view/4/Beginning-With-CakePHP ... On Jan 30, 1:07 am, "maulik@gmail.com" wrote: > hi to all frnds !!! i m just a beginner for cakephp. i want to learn > so many things in cakephp. can u plz tell m

Re: CakePHP Model Advice

2009-01-29 Thread Webweave
[servings] => >             [shelf_life] => >             [prep_time] => >             [cook_time] => >             [ready_in] => >         ) > >     [Ingredient] => Array >         ( >         ) > > ) > > On Jan 29, 11:37 am, Webweave wrote: > &g

Re: Which editor for Mac OS X?

2009-01-29 Thread Webweave
On Jan 25, 10:49 am, leo wrote: > Sorry to be slow getting back - we've had a thirty hour power outage > following a storm that ripped off roofs and uprooted trees. A little > unusual here in Spain. > @everybody and nobody, I dislike Eclipse and Netbeans because > 1. (without redoing the sums)

Re: Which editor for Mac OS X?

2009-01-29 Thread Webweave
I use NetBeans with Cake and haven't seen any serious shortcomings on code completion, can you elaborate ? My only complaint with the PHP support in NB has been that it feels a bit like a bolt-on, but as the past has shown I'm sure the NB team will continue to rapidly improve that. There's also a

Re: Get count of related model

2009-01-29 Thread Webweave
You could just add a count to the fields that you are fetching like: $this->Foo->find('all', array('fields' => array('Foo.*', '(select count (1) from bars Bar where Bar.foo_id = Foo.id) as bar_count'))); I use this approach both with fields and it can also be used with conditions when you need t

Re: Creating a tagging system for uploaded images

2009-01-29 Thread Webweave
I'm not sure that I understand your question. What is the error you are getting? How are you doing the update of the related data (save, saveAll) ? On Jan 28, 9:18 am, foldiman wrote: > Can anyone give general strategy advice on building a tagging system? > I'm creating an app where users simp

Re: Vote for add Cakephp into Netbeans

2009-01-29 Thread Webweave
C'mon people, there are only 84 votes out there - If NetBeans adds Cake support I'm guessing not only would it do the cool IDE stuff it does now, but we'd be able to debug, and some level of front end for baking (like ModelBaker) On Jan 28, 9:11 am, matt wrote: > Great idea! Netbeans is an aweso

Re: CakePHP Model Advice

2009-01-29 Thread Webweave
What are you seeing in the debug data for your Recipe find? Post the controller code where you do the find, and what the data output is, and it will be easier for someone to answer your question. On Jan 28, 1:29 pm, matth wrote: > Thanks for that tidbit about the Ingredient model. > > I gave re

Re: Fatal error: CakePHP core could not be found

2009-01-23 Thread Webweave
It looks like you must have a typo in one of your config files. The word "PATH_SEPARATOR" is being placed in your PATH instead of the path separator charater (:), so there has to be a typo where you are setting up the include path. On Jan 23, 5:42 am, Mono wrote: > Hello!! > > My Cake-App works

Re: Which editor for Mac OS X?

2009-01-23 Thread Webweave
What's your objection to NetBeans? If you're using it as a PHP editor and it has all the code sense stuff like Komodo but seems to be more stable to me. On Jan 23, 6:01 am, leo wrote: > Having spent months trying to find an adequate editor for Windows, I > eventually settled on Komodo. Now I'm w

Re: Dynamic Model Call

2009-01-21 Thread Webweave
OK, I'm not sure why you are trying to do the late binding and use a variable model name, but my guess would be that there is something that hasn't been set up in the normal Cake magic of loading the code that has caused something not to be initialized. What is the rest of the stack for the error

Re: MVC Desing tips

2009-01-21 Thread Webweave
Yes, there is a learning curve for Cake, it took me a couple of weeks to even figure out that bake was the right way to get started. On Jan 21, 2:03 pm, Andrea Cardinale wrote: > On Wed, Jan 21, 2009 at 9:39 PM, Webweave wrote: > > I would suggest going through the Cookbook and doing

Re: getLastInsertId or something similar

2009-01-21 Thread Webweave
the events controller, I save the event, then redirect to the user > view.  In the user controller is where I'm trying to get the event_id > I just inserted. > > On Jan 21, 4:49 pm, Webweave wrote: > > > It will only return a value after you do an insert (a save of the new >

Re: getLastInsertId or something similar

2009-01-21 Thread Webweave
It will only return a value after you do an insert (a save of the new Event). Post the action you are having trouble with, and perhaps we can spot the issue. On Jan 19, 3:41 pm, mike wrote: > eeerrr, this is not working. > > I have this in the User model: > var $hasMany = array ('Event'); > > t

Re: MVC Desing tips

2009-01-21 Thread Webweave
I would suggest going through the Cookbook and doing a bake to get started. My typical dev cycle for Cake is: 1. Build some tables 2. Bake the app 3. Bake the models, views and controllers 4. Modify as needed. See: http://book.cakephp.org/view/113/Code-Generation-with-Bake On Jan 19,

Re: Relationships - HABTM

2009-01-21 Thread Webweave
http://book.cakephp.org/view/439/recursive On Jan 19, 7:57 am, "rhythmicde...@gmail.com" wrote: > I have been making some pretty good headway on defining the > relationships for my models. However I am not getting some data that I > expect to get. This may be due to my relationship definitions or

Re: HABTM - fields in jointable

2009-01-21 Thread Webweave
y doc i can read? i haven't find :( > > On 19 Gen, 17:03, Webweave wrote: > > > What do you mean it doesn't work? Is it not firing, or are you getting > > an error ? > > > On Jan 19, 7:05 am, Ernesto wrote: > > > > uhm... i -partially- found the

Re: XML help

2009-01-21 Thread Webweave
Of course it depends on what you're trying to do, but ... It's pretty much built in to Cake, all you need to do is set up the routing and add code if you need it. I wrote a bit about it here: http://blog.accuweaver.com/2008/12/04/cakephp-and-restful-web-services/ On Jan 21, 1:57 am, tjr88 w

Re: HABTM - fields in jointable

2009-01-19 Thread Webweave
What do you mean it doesn't work? Is it not firing, or are you getting an error ? On Jan 19, 7:05 am, Ernesto wrote: > uhm... i -partially- found the solution... > > if i load data from Customers_Controller the order_customer::afterFind > doesn't work... > > On 19 Gen, 15:29, Ernesto wrote: > >

Re: get method validation

2009-01-18 Thread Webweave
Not sure I do, looks like you got a partial post. The validate 'numeric' for id, will validate the data for your id column as numeric. You don't even need that if the field is numeric as there wouldn't be allowed automatically. IF on the other hand you are asking how do I detect if a value was p

Re: baking cakephp on MAC OS

2009-01-18 Thread Webweave
Looks to me like you ran into the same problem as I did here: http://blog.accuweaver.com/2008/12/20/moving-my-volunteercake-to-my-mac/ Basically your MySQL and PHP are not configured the same way, so you need to change one of them so that PHP can talk to MySQL. This is a pure PHP problem, the fi

Re: get method validation

2009-01-18 Thread Webweave
Not clear on what your question means, are you asking about validation rules? On Jan 18, 7:30 am, Delirium tremens wrote: > How to validate an id passed not by post, but by get? I do not have to > output an error message to hackers and crackers, do I? I tested using / > ^[0-9]{1,10}$/ as rule, n

Re: Updating a User Record

2009-01-18 Thread Webweave
Then you just need to set the model and tell it what the primary key is: $primaryKey = "email"; Then $this->Administrator->id would be the the email. You might also need to set the Auth fields to match (I do this in my App controller's beforeFilter): $this->Auth->fields = array('userna

Re: there is something missing

2009-01-18 Thread Webweave
The automated tool is just a convenience, so no you don't need to understand it. You can manage ACOs completely with bake if you want to. I don't understand the rest of your post, looks like a reply to something. On Jan 13, 3:56 pm, Delirium tremens wrote: > "We'll be doing that soon enough. Yo

Re: Questions about forms / validation

2009-01-18 Thread Webweave
The only reason your data would be getting reset, would be that you've done a find again before the form is redisplayed. Could you post the code for your edit so we can see what you're doing ? On Jan 14, 11:45 pm, Miles J wrote: > So Im working on this area where users can edit their profile, e

Re: multiple httpd.conf files

2009-01-18 Thread Webweave
e folder in the terminal or show your hidden files and   > > make sure that .htaccess file was copied correctly to the root of your   > > cake app folder. > > > On Jan 14, 2009, at 3:44 PM, Webweave wrote: > > > > Looks like you are running on Mac. > > > > If you

Re: unwanted user_id increase

2009-01-18 Thread Webweave
Looks like a documentation bug, you need to get the inserted ID before you can save the related data, so the code really should be: $this->data['Profile']['user_id'] = $user['User']['id']; Alternatively, you could use: $this->data['Profile']['user_id'] = $this->User->getLastInsertId(); W

Re: Distant Association Issue

2009-01-18 Thread Webweave
Just change your query to: $this->EventDeadline->PayGroup->User->find('all', array( 'conditions'=>array('User.id'=>$user['User']['id']), 'order'=>'EventDeadline.due_start_date' 'recursive' => 2)); That should fetch the related data for you (http://book.cakephp.org/ view/439/rec

Re: How to use cake console for baking

2009-01-18 Thread Webweave
It's in the manual (http://book.cakephp.org/view/113/Code-Generation- with-Bake), what is the problem you are having ? On Jan 16, 8:41 am, mona wrote: > Can anybody tell me how to use bake.php for baking in cakephp1.2 i > know how to use this in cakephp1.1 but i don't know in 1.2 i read the > ma

Re: Model Loading the Wrong Model

2009-01-18 Thread Webweave
Your belongsTo for 'Friend' is set up to use the 'User' model. If you want the Friend model loaded, you need to tell it to load that class instead. On Jan 16, 8:57 am, "Chad Casselman" wrote: > I am building a social network and work on the users, requests, friends > portion. > > users: id > req

Re: Installation on a shared server (Hostmysite.com)

2009-01-18 Thread Webweave
You may need to update your .htaccess with the RewriteBase directive: RewriteBase / This one change has always fixed my problems with shared hosting servers. On Jan 16, 5:34 pm, PHPScriptKiddy wrote: > Hi guys, > > I am new to cakePHP, and am trying to set up a dev installation on my > Host

Re: getLastInsertId or something similar

2009-01-18 Thread Webweave
You don't have to have two forms, you just have to save things in the right order. I do this on one of my volunteer signup (http://volunteercake.sf.net). Before the user is logged in, I display a list of jobs they can sign up for, if they click on the 'signup' link, I take them to a page that doe

Re: Counting Tags. What is the find() syntax?

2009-01-18 Thread Webweave
Easiest way I've found is just to include a select field in the query like: $data = $this->find("all", array( "fields"=>array( "Tag.id", "Tag.name", "(select COUNT(Article.id) f

Re: edit function is not working

2009-01-18 Thread Webweave
OK, I've responded about this exact code before. Just rewrite the function with Cake conventions, and remove the direct MySQL updates and you should be fine. Your code is updating the record after the save, when you could simply do the save with the query value from the count query, which should

Re: multiple httpd.conf files

2009-01-14 Thread Webweave
Looks like you are running on Mac. If you're using the built in web server, then it is located at / private/etc/apache2/httpd.conf The 'which' command doesn't find files, it just tells you where the executable is in your path. On Jan 13, 3:54 pm, neridaj wrote: > Hello, > > I just installed

Re: Writing to a database from a view

2009-01-14 Thread Webweave
You will find the data you need in $this->data after the form has submitted (assuming your form is built correctly and posting to the right action). On Jan 14, 1:39 pm, "xybersoftw...@gmail.com" wrote: > Ok got it to write to the database from the controller by hard coding: > $this->Subscription

Re: How to load HABTM Joining model in a plugin?

2009-01-14 Thread Webweave
Can you post your HABTM from your models ? It looks like you have the model file in the right place, so my guess is that the problem is in there. On Jan 14, 4:59 am, Martin Westin wrote: > Hi everyone, > > This is the first time I have tried to make a real model for a joining > table and I got

Re: Bake scripts without shell access

2009-01-14 Thread Webweave
What I do is to do the bake locally (on my Mac or PC) and then upload it to the server. Normally then all you need to do is modify your config files and .htaccess to be correct for the server you are hosting on. On Jan 14, 11:06 am, Bob Albert wrote: > I'm new to this group and CakePHP so pleas

Re: Writing to a database from a view

2009-01-14 Thread Webweave
I would suggest you run through baking a small app to see how the MVC bits fit together (http://book.cakephp.org/view/113/Code-Generation- with-Bake) The Model is where your data and business logic goes. The Controller handles getting the data from the Model and preparing it for the View. The Vie

Re: counterCache is not working in 1.2

2009-01-13 Thread Webweave
Looks to me like your relationships may not be correct. Can you post your hasMany/hasOne and belongsTo for each of the models (User/Project/Topic) ? On Jan 12, 9:45 pm, Sergei wrote: > I think I found a bug in generated countercache query: > > UPDATE `projects` AS `Project` LEFT JOIN `users` AS

Re: Fighting cakephp : can't add user count to group index

2009-01-13 Thread Webweave
Just add the field and groupings to the find (http://book.cakephp.org/ view/73/Retrieving-Your-Data) find('all', array('fields' => array('Group.*', '(COUNT(*)) as group_count', 'User.username') 'group' => array('Group.id', 'Group.name', 'Group.created', 'Group.modified', 'User.u

Re: ie7 urls messed up - http:///appname/ rather than http://localhost/appname/

2009-01-13 Thread Webweave
Sounds like you are not getting a reverse DNS for localhost. Try using 127.0.0.1 as your host name and see if IE7 works with that (or do a nslookup on localhost). On Jan 13, 1:34 am, will wrote: > Hi there, > > My CakePHP app is working fine in firefox.  In ie7, though, no css or > pictures disp

Re: validation message are not coming

2009-01-13 Thread Webweave
Like grigri says, read the manual and use Cake functionality. Below is your add function rewritten (completely untested of course) to use Cake conventions: function add(){ $this->set('sections', $this->Entry->Section->find('list',array ('fields'=>'Section.section','Section.id'))); if (

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Sounds like there was something wrong with your model in that case. Did you have your corresponding hasMany/hasOne in your Topic and Entry models ? What 'extra data' were you not getting that you expected ? On Jan 12, 12:50 pm, Miles J wrote: > Ive tried many different things but simply, I nee

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Why do you have the echo in test action of your controller ? That's going to break things even if everything else was OK. If you set debug to 2 or 3, you should get the SQL that was produced, which will help diagnose your issue. I don't think you should be calling the test method in the model,

Re: hasMany + belongsTo relationship problem

2009-01-12 Thread Webweave
to paste the var $primaryKey in my model's code. sorry. > > everything is working fine in my app. i just can't fetch Location > Types starting from persons. i'll take a look @ containable behaviour. > > thx again > > On 8 Gen, 21:43, Webweave wrote: > > >

Re: ACL's permission problem

2009-01-12 Thread Webweave
>From my experience with this, the user gets redirected back to the page that they came from. If you go to http://volunteercake.sf.net and login as jdoe/jdoe, then try to go to http://volunteercake.sf.net/slots, you'll get the "You are not authorized to access that location." error and be redirec

Re: Problem with $this->Auth->allow(array('display'));

2009-01-11 Thread Webweave
Try adding an isAuthorized method to your AppController: /** * Function to return whether you are authorized or not. * * @return */ function isAuthorized() { return true; } On Jan 9, 7:31 am, volka wrote: > Hi there, > i have > $this->Auth->allow(array('

Re: Cake ACL check

2009-01-11 Thread Webweave
As long as everything is set up properly for your app, you can just cd to the app directory and run the following from a command prompt: cake schema run create DbAcl If you don't have Cake in your path, you may need to change it to be something like: /console/cake schema run create DbAcl I'm g

Re: Loading models within the controller action

2009-01-11 Thread Webweave
I'm confused by your question, why wouldn't you just add the model to your $uses: http://book.cakephp.org/view/53/components-helpers-and-uses That's the standard way of including a model in your controller. On Jan 10, 10:56 pm, Miles J wrote: > Der... I could call $this->loadModel(). --~--~

Re: Deployment Issues

2009-01-11 Thread Webweave
n Jan 11, 5:16 pm, "Chad Casselman" wrote: > I am 99.9% sure that mod_rewrite is working.  I haven't ever had > trouble with it before and would it work when allow all was on if > htaccess wasn't working.  It is only the users/login that is not > mapped or mapping co

Re: Session trouble

2009-01-11 Thread Webweave
First, you really don't want to read the session from the view, it should be done from the controller. Second, the error you are getting sounds like the value wasn't set in the session, so either you are referencing what you set incorrectly, or you need to query for it. The last inserted ID will

Re: Deployment Issues

2009-01-11 Thread Webweave
Sounds like you may have a problem with your .htaccess or routing. Are you using the default .htaccess files ? Is mod_rewrite enabled ? On Jan 10, 5:35 pm, "Chad Casselman" wrote: > I have been developing my first cake app locally for the past few > days.  I uploaded the files to my dedicated

Re: Small problem passing variables

2009-01-08 Thread Webweave
User.id');?> >         input('user_id', array('type' => 'hidden', > 'value' > => $user_id));?> > > And in a controller: >         $this->Session->read('User.id') > > Any suggestions? Any help would be

Re: urgent help

2009-01-08 Thread Webweave
nd never redirected so what your > suggestions. > > On Wed, Jan 7, 2009 at 6:35 PM, Webweave wrote: > > > if you change the debug level, you should be able to see the error > > that is causing the problem. > > > My guess would be a problem with the rewrite stuff

Re: How to do this in cakephp

2009-01-08 Thread Webweave
$count = $this->Entry->find('all', array('fields' => array('(max (Entries.counter)) as max_counter')); Will return an array with the max_counter value in it. On Jan 8, 8:29 am, mona wrote: > I know how to handle queries but i don't know how to fetch values of > variables for example > i wan't t

Re: How to upload cakephp project on to the server

2009-01-08 Thread Webweave
Header already sent means that there is something that is spitting out data to the stream before your page starts to render. Could be some left over debug code, or an actual problem with the page. Set debug to 2 and you should be able to see the problem (either in the page, or in the logs) On J

Re: hasMany + belongsTo relationship problem

2009-01-08 Thread Webweave
Since you are using "non-standard" names for your ID columns, you need to specify $primaryKey in your models, so your Person model, you would need: $primaryKey = 'location_id'; If you set debug to 2 or 3, you'll see the queries being executed. You may need to set recursive to get the non-related

Re: is this bug

2009-01-08 Thread Webweave
mad al-ani" wrote: > yes believe me every thing is fine and all stuff  in its place and when I > use the firefox the problem is disappear > > On Thu, Jan 8, 2009 at 11:11 AM, Webweave wrote: > > > Is you layout in the right location ? > > > As long as you have a

Re: is this bug

2009-01-08 Thread Webweave
Is you layout in the right location ? As long as you have a page.ctp in yourapp/views, setting layout to 'page' should work. On Jan 8, 10:15 am, medo wrote: > hi all > > yesterday I asked you about the error I faced when try to log in to my > site with /users/login and the error was the auto re

Re: How to do this in cakephp

2009-01-08 Thread Webweave
I'm not sure I understand your question, but if you have a field you want to save a counter in, you can do this in the model using countCache: http://book.cakephp.org/view/445/cacheQueries If on the other hand you need to find the count from some set of values, you can simply use find('count'):

Re: urgent help

2009-01-07 Thread Webweave
if you change the debug level, you should be able to see the error that is causing the problem. My guess would be a problem with the rewrite stuff in your htaccess files. On Jan 7, 2:16 pm, "mohammad al-ani" wrote: > I use auth > > On Wed, Jan 7, 2009 at 1:57 PM, gearvOsh wrote: > > > Are you

Re: validating and comparing dates with models

2009-01-06 Thread Webweave
You can definitely do queries in the validation, and it sounds like you're on the right track. Read http://book.cakephp.org/view/152/Custom-Validation-Methods and it will give you some ideas. I think your other question is how to write a query that will tell you if the range overlaps an existing

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Webweave
the same time. On Jan 6, 1:39 pm, Aus wrote: > Webweaves, > thanks for your answer, > > is there any ´solution to access back servers behind NATs and proxies? > > Aus > > On Jan 6, 9:56 pm, Webweave wrote: > > > Note that this can be misleading for people using

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-06 Thread Webweave
htaccess I get to the CakePHP-info page. > > On 6 Jan, 10:44, will wrote: > > > Thanks for this, > > > I've read that, just to clarify, I don't have access to a httpd.conf > > file - I'm on a shared server. > > > Thanks. > > > On 5

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-06 Thread Webweave
27;t have access to a httpd.conf > > file - I'm on a shared server. > > > Thanks. > > > On 5 Jan, 18:02, Webweave wrote: > > > > You have to look in the httpd.conf file to see if it is allowed or > > > not. You should see something like LoadModule

Re: Auth Login Component not working :(

2009-01-06 Thread Webweave
And then you will be very, very, very secure ;-) On Jan 6, 6:34 am, mark_story wrote: > Don't allow('login') you will never be able to login, just like the > docs say. > > -Mark > > On Jan 5, 4:15 pm, Darren884 wrote: > > > Hi I am trying to return a rendered element so I have to customize the

Re: Unterminated String Literal in Javascript

2009-01-06 Thread Webweave
OK maybe I'm just being obtuse, but why would you put in newlines in the string you're building and then str_replace them out ? If you're going to pull them out anyway, why not just build the string without them in the first place: # $js_ret = '$("task-' js_ret .= $task['Task']['id']; $js_ret .=

Re: get error duting 'cake acl initdb '

2009-01-06 Thread Webweave
Check your /config/core.php file and verify that it has the following lines unchanged: /** * The classname and database used in CakePHP's * access control lists. */ Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); If so, validate you hav

Re: Problem with "multiple display fields" behavior, trying to use Joins

2009-01-06 Thread Webweave
Your paste shows the Evaluation model, with a belongsTo for the Utilisateur, but your find appears to be from the Autorisation controller (since you have $this->Autorisation->Evaluation). I would think at a minimum, your find should be using: $this- >Autorisation->Evaluation->Utilisateur, or $thi

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Webweave
Note that this can be misleading for people using proxy servers, since you'll get the IP address of the proxy instead of the actual machine in most cases. Same is true for NAT based IP addresses, you will typically get a single IP address for a NAT subnet. On Jan 6, 11:53 am, Aus wrote: > Fantas

Re: include calculated data in the model

2009-01-06 Thread Webweave
Depends on your model. If you always fetch the data for the related orders, it would be fairly simple to create a "virtual field" by adding some code in your afterFind and/or beforeSave methods. The Unobtrusive Date Picker uses this method to create a date formatted date for the page to use (see:

Re: ModelBaker ... umm... yummy

2009-01-06 Thread Webweave
It's on their web site now: 399 for an individual license. Hope they at least donated to CakePHP On Jan 4, 6:03 pm, Webweave wrote: > Yeah, CakeApp, that was it (although webbaker looks interesting too). > > Anybody have an idea whether ModelBaker is going cost anything? &

Re: New Install Does Not Show Graphics

2009-01-05 Thread Webweave
First look in /usr/local/apache2/conf/httpd.conf and see if rewrite is enabled. Then if that bit is correct, run the following command: apachectl -t -D DUMP_MODULES You should see something like "rewrite_module (shared)" if it is loaded. On Jan 5, 5:30 pm, reidster wrote:

Re: 404 error

2009-01-05 Thread Webweave
Your app is in a sub-directory, if you want it to be in the root, you need to change your configuration or move the app up a directory. Apparently you have the app for posts in the root for that web server, which is why it works with /posts/edit On Jan 5, 12:43 pm, sarahlou wrote: > I'm a newbi

Re: setting up cake bake console

2009-01-05 Thread Webweave
Step 1: change directory to where your app lives (in your example above /Users/myusername/myappname) Step 2: from a console, type "cake bake" Step 3: follow the prompts ... On Jan 5, 1:15 pm, gemmes wrote: > Hi, > > I ran: > > cake bake > > I entered my path to appname and proceeded along with n

Re: New Install Does Not Show Graphics

2009-01-05 Thread Webweave
It should be compiled into Apache so you shouldn't have to download it separately. What platform are you on? On Jan 5, 1:31 pm, reidster wrote: > This is all I see in modules.  I know this isn't an apache group. > But, do you know if apache requires any special configure options for > mod_rewrit

Re: List users who are logged in

2009-01-05 Thread Webweave
You can get some of this if you set up your app to use the database to store sessions. Look at config/core.php where it talks about setting Session.save to 'database' On Jan 5, 10:50 am, Bernardo Vieira wrote: > AFAIK you'd need to create custom login and logout actions in your users > controlle

Re: debug a failed save()

2009-01-05 Thread Webweave
Did you try setting debug=2 or 3 so you can see the queries that were executed, and the data ? The code you posted doesn't show you disabling validation, Cake does the validation unless you a) remove any validation from the model or b) you explicitly turn off validation in your save call. Withou

  1   2   >