thread created count for cakephp sites

2007-05-02 Thread redhex
Hi all, I am doing monitoring for my site which is cake based and found the following: mysql show global status [158] Threads_cached 5 [159] Threads_connected 3 [160] Threads_created 1098 [161] Threads_running 2 I am concern with the threads_created count. I guess it is a little on the

Re: Question: Join two tables, count and sort result

2007-05-02 Thread Alexey Kuimov
My code: $this-Vendor-bindModel(array('hasOne'=array('Model'))); $fields = array('Vendor.name', 'COUNT(Model.vendor_id) AS `Vendor`.`count`'); $conditions = 'GROUP BY Vendor.id'; $order = 'Vendor.name ASC'; $result = $this-Vendor-findAll($conditions, $fields, $order); SQL: SELECT

Cannot add new records

2007-05-02 Thread Danielle Tilley
I am using the same view for both add and edit. When I click submit with an existing record everything works as it should and the changes are saved or the validation errors are returned. When I click submit with a new record - nothing happens the form is refreshed as if I had just called the

Re: thread created count for cakephp sites

2007-05-02 Thread GreyCells
Google is your friend: http://www.google.co.uk/search?q=mysql+threads_created First hit: http://jeremy.zawodny.com/blog/archives/000173.html ...might help. ~GreyCells On May 2, 7:21 am, redhex [EMAIL PROTECTED] wrote: Hi all, I am doing monitoring for my site which is cake based and

Re: Ways to send emails in Cake 1.1.x

2007-05-02 Thread wasim
can you please tell me ..how can i send attachment with mail. On Apr 24, 12:30 am, Samuel DeVore [EMAIL PROTECTED] wrote: have you gone to the Bakery http://bakery.cakephp.org/ and searched for 'email' On 4/23/07, Damien [EMAIL PROTECTED] wrote: Hi, I'm looking for the best way

Re: Cannot add new records

2007-05-02 Thread jyrgen
hi Danielle, generally i would suggest to separate the views for these different actions. For example the edit view needs to contain the item ID (as a hidden field or whatever) while the add view doesn't. However you can include shared elements as elements. Try to post some code, part of your

Re: Sessions not carying over?

2007-05-02 Thread Enchy
Ok this is my login page: /admin/index.php/users/login When I redirect to: /admin/index.php/users/index I can print the session onscreen, so this means its working. But the moment I goto /admin/ The root of the site then the session does not appear. Anybody got a solution for this?

tag behavior, where was it ?

2007-05-02 Thread thequietlab
Hi, I remember I've seen somewhere a tag behavior and now I can't find it .. Can anyone help ? Thanks, thequietlab --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

webserver setup vs. installing cake

2007-05-02 Thread korcs
Hi Bakers, I have a little problem with installing cake on a webserver. I copied the files and set up the database.php. Then when I type : http://webserver/my_cake_app then the standard welcome page is shown: CakePHP Rapid Development Your database configuration file is present. Cake is

Re: PayPal Payflow Pro Integration with CakePHP

2007-05-02 Thread ianh
I'm working on something similar to this for an app I'm building and then there is also the Bakesale project. At the moment I have a Paypal integration and an Authorize.net (AIM) integration done and both have been working really well for event registrations through eventhq.co.uk. I also need to

Re: tag behavior, where was it ?

2007-05-02 Thread djiize
The Bakery / Code / Behaviors / Simple Tagging Behavior http://bakery.cakephp.org/ On 2 mai, 11:06, thequietlab [EMAIL PROTECTED] wrote: Hi, I remember I've seen somewhere a tag behavior and now I can't find it .. Can anyone help ? Thanks, thequietlab

Re: tag behavior, where was it ?

2007-05-02 Thread Tane Piper
This was exactly what I was looking to implement, I've gone ahead and put it in but cannot seem to get it to work :( I've posted my Post model here: http://bin.cakephp.org/view/2083589101 In my Post table, I created a tags VARCHAR(255) field as the tutorial doesn't explain what it needs to be,

Having something dynamic into layout

2007-05-02 Thread [EMAIL PROTECTED]
Hi all, I have my web application made in CakePHP. In the default.thtml I have a section where I need to load dynamically some categories from the DB...how can I do that? I have, of course, the Category model and the controller ready. --~--~-~--~~~---~--~~ You

Re: Sessions not carying over?

2007-05-02 Thread Enchy
I finally got it working. Cakephp was deleting my session everytime I went to login page somehow. I dont have delete session in the controller class UsersController extends AppController { var $name = 'Users'; var $scaffold; function index() { } function login()

ANN: CMS plugin for CakePHP manager

2007-05-02 Thread mac joost
Hi, I would like to share with you the first public release of my Manager plug-in for CakePHP! It is a generic content editor for your Cake app. When installed, it reads your app's models and allows you to create, edit or delete items. It should work on any Cake app, but I have not been able to

Re: Undefined property: hashkey when using othAuth

2007-05-02 Thread matlin
How right you where. Now all I have to do is to understand how permissions are supposed to work in othAuth ... When I print out using $othAuth-getData data[Group][Permission] is empty. On May 1, 10:38 am, CraZyLeGs [EMAIL PROTECTED] wrote: Likely you have an old version. Update your cake

Re: webserver setup vs. installing cake

2007-05-02 Thread esion
Hi, You should make your domain redirect to your webroot app : -| root of your domain /cakephp/your_app/webroot and use /img/picture.jpg else you have to put the full path (of the server) of your pictures : Ex.

Re: hasMany's order question

2007-05-02 Thread matlin
Oh, you're right, I actually noticed it right after I posted but forgot to tell anyone, good catch none the less. :D Thank you. On Apr 22, 3:52 pm, gerbenzomp [EMAIL PROTECTED] wrote: As far as I can see, you just forgot to set the order clause in categoriescontroller: Change: 'Blog.created

Re: Having something dynamic into layout

2007-05-02 Thread francky06l
Maybe using ajax call to update a div in your default layout, but depends how often your layout is renderer (ie : mainly ajax calls or not). You can also place a requestAction in your default layout to retreive the data and display them. On May 2, 12:44 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]

My Cake application needs to connect to Websphere MQ

2007-05-02 Thread francky06l
Hello, I know this is not a real Cake question, but I need somehow to have a Cake based application sending data to a Websphere MQ environement. I was just wondering if someone has done this already or had some hints for the best way to do this ..?? Thanks

Re: Ways to send emails in Cake 1.1.x

2007-05-02 Thread Samuel DeVore
have you gone to the Bakery http://bakery.cakephp.org/ and searched for 'email' On 5/2/07, wasim [EMAIL PROTECTED] wrote: can you please tell me ..how can i send attachment with mail. On Apr 24, 12:30 am, Samuel DeVore [EMAIL PROTECTED] wrote: have you gone to the Bakery

model-save model-saveField : creates 2 extra rows ?!

2007-05-02 Thread Dan
Hi, At a loss on this one, I'm doing the following and the save is successfull but it's creating 2 extra 'blank' rows each time in the table $this-Modelname-id = $id; $this-Modelname-saveField('fieldname','data'); saves fine, but then creates 2 blank items in the table, each a few seconds

Re: thread created count for cakephp sites

2007-05-02 Thread redhex
GaryCells: My questions was not to know about what those number means or to know more about mysql status. This is a cakephp forum and hence I am asking does cakephp closes connections when the script dies. So any other takers? Question again: Does cakephp close all connection when the script

Fatal error: Class dbosource: Cannot inherit from undefined class datasource

2007-05-02 Thread funksplutter
Hi All I hav e aproblem with an app that I've developed using Cake and am now having to move from one server to another. Everything was working ok on the legacy server but on teh new server all I get is an error message: Fatal error: Class dbosource: Cannot inherit from undefined class

Re: thread created count for cakephp sites

2007-05-02 Thread Chris Hartjes
On 5/2/07, redhex [EMAIL PROTECTED] wrote: My question here is this: Does cakephp close all connection when the script finish running? Current I am using mysql_connect. As far as I know, PHP does this for you automatically when a script finishes executing. Not a CakePHP issue at all. --

Re: how to populate a second select-box by selecting a first with ajax ?

2007-05-02 Thread [EMAIL PROTECTED]
Has someone solved that issue? In my app everything works, except that the value of the ajax-completed box doesn't pass to the controller... On 30 Mar, 17:35, Lou [EMAIL PROTECTED] wrote: Hi, I am facing exactly the same problem and do not know at the moment how I can solve it.

Re: tag behavior, where was it ?

2007-05-02 Thread Tane Piper
Ahh, ignore me. It's because I had $actAs instead if $actsAs. Do'h On 5/2/07, Tane Piper [EMAIL PROTECTED] wrote: This was exactly what I was looking to implement, I've gone ahead and put it in but cannot seem to get it to work :( I've posted my Post model here:

Probem with custom query

2007-05-02 Thread [EMAIL PROTECTED]
Could anyone tell me why i get a strange result with my custom query in my model? I would like '#sql_4d2c_0' changed to the table name, a normal with a custom query... In the end I need a list with al the different dates in my table, without the time (date is a datetime cell). Could anyone

route confusion

2007-05-02 Thread monty
after reading some of the posts i'm a bit confused about routes on my local machine I have localhost/app/pub/action1 localhost/app/pub/action2 etc.. I want my links to be like echo $html-link('go here','/action1') to go to /pub/action1 etc.. I want this to work the same on local and live

Re: thread created count for cakephp sites

2007-05-02 Thread GreyCells
Hmmm. I thought the article answered the question 'why do I have so many Threads_created?' perfectly - and how to fix it (if indeed, it needs fixing), because Threads_created has nothing to do with cake hanging on to connections (or not). Threads_created is the number of times mysql has had to

Re: thread created count for cakephp sites

2007-05-02 Thread Chris Hartjes
On 5/2/07, GreyCells [EMAIL PROTECTED] wrote: @Chris It appears connections are not always closed at end of script: http://uk2.php.net/mysql_connect (top comment) :) but cake seems to behave impecably. Well, that's not entirely true in terms of what the commenter said. If you have a query

Re: useDbConfig

2007-05-02 Thread Greg
Cool. Thanks for the heads up. --~--~-~--~~~---~--~~ 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

othAuth Expired Sessions

2007-05-02 Thread Tane Piper
Hi folks, Having an issue with othAuth that I want to get rid of. What seems to happen is when the users session expires, if they visit any page all they get is a blank page. Checking it with Firebug, all I seem to get is an empty pre / tag in between the body tags. This of course only

Cake Helpers options array

2007-05-02 Thread [EMAIL PROTECTED]
Hi All, I searched high and low on the site and the group for this. I was wondering if there is good quick reference for possible key/value pairs that can be passed to html/form/ajax/etc helper functions that have an $options array. I'm just tired of digging through the APIs for 5 minutes

Re: Cake Helpers options array

2007-05-02 Thread robechar
There is one in the manual that is pretty good, look under the AJAX heading. http://manual.cakephp.org/chapter/helpers On May 2, 10:13 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I searched high and low on the site and the group for this. I was wondering if there is good quick

Re: route confusion

2007-05-02 Thread robechar
If you have only a couple of actions that use this, it is probably best to list those individually in your routes.php file like: $Route-connect ('/action1', array('controller'='pub', 'action'='action1')); $Route-connect ('/action2', array('controller'='pub', 'action'='action2')); ... You could

Re: model-save model-saveField : creates 2 extra rows ?!

2007-05-02 Thread robechar
The code you have should work fine, I would turn your DEBUG level up to '2' to see what queries are being run to cause this. Usually these issues are caused by something you customized in your model class, such as in a beforeSave() function that can cause strange behavior On May 2, 5:30 am, Dan

Cant get the mod rewrite going online

2007-05-02 Thread cakedude
Hi there, I've build a pretty fine web application in cake which runs absolutely smooth on my local server. However, when i try to put the app online i get the (browser) message that my browser doesn't understand the website's request. Figuring that this would have something to do with the mod

Performance Time (debug variable)

2007-05-02 Thread Alex
Hi, Is it possible to replan the concept of the debug-variable? I need to hide the performance time which is printed (index.php) as a html-comment at the end of each view. The ajax-inplaceeditor handles this comment as a value. what i need is to run in debug=1 mode and to hide the performance

Re: Performance Time (debug variable)

2007-05-02 Thread Chris Hartjes
On 5/2/07, Alex [EMAIL PROTECTED] wrote: Hi, Is it possible to replan the concept of the debug-variable? I need to hide the performance time which is printed (index.php) as a html-comment at the end of each view. The ajax-inplaceeditor handles this comment as a value. what i need is to

Re: Performance Time (debug variable)

2007-05-02 Thread robechar
You can prevent this by adding this code to your app_controller.php beforeFilter function: if ($this-RequestHandler-isAjax()) { $db = ConnectionManager::getDataSource('default'); $db-fullDebug = false; } Make sure you have RequestHandler in your components

Re: Cant get the mod rewrite going online

2007-05-02 Thread Dustin Weber
In my experiences, you can enable mod rewrite in some shared hosting environments by placing something like this in a .htaccess file: IfModule mod_rewrite.c RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule What you'll notice

Re: Ajax: drag drop, creating of objects and persisting of associations

2007-05-02 Thread Dustin Weber
Not sure if this is exactly what you are looking for, but I wrote a short tutorial relating to drag drops in Cake on my blog. Cake makes it extremely easy to build such an interface using scriptaculous. Obviously you'll have to change it around a bit to fit your particular site. You can read

session cookie delivered twice with different path restrictions

2007-05-02 Thread jyrgen
hi, i guess it happened after i activated mod_rewrite, that cookies are being delivered twice by my app. first it restricts the usage to path /app/ webroot. (Probably that's why the first login attempt always fails!) After logging in a second time, i recieve another cookie with the path /, and

Re: Cant get the mod rewrite going online

2007-05-02 Thread francky06l
I had similar problem with one ISP. Actually adding RewriteBase / before the RewriteRule makes it works, fixing the base of the rule to the webroot directory. My .htaccess in webroot looked like this : RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f

Routing and html helper

2007-05-02 Thread gerbenzomp
I've changed the routes in my app, so that my paths are like this: $Route-connect(/:sitename/, array(controller = posts, action = index)); and urls are like this: site.com/sitename/controller/action/ But the html helper automatically creates links like this: site.com/controller/action/ Is

Re: Performance Time (debug variable)

2007-05-02 Thread Grant Cox
To the OP: just modify your index.php, removing the html comment. Robechar: the RequestHandler-isAjax only detects Prototype/ Scriptaculous requests, not for any other libraries, and to change the debug you should probably use Configure::write('debug', 0);

insert more data than available from form

2007-05-02 Thread gmcerveny
I've been playing with cake and tweaking the blog demo. I want to add data into a table that is available in the session rather than just from the form. Right now my add function looks like: function add() { if (!empty($this-data)) { if

Re: insert more data than available from form

2007-05-02 Thread Grant Cox
function add() { if (!empty($this-data)) { $this-data['Idea']['user_id'] = $this-Session- read('User_ID'); if ($this-Idea-save($this-data)) { $this-flash('entry has been saved.','/ideas'); } } }

Re: Probem with custom query

2007-05-02 Thread Grant Cox
Search the group, this is just the way the PHP mysql connector returns data. But try to identify your tables and fields as Cake does, maybe that will help. $result = $this-query(SELECT DISTINCT(SUBSTRING(`Game`.`date`, 1,10)) as `Game`.`date` FROM `games` AS `Game` WHERE `Game`.`date`

change element path in renderElement

2007-05-02 Thread gerbenzomp
A while ago AD7six told me that it is possible to override the default path of an element when calling renderElement(). Up to now, it hasn't become clear to me how to change that path, and what the path should look like. When an element resides in app/plugins/my_plugin/views/elements/

Re: Routing and html helper

2007-05-02 Thread Tulio Faria
You can create another helper, like a HtmlExt (HTML Extension :) ) which do this... probably you can use the Html helper default as base Tulio, On 2 maio, 19:54, gerbenzomp [EMAIL PROTECTED] wrote: I've changed the routes in my app, so that my paths are like this:

Re: Performance Time (debug variable)

2007-05-02 Thread Mandy
Grant: Thank you for pointing out that isAjax works only with Prototype/ Scripaculous. Thats a bummer! BTW, does Configure::write work with cake 1.1.14? Thanks, Mandy. On May 3, 4:13 am, Grant Cox [EMAIL PROTECTED] wrote: To the OP: just modify your index.php, removing the html comment.

working with nested view directories using different layouts

2007-05-02 Thread finephpdude
hi, im wondering if anybody has tried to use nested view directories with multiple layouts? basically the overall design of the app requires a hotel view directory with an index.thtml page that serves as the starting point to browse into individual hotel directories, like: /views /hotels/

Re: Performance Time (debug variable)

2007-05-02 Thread themanfrombucharest
Actually it works with any library that sets the 'X-Requested-With' HTTP header. I'm using it successfully with jQuery in a current project. Cheers! On May 3, 2:13 am, Grant Cox [EMAIL PROTECTED] wrote: To the OP: just modify your index.php, removing the html comment. Robechar: the

Re: Routing and html helper

2007-05-02 Thread themanfrombucharest
If you're using 1.2 then maybe the new array based URL are what you need: $html-link('link', array('sitename' = 'a_site_name', 'controller' = 'posts', 'action' = 'index')); On May 3, 1:54 am, gerbenzomp [EMAIL PROTECTED] wrote: I've changed the routes in my app, so that my paths are like this: