Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
I missed a single speech mark when I typed my example For clarity it should be: $teacherId = $this->Teacher->field('id', array('Teacher.user_id' => $currentUserId)); On 4 Jun 2014, at 06:46, Jeremy Burns : Class Outfit wrote: > The code you pasted probably won't work. > > $currentuserid=Auth

Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
The code you pasted probably won't work. $currentuserid=AuthComponent::user('id'); // Use $this->Auth->user('id') instead. In the find you are using the user_id field as a condition but only returning the Teacher.id field - do the Teacher.id and Teacher.user_id fields contain the same value?

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread Dakota
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.c

Re: cant find a field

2014-06-03 Thread jagguy
This is for a view? I know the book and have tried this already for a controller. -- *P: (03) 9866 7737* *E: i...@itfutures.edu.au * *A: Suite 5 / Level 1 / 424 St Kilda Rd, Melbourne, 3004

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread Jordan Hopfner
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,53

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread José Lorenzo
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 jus

Re: Site down after restart

2014-06-03 Thread Ma'moon
What about your web server? is it up? On Mon, Jun 2, 2014 at 2:58 PM, Hod Benbinyamin wrote: > I installed latest cakephp (2.5.1 stable) > Open browser on it and was able to see homepage. > > Restarted the machine and now i get 'webpage is not available' > ping works > > Any idea? > > -- > Like

Re: Hide Function parameter from URL when a request is made

2014-06-03 Thread Andras Kende
You could use sessions. $this->Session->write('parameter1', $parameter1); $parameter1 = $this->Session->read('parameter1'); Andras Kende http://www.kende.com On Jun 3, 2014, at 1:40 AM, Intesar Haider wrote: > I want to hide the action parameters from my url when a request to a > particular

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread Jordan Hopfner
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 lev

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread José Lorenzo
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 gon

Re: Auth returning true always

2014-06-03 Thread Jordan Hopfner
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

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread Jordan Hopfner
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

Form field which is displayed only

2014-06-03 Thread theis
I'm using CakePHP 2.4.9 In my application I want to have a readonly field where I display data which cannot be changed. E.g., a persons country: there is a hidden field with the country ID and a readonly text field with the countries name. The user can see the persons country but is not able to

Passing / in a url parameter with rawurlencode gets 404

2014-06-03 Thread Keith Power
I have a folder outside of webroot with important images. I am using $this->response->file in my controller successfully when I just pass in the file name. However I need to pass in part of the path as it is made up of id's. I know I can not pass / as it is so I use rawurlencode() which does ch

Hide Function parameter from URL when a request is made

2014-06-03 Thread Intesar Haider
I want to hide the action parameters from my url when a request to a particular action is made. For instance, >echo $this->Html->url(array('controller' => 'controllerName', > 'action' => 'actionName', parameter1, $parameter2)); > ?> The above code will generate

Site down after restart

2014-06-03 Thread Hod Benbinyamin
I installed latest cakephp (2.5.1 stable) Open browser on it and was able to see homepage. Restarted the machine and now i get 'webpage is not available' ping works Any idea? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received

(how to prevent duplicate or same csv file upload into database in cake php?)Upload csv file to mssql server using cake php

2014-06-03 Thread Spell
hi everyone, i was trying to search for the code on how to prevent the duplicate data upload into my database system. one of the method is to set unique key for my data - time, that means everytime the data come in will search for different time, if detected same time it will unable the data up

Auth returning true always

2014-06-03 Thread The Computer Nerd
$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.c

Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-03 Thread Vivek Shah
Hello, I am trying to integrate smarty template with cakePHP and for that I refer http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyview document and came to know it very old one still i modified some steps and reach till include helpers in app_controller

Routing issue with named params

2014-06-03 Thread Lee Reynolds
Hi, We have several mobile apps that use the url structure /api/[search|facets]/type:[bar|foo|ra|sim]. In a previous version this was simple to route /:controller/:action/* This got to be unwieldy because of the amount of processing it took to retrieve information for the different types.

Re: Custom queries in cake PHP

2014-06-03 Thread Gavindra Kalikapersaud
*Nikhil, I was wondering where using the below code:* * $output = $this->ModelName->query('SELECT Example FROM USER')* *Isn't this vulnerable to sql injection? How to prevent this???* On Sunday, August 12, 2012 2:01:47 AM UTC-4, Nikhil Agrawal wrote: > > Hey mohit, > > As a better practice

Re: button wont display as it should

2014-06-03 Thread Andras Kende
Thats done by CSS: https://github.com/cakephp/cakephp/blob/master/lib/Cake/View/Scaffolds/index.ctp#L47-L56 https://github.com/cakephp/cakephp/blob/master/app/webroot/css/cake.generic.css#L511-L560 - .actions a is applied here.. I use bootstrap css framework and just add ‘class’ => ‘btn

Get blackholed all my forms functions on servers

2014-06-03 Thread Victor Vargas
Hi all!, This is my problem, I have try on my local server simple forms with the security component, and they work perfectly. But I try this on my 1and1 server and i get blackholed this form. Any idea? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.co

Does anyone have idea how can we integrate smarty with cakPHP

2014-06-03 Thread Vivek Shah
Hello I have tried to integrate smarty 3.0 with cakePHP2.0 but got so many blockers,please let me know possible ways if anyone has Please dont provide below link which i refere multiple time but not getting many steps. http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-w

Re: notifications plugin

2014-06-03 Thread Indranil Sinha
You can use this plugin https://github.com/aschelch/cakephp-notification-plugin On Monday, August 2, 2010 4:55:26 PM UTC+4:30, hoss7 wrote: > > i need some cakephp notifications plugin like facebook or ... ? > > example:user add new record to some table,show some alert to admin -- Like Us on Fa

I need Help.. How to install Cake PHP 2.5.1 on Xampp running on a Windows 8.1 system

2014-06-03 Thread su_osi
Here is a copy of my database.php file in the I:xampp\htdocs\cakephp\app\Config folder ('I:\' being the drive I installed xampp into) /** > * > * > * CakePHP(tm) : Rapid Developmen

prevent uploaded file duplicate or double click in cake php?

2014-06-03 Thread Spell
i trying to upload csv file into mssql thro cake php. every one hour i will have 9 csv file to be upload to my database. i want to avoid mistake of double upload the same file to database. i'm using the validate function to be unique but it seems fail. i'm not sure how to start at model.php and

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-03 Thread Charlie Topjian
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 cont

Re: cant find a field

2014-06-03 Thread Jeremy Burns : Class Outfit
You ask a lot of questions that are in the book... Look at Model-> field() : http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-field On 3 Jun 2014, at 15:38, ajt wrote: > Hi, Is this is the correct way to find a 1 field in 1 row of data? > I just want the teacherID of a r

cant find a field

2014-06-03 Thread ajt
Hi, Is this is the correct way to find a 1 field in 1 row of data? I just want the teacherID of a row of a given userID but I never get a match $currentuserid=AuthComponent::user('id'); $teacherid=$this->Teacher->find('first',array( 'conditions' => array('Teacher.user_id' =>

Re: button wont display as it should

2014-06-03 Thread Jeremy Burns : Class Outfit
Generally speaking you'd create your own CSS file and place it in /app/webroot/css and use that instead of the default Cake CSS. If you want to use both then call both in the head of your layout page. On 3 Jun 2014, at 12:48, jagguy wrote: > Hi, > > No I havent touched the css but where do I

Re: button wont display as it should

2014-06-03 Thread jagguy
Hi, No I havent touched the css but where do I do this,in which css file? -- *P: (03) 9866 7737* *E: i...@itfutures.edu.au * *A: Suite 5 / Level 1 / 424 St Kilda Rd, Melbourne, 3004