Re: Cake 2.5.1 Extremely Slow With MSSQL?
In the PHP manual it states: PDO::CURSOR_FWDONLY (integer <http://php.net/manual/en/language.types.integer.php>)Create a PDOStatement <http://php.net/manual/en/class.pdostatement.php> object with a forward-only cursor. This is the default cursor choice, as it is the fastest and most common data access pattern in PHP. So I don't think it's a bad idea, but I don't know the reasoning the reasoning for using SCROLL over FWDONLY. On Thursday, August 14, 2014 6:38:47 AM UTC-6, ravag...@gmail.com wrote: > > I'm not sure if this is really a good idea. > See: > http://stackoverflow.com/questions/1155211/what-is-pdo-scrollable-cursor > > But if you want this find its way into the core, then you can help the > core team to get in there. > > Help yourself by either: > a) Create an issue explaining everything 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 > > Am Mittwoch, 13. August 2014 16:07:26 UTC+2 schrieb Jordan Hopfner: >> >> Thanks Alan, appreciate the help. The project has been put on hold for >> now but I'll definitely try this change when I go to use SQL Server again. >> It would be great if the core team would make these changes to Cake :) >> >> On Friday, August 8, 2014 10:30:20 PM UTC-6, Alan Read wrote: >>> >>> 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 Hopfner wrote: >>>> >>>> Hey guys, >>>> >>>> I'm using the latest version of Cake (2.5.1) and am having a problem >>>> with extremely slow connections to a MSSQL server. A controller action >>>> that >>>> only has one simple select statement is taking an upwards of 50 seconds to >>>> complete. I don't think it's the select statement itself, I have a created >>>> an empty page that connects to MSSQL via PDO and executes the exact same >>>> statement and the result is instantaneous, so this leads me to believe >>>> it's >>>> a problem with the MSSQL data source packaged with Cake. If it was a >>>> driver >>>> or connection issue I would assume it would happen on the test page as >>>> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2. >>>> >>>> Jordan >>>> >>> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
Thanks Alan, appreciate the help. The project has been put on hold for now but I'll definitely try this change when I go to use SQL Server again. It would be great if the core team would make these changes to Cake :) On Friday, August 8, 2014 10:30:20 PM UTC-6, Alan Read wrote: > > 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 Hopfner wrote: >> >> Hey guys, >> >> I'm using the latest version of Cake (2.5.1) and am having a problem with >> extremely slow connections to a MSSQL server. A controller action that only >> has one simple select statement is taking an upwards of 50 seconds to >> complete. I don't think it's the select statement itself, I have a created >> an empty page that connects to MSSQL via PDO and executes the exact same >> statement and the result is instantaneous, so this leads me to believe it's >> a problem with the MSSQL data source packaged with Cake. If it was a driver >> or connection issue I would assume it would happen on the test page as >> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2. >> >> Jordan >> > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
Again, I'm using MSSQL not MySQL. I suppose I could give 2.4 a shot, wouldn't hurt to try. On Sunday, June 15, 2014 3:54:54 AM UTC-6, Michael Houghton wrote: > > I suspect this is a MYSQL setting. Out if interest, have you tried version > 2.4 or below? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
I haven't tried 3.0 yet. I've been waiting for at least a beta to come out before I try it. On Tuesday, June 10, 2014 11:25:02 PM UTC-6, José Lorenzo wrote: > > Have you tried with CakePHP 3.0, just for curiosity? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
Thanks for the help gentlemen, I'm at a loss here. Unfortunately upgrading PHP to 5.5 isn't in the cards for our production server at the moment. My only other option is to develop the application in C# and .NET (yuck, lol). On Wednesday, June 4, 2014 8:38:52 AM UTC-6, Dakota wrote: > > We've got a full application, doing joins, inserts, etc. Also uses > FileStream. No issues, runs just as fast as MySQL > > On Wednesday, 4 June 2014 15:58:20 UTC+2, Jordan Hopfner wrote: >> >> What kind of tests/queries are you guys doing? Just verifying that you >> can connect or pulling back a bunch of rows? >> >> On Tuesday, June 3, 2014 9:57:43 PM UTC-6, Dakota wrote: >>> >>> I have no issues with MsSQL and Cakephp 2.5 (migrated to 3.0 dev though >>> now). Running sql 2012 and php 5.5. >>> >>> You can get the php 5.5 sqlserver driver from >>> http://www.apachelounge.com/viewtopic.php?t=5985 >>> >> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
What kind of tests/queries are you guys doing? Just verifying that you can connect or pulling back a bunch of rows? On Tuesday, June 3, 2014 9:57:43 PM UTC-6, Dakota wrote: > > I have no issues with MsSQL and Cakephp 2.5 (migrated to 3.0 dev though > now). Running sql 2012 and php 5.5. > > You can get the php 5.5 sqlserver driver from > http://www.apachelounge.com/viewtopic.php?t=5985 > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
I loaded up SQL Server Profiler to have a look at what it's doing. It connects instantly, but is doing some very funny stuff. I performed 3 tests, one with debug set at 2 in core.php, one with debug set at 0, and then my non-cake test page. You can have a look at them here: Debug set at 2 (2,538 lines): http://pastebin.com/Ry0D6gFq Debug set at 0 (1,865 lines): http://pastebin.com/U697PjxJ My non-cake test page, executing the same query as above (7 lines): http://pastebin.com/uLVkYmRJ By the looks of it, Cake is doing something that's wildly inefficient. I had a look at the source of the Sqlserver.php file but I'm not sure what I'm looking for exactly. On Tuesday, June 3, 2014 2:40:56 PM UTC-6, José Lorenzo wrote: > > That sounds like it is spending time trying to connect to the server > instead of doing actual work. Have you tried using a different server? I > have tried myself using a windows azure server and it seems to work just > fine. > > On Tuesday, June 3, 2014 9:34:17 PM UTC+2, Jordan Hopfner wrote: >> >> I just tried upgrading to PHP 5.4.29, changing the sqlsrv extensions to >> 5.4 and the problem still persists. My test page (non-cake) is still speedy >> and spits out data instantaneously though. From what I can see there is no >> official sqlsrv extension for PHP 5.5 yet. I tried changing the debug level >> to 0 so it wouldn't update the caches but it still takes a long time load >> data from MSSQL. >> >> On Tuesday, June 3, 2014 11:13:15 AM UTC-6, José Lorenzo wrote: >>> >>> Have you tried updating your php version at the latest possible version? >>> I've read about this problem multiple times and it was solved every time by >>> upgrading the php version. >>> >>> On Tuesday, June 3, 2014 6:39:50 PM UTC+2, Jordan Hopfner wrote: >>>> >>>> I'm using MSSQL, not MySQL :). I'm thinking I'm gonna have to shelf >>>> Cake on this project unfortunately. >>>> >>>> On Sunday, June 1, 2014 4:50:07 PM UTC-6, Charlie Topjian wrote: >>>>> >>>>> I experienced similar problems with my stack. What version of MYSQL >>>>> are you using? >>>>> >>>>> On Wednesday, May 28, 2014 4:19:09 PM UTC-5, Jordan Hopfner wrote: >>>>>> >>>>>> Hey guys, >>>>>> >>>>>> I'm using the latest version of Cake (2.5.1) and am having a problem >>>>>> with extremely slow connections to a MSSQL server. A controller action >>>>>> that >>>>>> only has one simple select statement is taking an upwards of 50 seconds >>>>>> to >>>>>> complete. I don't think it's the select statement itself, I have a >>>>>> created >>>>>> an empty page that connects to MSSQL via PDO and executes the exact same >>>>>> statement and the result is instantaneous, so this leads me to believe >>>>>> it's >>>>>> a problem with the MSSQL data source packaged with Cake. If it was a >>>>>> driver >>>>>> or connection issue I would assume it would happen on the test page as >>>>>> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 >>>>>> R2. >>>>>> >>>>>> Jordan >>>>>> >>>>> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
I just tried upgrading to PHP 5.4.29, changing the sqlsrv extensions to 5.4 and the problem still persists. My test page (non-cake) is still speedy and spits out data instantaneously though. From what I can see there is no official sqlsrv extension for PHP 5.5 yet. I tried changing the debug level to 0 so it wouldn't update the caches but it still takes a long time load data from MSSQL. On Tuesday, June 3, 2014 11:13:15 AM UTC-6, José Lorenzo wrote: > > Have you tried updating your php version at the latest possible version? > I've read about this problem multiple times and it was solved every time by > upgrading the php version. > > On Tuesday, June 3, 2014 6:39:50 PM UTC+2, Jordan Hopfner wrote: >> >> I'm using MSSQL, not MySQL :). I'm thinking I'm gonna have to shelf Cake >> on this project unfortunately. >> >> On Sunday, June 1, 2014 4:50:07 PM UTC-6, Charlie Topjian wrote: >>> >>> I experienced similar problems with my stack. What version of MYSQL are >>> you using? >>> >>> On Wednesday, May 28, 2014 4:19:09 PM UTC-5, Jordan Hopfner wrote: >>>> >>>> Hey guys, >>>> >>>> I'm using the latest version of Cake (2.5.1) and am having a problem >>>> with extremely slow connections to a MSSQL server. A controller action >>>> that >>>> only has one simple select statement is taking an upwards of 50 seconds to >>>> complete. I don't think it's the select statement itself, I have a created >>>> an empty page that connects to MSSQL via PDO and executes the exact same >>>> statement and the result is instantaneous, so this leads me to believe >>>> it's >>>> a problem with the MSSQL data source packaged with Cake. If it was a >>>> driver >>>> or connection issue I would assume it would happen on the test page as >>>> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2. >>>> >>>> Jordan >>>> >>> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Auth returning true always
Auth is returning true because you're manually logging in a user by passing in an array. See http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#manually-logging-users-in. Why are you passing the data in like that, just for testing? On Friday, May 30, 2014 10:33:55 PM UTC-6, The Computer Nerd wrote: > > $data = array('username' => 'test', 'password' => 'test'); > if($this->Auth->login($data)) return true; > else return false; > > it returns true every time no matter what the values are for username and > password > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5.1 Extremely Slow With MSSQL?
I'm using MSSQL, not MySQL :). I'm thinking I'm gonna have to shelf Cake on this project unfortunately. On Sunday, June 1, 2014 4:50:07 PM UTC-6, Charlie Topjian wrote: > > I experienced similar problems with my stack. What version of MYSQL are > you using? > > On Wednesday, May 28, 2014 4:19:09 PM UTC-5, Jordan Hopfner wrote: >> >> Hey guys, >> >> I'm using the latest version of Cake (2.5.1) and am having a problem with >> extremely slow connections to a MSSQL server. A controller action that only >> has one simple select statement is taking an upwards of 50 seconds to >> complete. I don't think it's the select statement itself, I have a created >> an empty page that connects to MSSQL via PDO and executes the exact same >> statement and the result is instantaneous, so this leads me to believe it's >> a problem with the MSSQL data source packaged with Cake. If it was a driver >> or connection issue I would assume it would happen on the test page as >> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2. >> >> Jordan >> > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Cake 2.5.1 Extremely Slow With MSSQL?
Hey guys, I'm using the latest version of Cake (2.5.1) and am having a problem with extremely slow connections to a MSSQL server. A controller action that only has one simple select statement is taking an upwards of 50 seconds to complete. I don't think it's the select statement itself, I have a created an empty page that connects to MSSQL via PDO and executes the exact same statement and the result is instantaneous, so this leads me to believe it's a problem with the MSSQL data source packaged with Cake. If it was a driver or connection issue I would assume it would happen on the test page as well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2. Jordan -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.