Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-08-15 Thread Alan Read
k.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to a topic in the > Google Groups "CakePHP" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/cake-php/2Vqixc1U

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-08-15 Thread Alan Read
Hi Dakota, Thanks for clearing that up! I haven't looked at the source for CakePHP 3 yet so I didn't actually see how they implemented it. I should do more research next time as I don't want to mislead anybody... On Fri, Aug 15, 2014 at 3:32 AM, Dakota wrote: > Hi Alan, &g

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-08-14 Thread Alan Read
ng on GitHub >> https://github.com/cakephp/cakephp/issues/new >> b) Fork the code, change it, prove that it really solves the problem >> without breaking anything else and create a Pull Request >> https://github.com/cakephp/cakephp/ >> >> Thanks >> Marc &g

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-08-09 Thread Alan Read
Hi Jordan, I am having the same issue (cakephp 2.5.3, sql server 2008 r2) and I was able to fix it by overriding the SqlServer driver and changing the following line (line number 772) $prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL); to $prepareOptions += array(PDO::ATTR_CURSO

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-08-09 Thread Alan Read
Changing the line: 772) $prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL); to 772) $prepareOptions += array(PDO::ATTR_CURSOR => PDO::*CURSOR_FWDONLY*); in the _execute function inside of Sqlserver.php solved this issue for me On Wednesday, May 28, 2014 5:19:09 PM UTC-4, Jordan H

Re: Security Release - CakePHP 1.2.12, 1.3.16, 2.2.8 and 2.3.4

2013-04-30 Thread Alan W
Can you tell what release this problem was introduced, I think it was 1.2RC2, right? On Sunday, April 28, 2013 4:37:05 PM UTC-4, mark_story wrote: > > If you are using CakePHP's PaginatorComponent without whitelisted sort > fields you should upgrade as soon as possible to prevent > possible SQL

Re: Paginate a containable association

2012-03-16 Thread Alan Wagstaff
', 'name'), ), ); return $query; } return $results[0]; } And finally, a new finder in the Post Model: protected function _findForTopic($state, $query, $results = array()) { if ($state == 'before') { $query['contain'] = array( 'Member' => array( &

Paginate a containable association

2012-03-15 Thread Alan Wagstaff
7;Post' => array( 'limit' => 5, ) ); public function view($id) { $topic = $this->paginate(array('Topic.id' => $id)); ... } So, to clarify, I want to fetch a single topic, but use Paginate to limit the number of posts that are returned and allow me to use

Looking for a CakePHP developer for a full time telecommute position (US only)

2010-06-23 Thread alan
http://docs.google.com/View?id=dfw8qvgc_58dn9dpbdv Job Description – Core PHP Developer and IT Administration (CakePHP) We are interested in hiring another developer/IT support person. This person would join our team of 3 developers and we support a company of over 20 people with several major ap

LazyLoading of models

2010-06-19 Thread Alan Asher
te to eachother too. Does cakephp1.3 do lazy loading by default? Does anyone have a solution to loading models and/or binding models on the fly? Alan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message be

efficiency vs conforming to standards

2010-06-17 Thread Alan Asher
p into 2 sql statements so even with a limited amount of 20 results, there's a lot of redundancy and it costs time and processing. I'm about to rewrite all my inefficient finds into queries that have my own custom joins. Does anyone have suggestions how to get the photos table to show up

Speed and performance

2010-06-10 Thread Alan Asher
models and all it's recursions, it takes forever since I have 88 tables that all relate to the user some how. Does anyone have suggestions? Alan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

RE: User creation issue.

2010-04-23 Thread Alan Asher
Ya.. totally, let's see some code. It sounds like you're using some out of the box code and never took out $this->Auth->login($this->data); -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of cricket Sent: Friday, April 23, 2010 6:16 PM T

RE: Serialize Form

2010-04-23 Thread Alan Asher
lternative authentication like google auth or google accounts, I can't remember. Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Hugues Sent: Friday, April 23, 2010 9:39 AM To: CakePHP Cc: yves.regis.gauth...@gmail.com Subject:

RE: Multi-level Models in CakePHP

2010-04-15 Thread Alan Asher
I think you need a contain to include the third table. $this->ATable->find('all', array('contain'=>array('BTable','BTable.CTable'))); That's just off the hip Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-

RE: Cake won't save my data

2010-04-14 Thread Alan Asher
description] => Test ) ) PracticeItem is the Model Name This is part of the whole convention over configuration. Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Johnny Ferguson Sent: Wednesday, April 14, 2010 2:10 PM To: C

RE: Should I migrate from RC 1.1 to RC 1.2 or 1.3 ????

2010-04-05 Thread Alan Asher
I've never coded in 1.1, However, depending on what your project's intentions are, I wouldn't go with 1.3 until it is out of beta. Depending on how much time you have to play with it. Just keep a new copy and just start taking care of the bugs generated from 1.1 to 1.2 as they pop up. -Or

Re: Further Datasource documentation

2010-03-30 Thread alan
Did you ever build the datasource? Want to release it on cakeforge or here? On Mar 18, 8:56 pm, Lucca Mordente wrote: > Thanks Marco! > I'll take a deeper look soon! > > Cheers, > Lucca Mordente > > > > On Thu, Mar 18, 2010 at 10:46 PM, Marco wrote: > > What helped me was: > > >http://www.neilc

RE: Auth Redirect Issues

2010-03-30 Thread Alan Asher
in AppController: $this->Auth->logoutRedirect = array('controller' => ..., 'action' => ...)); On Mar 29, 6:36 pm, "Alan Asher" wrote: > Please read carefully, My issue is not with the default behavior of when a > person is not logged in and tries to reac

Auth Redirect Issues

2010-03-29 Thread Alan Asher
Please read carefully, My issue is not with the default behavior of when a person is not logged in and tries to reach a page that is auth protected. I am having an issue because after the person hits logout I think that the auth component should forget the page I was just on, so when I log in

RE: MySQL error on field update

2010-03-22 Thread Alan Asher
I've seen something like this before, for some odd reason instead of erroring before it submits the sql, it will try and use an array as the value, and the first value of that array is an "L". Do a pr before the saveField command and see what could possibly have a string that starts with L Also t

RE: Auth losting authentication with no reason

2010-03-18 Thread Alan Asher
I had the same issue, it's a security feature for sure... It will also happen if you follow a link from a cached page in your app/config/core.php Change your config:write to Configure::write('Security.level', 'medium'); And that should do the trick. I don't remember where I found the answer to

RE: help me about association query

2010-03-18 Thread Alan Asher
;favorites', 'foreignKey' => 'business_id', 'associationForeignKey' => 'user_id' ) ); } models/category.php class Cate

RE: help me about association query

2010-03-17 Thread Alan Asher
I might need to see your models but you probably need to do something like this. $this->Business->find('all,array('conditions'=>array('Business.city'=>$city) ,'contain'=>array('Category'))); The contain clause will make sure to limit your search results to have only categories (as well as the bus

RE: Filter automagic drop down combo box

2010-03-15 Thread Alan Asher
ically findby is a normal sql query and find('list') is a special query that returns an array of key value pairs of id and title Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Travis Sent: Monday, March 15, 2010 11:58 A

RE: Trouble Loading CSS on home.ctp when Debug == 0

2010-03-12 Thread Alan Asher
I've noticed a similar issue at times. When I have debug turned on and there's a pr() somewhere it will break my css. Basically any output sent before the view renders will break the css. Take a look at the source that your view renders and see if you have anything before the tag. -Origina

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 , know

RE: php in database

2010-03-08 Thread Alan Asher
The first thing that comes to my mind is using smarty. You can direct it to use a database field instead of a file. In which case, you'll have a new set of issues to deal with which are related to passing the $html object into the template. Also, if you trust the code then you can do a few other

RE: How to dynamically create validation rules

2010-02-26 Thread alan
interestingly enough, I actually came across this same need in my application.From inside the controller, I added this line$this->MyModel->validate['bid']=array('rule'=>array('range',$this->MyModel->minimum_bid-1,$this->MyModel->maximum_bid+1),'message'=>"Allowed range for bid is {$this->MyModel->m

RE: $webroot of helper doesn't set by App::import

2010-02-26 Thread alan
you know.. I experience the same issue I have an internal email controller in my application, and I can't seem to link properly because of this issue.  It's an issue because my application (for development) is not off the / root.  I just recently learned about elements and using $this->render()

Re: SSL and https

2010-02-18 Thread alan
I like it! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe fr

Re: SSL and https

2010-02-17 Thread alan
{ return $this->redirect('http://'.$_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI']); } ... That way, for any controller you can specify: var $shouldBeHTTPS = true; //false or within an action you can change: var $this->shouldBeHTTPS = true; //false

RE: Should I make the leap from PHP coder to cakePHP coder?

2010-01-08 Thread Alan Asher
it's good before rolling live. Cakephp is not a new language to learn... just a new style. MVC and clean code is always desired when dealing with scalable projects. Alan -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of stinsoninc S

bindModel, unbindModel, updateModel?

2009-12-18 Thread Alan Asher
Has anyone run across a function similar to bindModel and unbindModel which to me would be called updateModel() Basically, I've run across several situations where I just need to update the model's limit or ordering and finding that I have to use the bindModel and repeat everything that was in

RE: Open action in popup

2009-12-16 Thread Alan Asher
I am assuming that you're not storing any of this information in the database, otherwise it would be easy to call the page in a separate window. So if that's the case, store the results in the session. Also, you can designate the print css with @media print inside your css http://www.w3schools.c

diagrams of a web request with cakephp

2009-12-16 Thread Alan Asher
I am looking for the flowchart diagram that explains when everything is called for cake. I remember seeing it once when I was first researching cakephp so I may just be thinking of a flow chart of what MVC is. Does any one have or know of this graphic? Check out the new CakePHP Questions

RE: unbindModel cranium scratcher

2009-12-10 Thread Alan Asher
Of course, it's the syntax again.. $myScroll->User->unbindModel('hasMany',array('Photo')); Should read $myScroll->User->unbindModel(array('hasMany'=>array('Photo'))); _ From: cake-php@googlegroups.co

unbindModel cranium scratcher

2009-12-10 Thread Alan Asher
ured out how to use the unbindModel to get rid of the hasMany from my user model and it worked perfectly. But now I'm instantiating my own model and it seems to be behaving differently. I expect this $myScroll->User->unbindModel('hasMany',array('Photo')); to work

RE: Model class not found

2009-12-10 Thread Alan Asher
class Tag extends AppModel { var $name = 'Tag'; } Simple syntax error... You need to have the "var" in front of the $name. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Jim Rootham Sent: Thursday, December 10, 2009 12:30 PM To:

RE: unbindModel issues

2009-12-08 Thread Alan Asher
hp+ow...@googlegroups.com [mailto:cake-php+ow...@googlegroups.com] On Behalf Of Alan Asher Sent: Tuesday, December 08, 2009 1:07 PM To: CakePHP Subject: unbindModel issues I have a users model and a photos model. The model for users is set up that it "hasMany" Photos and &qu

unbindModel issues

2009-12-08 Thread Alan Asher
pr($profile); I get every photo in the database for the user and the only one I want is the "belongsTo" The unbind model doesn't appear to be working. Help Please!!! Alan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakeP

HABTM questions

2009-12-02 Thread Alan Asher
ch potential table of photo_id, profile_id and blog_id and update the model for Asset with the hasOne of each.. This way it will grab the data right? Also, is this an instance where instead of read, I use find('all') instead? Many thanks, Alan Example of my Container->rea

Re: CakeFest IV - America - Help us pick a location!

2009-11-24 Thread alan
Vote for central/mid-west... it makes sense (and it's where I am) Chicago or St. Louis or Indianapolis or Kansas City 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 Googl

Recursive directory iterator and sorting

2009-08-10 Thread Alan C
Does anyone know how to sort the results produced by recursivedirectoryiterator the results I'm getting show all the directory tree for a given folder, but they are not sorted in any way, what I would like is an alphabetic sort of each level. --~--~-~--~~~---~--~

Re: Google Analytics Tracking

2008-08-21 Thread Alan
On Aug 21, 4:11 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > On Thu, Aug 21, 2008 at 1:04 PM, Alan <[EMAIL PROTECTED]> wrote: > > > Hi, we're trying to set upGoogleAnalyticstrackingwith our cakephp > > site, and we're running into problems

Google Analytics Tracking

2008-08-21 Thread Alan
Hi, we're trying to set up Google Analytics tracking with our cakephp site, and we're running into problems. Well, the marketing people are running into problems. They have files that they say usually go in the root of the site and that search engines(like google) pull up and use for tracking.

_selectedArray missing from cakePHP 1.2?

2008-06-18 Thread alan
It would appear that the function ->_selectedArray() is missing from cakephp 1.2 How should I gather the selected options for a HABTM association then? === cakephp 1.1 examples: === http://api.cakephp.org/1.1/class_controller.html#9acfedd26fc4259442b36690862115ee $this->set('cCategories', $thi

Re: Ownership based authorization

2008-06-10 Thread Alan Gibson
Thanks for the tip. I read through some stuff on Cake's ACLs before, but never really picked up on the possibilities for row level security because most tutorials focus on action level restriction. After some more reading, it looks like what I need is to use Model.id style aros and acos along wit

Ownership based authorization

2008-06-03 Thread Alan Gibson
Has anyone ever tried to implement an ownership based authorization scheme in Cake? What I mean by 'ownership based' is that authorization is based on object relationships in the database, not on ACLs which consider URLs or controller actions. For example, User has many Books, Book has many Page

Optional HTTP authentication

2008-05-29 Thread Alan Gibson
Hello all, Has anyone ever tried to implement _optional_ HTTP authentication? Typical use case: - Users provide username and password via form at /users/login. - Username/password is POSTed to /users/login and user is authenticated by AuthComponent - User is then logged in an can access secured

PHP Developer (contract to hire / telecommute)

2008-04-10 Thread alan
Contact: Send us a resume, code samples (source code and links), and brief introduction letter as to who you are and why you may be interested in this position. { email: alan|at|audiologyonline.com } --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Cake 1.2 Console - Fatal Errors - Possible Bug?

2008-02-24 Thread Alan Gibson
Make sure your svn:externals property is uses the repository at https://svn.cakephp.org/repo/branches/1.2.x.x/cake. I had the same problem as you where I was stuck at revision 6311, although svn reported that I was at the latest revision, because I was using the trunk. >From the root directory o

Re: Page_Title Bug in Flash()/Render()

2007-12-26 Thread Alan Wagstaff
"$this->set("page_title", $message);" (line 625) to "$this- >_setTitle($message);". the flash() method is now working as desired for me. Thanks, Alan. P.S. I've only been looking at CakePHP for a couple of hours now but

Re: outputting results from a db in groups of common content

2007-09-02 Thread alan
That is tight! Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED

Re: define('DEBUG', 0) problem

2007-08-23 Thread Alan Ford
I've had a similar problem once, maybe that's it. It could be caused by the wrong path of the libraries/styles on the production server. How are you including your libraries/styles in the layout files? Are you referencing them in an absolute way or are you using something like $javascript->link('

Re: R: Auditing

2007-08-21 Thread alan
I think it would be useful for you to look through the API. http://api.cakephp.org/model__php5_8php-source.html#l00771 specifically: 00842 if (count($fields)) { 00843 if (!empty($this->id)) { 00844 if ($db->update($this, $fields, $values)) { 00845

MySQL : tinyint(1) : doesn't allow you to enter 0-9 as valid values

2007-08-21 Thread alan
Spent a while trying to figure out why I couldn't save [2] as a value of a field that was of type >> tinyint(1) As it turns out, i just needed to change the field to >> int(1) I know this might seem a bit off topic but if others are like me - they will think it's a problem with cake... go diggin

Re: problem in default.thtml

2007-08-16 Thread alan
this approach - I'd suggest some server side caching. thanks, -alan- On Aug 16, 1:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hello friends, > > Is someone here who can solve my problem pls. > > Thanks > > On Aug 15, 5:46 pm, "[EMA

Re: Best Practices - "Modular Blocks & Actions"

2007-08-16 Thread alan
e better performance if you preload the content. Also - you are really going to need to cache your data... I would cache each of the requestAction calls individually. http://bakery.cakephp.org/articles/view/ecache-easy-per-user-or-per-anything-cache-of-html-or-arrays thanks, -alan- On Aug 15, 6:54

Re: Cache Question

2007-08-13 Thread alan
Caching is basically required for any data-heavy or interaction-heavy site... but you need to be in control of who gets what cache; more specifically, you need to be sure people only get their own cached content. Cake < 1.2 has caching... great caching if your contact is the same for everyone...

Re: Cache Elements for Different Users

2007-08-13 Thread alan
The following component (+example controller using it) might help... I use it a lot. === http://bakery.cakephp.org/articles/view/ecache-easy-per-user-or-per-anything-cache-of-html-or-arrays Caching is basically required for any data-heavy or interaction-heavy site... but you need to b

how requestAction works, under the hood (?)

2007-06-21 Thread alan
Sorry to any of you who think I'm answering this question... I'm actually asking it. I'd like to understand better how the controller method "requestAction" works. I know how to use it: $rendered_part = $this->requestAction('/controller/action/ param',array('return')); ..But I don't know how it

Re: More succinct Textile Helper and Component

2007-06-15 Thread alan
Great contribution! Could you please explain what the difference between the two functions are - useful for those who are not too familiar with textile, yet. thanks! -alan- On May 16, 12:49 am, Travis Cline <[EMAIL PROTECTED]> wrote: > I just posted two > snippets:http://cakeforge

Re: Which Cake function should I use to query my data

2007-06-10 Thread alan
Model->findAll($conditions,$fields,'Model.field DESC', $limit,$page,$recursive); echo ''; print_r($stuff); echo ''; exit; ?> if you don't see all you want to see... get friendly with the cake associations and update your models. thanks, -alan-

Bug with - /cake/libs/router.php :: stripEscape() - cakephp.v.1.1.15.5144

2007-05-24 Thread alan
https://trac.cakephp.org/ticket/2640#preview The new method in router.php is: stripEscape($param) The way it's currently written, it can run into problems with highly nested arrays basically it assumes that there's a text value instead of an array value. This is very easily fixed by making t

Re: is anyone using Acl and AuthComponent in 1.2

2007-05-23 Thread alan
I am just looking into it for the first time... it would be great to get a solid tutorial on it on the cakephp site... Perhaps they'll get to that when 1.2 goes stable. thanks, -alan- On May 10, 12:25 pm, Tribastian <[EMAIL PROTECTED]> wrote: > On 26 Apr., 07:09, "[EMAIL

Re: use $ajax->remoteFunction inside $javascript->codeBlock

2007-05-08 Thread alan
I'd say, just write out a prototype AJAX request... its simple enough and you have full control over options. http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxRequest http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxUpdater thanks, -alan- On May 7, 9:

Re: Saving multiple database records from a single form.

2007-04-30 Thread alan
controller, you simply do something like: foreach ( $this->data['m'] as $itemkey => $data ) { $this->Model->create(); if ( $this->Model->save($data) ) { ... } } thanks, -alan- --~--~-~--~~~---~--~~ You received this messag

Re: Newbie Approach to Image Uploading

2007-04-30 Thread alan
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/ or http://bakery.cakephp.org/articles/view/swfupload-and-multipurpose-uploader thanks, -alan- > > what is the equiv of this in cake? > > > if( is_uploaded_file($_FILES[profile_image][tmp_name]) ) { > >

Re: CakePHP on TextDrive

2007-04-29 Thread alan
pp/webroot/%{REQUEST_URI} [L] # -- handle home page, if there is no query string RewriteCond %{QUERY_STRING} !.+ RewriteCond %{REQUEST_URI} ^/$ [OR] RewriteCond %{REQUEST_URI} ^/index.php$ RewriteRule . /app/webroot/pages/home [L] hope this helps, alan On Apr 28, 7:25 pm, andyreimer <[EMAIL PROT