Re: Need help to integrate smary 3.0 with cake PHP 2.0

2014-06-04 Thread Борислав Събев Borislav Sabev
I know this is somewhat of a troll answer, but: This should be possible with some tweaks to core variables, but why in the world would you want to do that? If your answer is that you know Smarty and not CakeViews I'd suggest you take 4 hours of reading and you will be pretty comfortable with

How to get URL parameters in cakephp with URL that ends with xml?

2014-06-04 Thread Sam
I would like to pass URL parameters in cakephp with URL that ends with xml like below; http://localhost/cp251/controller/api_get_info?page=1.xml The controller function looks like this; public function api_get_info(){ if($this-RequestHandler-responseType() == 'xml') {

Re: How to get URL parameters in cakephp with URL that ends with xml?

2014-06-04 Thread Jeremy Burns : Class Outfit
Have a look at http://book.cakephp.org/2.0/en/development/routing.html#Router::parseExtensions On 4 Jun 2014, at 10:41, Sam lightai...@gmail.com wrote: I would like to pass URL parameters in cakephp with URL that ends with xml like below;

Re: How to get URL parameters in cakephp with URL that ends with xml?

2014-06-04 Thread euromark
Duplicate of http://stackoverflow.com/questions/24033937/extracting-url-parameters-in-cakephp-with-url-that-ends-with-xml Am Mittwoch, 4. Juni 2014 11:41:56 UTC+2 schrieb Sam: I would like to pass URL parameters in cakephp with URL that ends with xml like below;

Testing in cakephp with Mocks

2014-06-04 Thread Richard Perez
Hello all, I'm pretty new to testing using mocks in cakephp and I'm having trouble mocking models that have behavior objects. Is there a way when you create a mock object to let cake know that you don't want the model to load any behaviors? Perhaps with something passed into the constructor?

Re: Site down after restart

2014-06-04 Thread Rob M
If this happens, start checking logs. CakePHP logs errors to /tmp/, and your server access and error logs should also be reviewed. CakePHP depends on an operating system, a web server, and a database server. Each of these need to be up and running for Cake to do its thing. -- Like Us on

Re: prevent uploaded file duplicate or double click in cake php?

2014-06-04 Thread Rob M
First you need to identify what makes a file unique. Is it the contents of a row? a set of rows? a row ID? Second, you need to write code to query your existing database to see if your uploaded file has already been added (run a SELECT to see if the rows you are about to add have already been

Re: Site down after restart

2014-06-04 Thread Jeremy Burns : Class Outfit
I had a weird error once where the Config folder was renamed to config (lower case c) after uploading some updates via FTP. The site just blanked out. After searching and debugging for a few hours I went to the test page and it presented the error to me. Might be worth a try. On 4 Jun 2014, at

Re: cant find a field

2014-06-04 Thread jagguy
yes this work thankyou $teacherid = $this-Teacher-field('id', array('Teacher.user_id' = $currentuserid)); -- http://itfutures.edu.au?referer=email *P: (03) 9866 7737* *E: i...@itfutures.edu.au i...@itfutures.edu.au* *A: Suite 5 / Level 1 / 424 St Kilda Rd, Melbourne, 3004

display data 3 tables

2014-06-04 Thread ajt
Hi, I just want to display fields from 3 tables which I have checked on how to do this and I am not clear on this. Examples I have found concentrate on 2 fields or keyed in conditions on multiple tables. I have models all related in some way. I want the username from a tutorsession table and

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
Look at the Containable behaviour: http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html On 4 Jun 2014, at 14:47, ajt jagguy...@gmail.com wrote: Hi, I just want to display fields from 3 tables which I have checked on how to do this and I am not clear on this. Examples I

Re: Cake 2.5.1 Extremely Slow With MSSQL?

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

Re: display data 3 tables

2014-06-04 Thread ajt
This doesnt work as I get an error when displaying the username from the associated table. I guess i am doing something wrong still. $this-set('tutor', $this-Tutorsession-find('all', array('conditions' = array('Teacher.user_id' = $id) ,array('contain' =

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
A couple of things... Why find all when presumably there is only one expected teacher? The contain statement doesn't go inside an array: $this-set( 'tutor', $this-Tutorsession-find( 'first', array( 'conditions' =

Re: Cake 2.5.1 Extremely Slow With MSSQL?

2014-06-04 Thread Dakota
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

Re: Cake 2.5.1 Extremely Slow With MSSQL?

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

Moved from DEV to TEST and CSS [webroot] isn't loading

2014-06-04 Thread David Lozzi
Hi, I have my CakePHP site running really well on my dev environment as http://domain/. When I moved it to a test site, on a production server, at new.domain.com, it loads, controllers and such work, I see data being pulled up, but my CSS and images from the webroot folder aren't working. I

Re: display data 3 tables

2014-06-04 Thread ajt
This still doesnt work as I get an error when I reference the user table which should be linked unless I need to do this another way? view echo 'td'. $item['User']['username'].'/td'; ///error user undefined $this-set( 'tutor', $this-Tutorsession-find( 'first', array( 'conditions' =

Re: display data 3 tables

2014-06-04 Thread Jeremy Burns : Class Outfit
You are referencing the $user variable when you have set a $tutor variable. Add this to your view so you can inspect the shape of the $tutor variable and work out how to access the key you are looking for: die(debug($tutor)); It'll probably look something like this: array(