Re: Issue with getNumRows

2011-05-02 Thread ShadowCross
This isn't a CakePHP bug. The Model::getNumRows() function returns the number of rows returned in the last query. Since you are using the limit clause, the number of rows in the query is less than or equal to the limit (10 rows in your example). To get the actual number of rows that could be retur

The page isn't redirecting properly

2011-05-02 Thread thom
Hello all, I have a problem. Sometimes, I am having 'The page isn't redirecting properly' trouble with Firefox and other browser. It's solved by clearing the browser history. But, It will appear again next-times (not predictable). I've been searching in the archive but there's no specific solution.

Re: $this->layout implementation in a controller

2011-05-02 Thread thom
On Thu, Apr 28, 2011 at 1:48 PM, Salines wrote: > class MyController extends AppController { > function beforeFilter(){ >  $this->layout = 'other'; > } > } > > OR > > class MyController extends AppController { > function beforeRender(){ >  $this->layout = 'other'; > } > } > Thank you so much Sali

Re: Set::extract on an array containing one element

2011-05-02 Thread Otavio Martins Salomao
u try this! foreach($test as $element) $result = $element['Deep1']['Deep2']['extract']; 2011/5/2 Gluckens > Hi everyone, > > I'm trying to extract data from an array containing only one element > and it doesn't seem to work properly. > Here's an example : > > Starting array > $test = array(

Re: Cookbook is partially offline/broken

2011-05-02 Thread Doug
Me too. Google Chrome will load cakephp.org but returns a server error when I follow any of the three links (1.1, 1.2, 1.3) to the Books. I can load those same pages using Firefox with no problem. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Set::extract on an array containing one element

2011-05-02 Thread Gluckens
Hi everyone, I'm trying to extract data from an array containing only one element and it doesn't seem to work properly. Here's an example : Starting array $test = array(4 => array('Deep1' => array('data1' => 'nothing', 'Deep2' => array('extract' => 1; Array ( [4] => Array (

Re: My warning and eror

2011-05-02 Thread Ryan Schmidt
On May 1, 2011, at 12:22, euromark wrote: > var $name = array('Members','Myprofiles'); ? > seriously? where did you get that from?^^ What euromark means is: $name is a string, not an array. It needs to be: var $name = 'Members'; -- Our newest site for the community: CakePHP Video Tutorials

Re: Help! CakePHP runs great in localhost but doesn't even shows up in remote Server ...

2011-05-02 Thread Sam Sherlock
> > does > 000webhost.com supports .htaccess? > consult with technical support cakephp quite depended upon this > htaccess file so. what can I do to solve this problem > no it does not pretty urls do see the core.php file (line 69 mentioned this in another post) - S On 2 May 2011 20:50, k

Re: Issue with getNumRows

2011-05-02 Thread jairishab
Nobody has any idea about this? Rishab Sent from BlackBerry® on Airtel -Original Message- From: jairis...@gmail.com Date: Mon, 2 May 2011 14:41:24 To: cake-php Reply-To: jairis...@gmail.com Subject: Issue with getNumRows Hi all, I am working on my own pagination in my setup. It works o

Re: Help! CakePHP runs great in localhost but doesn't even shows up in remote Server ...

2011-05-02 Thread kabeerdarocker
I am quite a character hehe, I apologize for not making myself clear.My question was yes, does 000webhost.com supports .htaccess, cakephp quite depended upon this htaccess file so. what can I do to solve this problem . On May 2, 9:35 pm, Ryan Schmidt wrote: > On May 1, 2011, at 21:04, kabeerdaroc

Re: webroot/js + /subdir

2011-05-02 Thread euromark
well, thats wrong it will always use the file right away ONLY if it is missing it will attempt to infer a controller (and a 404 then) On 2 Mai, 21:29, lsiden wrote: > An issue that just came up is that if cake gets a request for a file > like /js/subdir/myfile.js, it handles it as if it were a r

webroot/js + /subdir

2011-05-02 Thread lsiden
An issue that just came up is that if cake gets a request for a file like /js/subdir/myfile.js, it handles it as if it were a request for an entire page, i.e. it attempts to infer a controller and view instead of just serving the .js file as application/javascript. Is this the intended behavior?

Re: Standard

2011-05-02 Thread Miles J
$this->Auth is an object, you can't have that return the users login data. On May 2, 3:29 am, AD7six wrote: > On May 2, 12:21 pm, Ryan Snowden wrote: > > > ^ > > True. > > > Small gripe: > > Although I admire Sessions, can CakePHP pick one method? Preferably > > shorthand ie. $this->Auth. I know

Re: Help! CakePHP runs great in localhost but doesn't even shows up in remote Server ...

2011-05-02 Thread Ryan Schmidt
On May 1, 2011, at 21:04, kabeerdarocker wrote: > I am using 000webhost.com that makes me able to > go live not like a main domain. But quite like a sub-domain. so can u > tell does sub-domain and main domain does matters or its just all the > same. It doesn't matter. CakePHP doesn't care what h

Re: 404 error

2011-05-02 Thread jyoti bhandari
i did the same a new refresh loading. did all the changes as told in the installation. I got a page where u get to know, is ur db accesible, connected , temp is writeable,and two things to be changed that is some cipher etc. i am testing it on localhost, nt on online dns. On Mon, May 2, 2011 at 9

Re: 404 error

2011-05-02 Thread Sam Sherlock
try to do the same with a fresh download of cakephp and see if you can get pages/ home to display what is you host? GoDaddy or 1&1 or other? - S On 2 May 2011 16:27, jyoti bhandari wrote: > i did that also > > On Mon, May 2, 2011 at 8:39 PM, Sam Sherlock wrote: > >> in the core.php file unco

Re: 404 error

2011-05-02 Thread jyoti bhandari
i did that also On Mon, May 2, 2011 at 8:39 PM, Sam Sherlock wrote: > in the core.php file uncomment the following line (line 69 for me) > > //Configure::write('App.baseUrl', env('SCRIPT_NAME')); > > that will then enable cake internal url rewrite > > > - S > > > > > > On 2 May 2011 15:42, jyot

Re: 404 error

2011-05-02 Thread Sam Sherlock
in the core.php file uncomment the following line (line 69 for me) //Configure::write('App.baseUrl', env('SCRIPT_NAME')); that will then enable cake internal url rewrite - S On 2 May 2011 15:42, jyoti bhandari wrote: > i haver emoved all the thee files > > > On Mon, May 2, 2011 at 7:58 P

Re: 404 error

2011-05-02 Thread jyoti bhandari
i haver emoved all the thee files On Mon, May 2, 2011 at 7:58 PM, Sam Sherlock wrote: > It means the rewrite in htaccess are not work > > either use cakes internal alternative or try to alter the htaccess > > adding the following lines to you htaccess files may sort this out (if you > have app

Issue with getNumRows

2011-05-02 Thread jairishab
Hi all, I am working on my own pagination in my setup. It works on 3 variables: 1. Page no requested. 2. Number of records to be shown on each page 3. Total records for that particular where condition. Now, the first point is taken runtime. The second point is pre-decided. The third point is wha

Re: 404 error

2011-05-02 Thread Sam Sherlock
It means the rewrite in htaccess are not work either use cakes internal alternative or try to alter the htaccess adding the following lines to you htaccess files may sort this out (if you have app dir cakephp1.3.8 & have 3 htaccess files) - add the following within the Rewrite section RewriteBas

Re: 404 error

2011-05-02 Thread jyoti bhandari
It is plain. That means it is off. how to on it? On Mon, May 2, 2011 at 6:34 PM, Ma'moon wrote: > just check the URL http://localhost/cakephp1.3.8/ and see if you get a > nice default welcome page colored and styled, if you get this page then your > mod_rewrite is ON otherwise it will be OFF or

Problem with user login with cakephp

2011-05-02 Thread Teis
Hi, I should devloping a webpage that is using the same database as one othr system that is not using CakePHP. I have so far been succsesful with this, but now I came to the login part. The user and usergroup table here did not match the CakePHP standard at all. So the tables I have in the databa

Question about Sessions.

2011-05-02 Thread Daniel
Hi there, I'm writting because I'm having some trouble sharing sessions between two applications. The both applications are in the same server but in diferent directories. I've followed the diferent guides that I found on the internet but in my local machine it work's but not in my server. I though

Measuring DB connection times without debug?

2011-05-02 Thread Simon Males
I have simple bit of code which will output the DB connection time in a particular format. Though the difficultly is that its depending on debug being enabled. https://github.com/sime/pingdom_custom_check/blob/master/views/checks/ping.ctp Is there something else I would use to measure DB connect

Re: 404 error

2011-05-02 Thread Ma'moon
just check the URL http://localhost/cakephp1.3.8/ and see if you get a nice default welcome page colored and styled, if you get this page then your mod_rewrite is ON otherwise it will be OFF or not enabled. Ma'moon On Mon, May 2, 2011 at 3:51 PM, jyoti bhandari wrote: > Ma'moom: I actually donno

Re: 404 error

2011-05-02 Thread jyoti bhandari
Ma'moom: I actually donno is that on or not. how to figure that out? On Mon, May 2, 2011 at 6:08 PM, Ma'moon wrote: > Can you see the page > "http://localhost/cakephp1.3.8/" > rendered properly with all style sheets elements? are you sure that you have

Re: 404 error

2011-05-02 Thread andy_the ultimate baker
ur controller should be like this data);exit; } } ?> and see what u get, if nothing then check the action u have given in ur ctp dot this and reply by Anand On May 2, 5:32 pm, jyoti bhandari wrote: > Hi Anand, > > I did not get what u said, can u please elaborate :D > > Thanks > Jyothi > > On Mo

Re: 404 error

2011-05-02 Thread Ma'moon
Can you see the page "http://localhost/cakephp1.3.8/" rendered properly with all style sheets elements? are you sure that you have mod_rewrite enabled in your web server's configuration? Ma'moon On Mon, May 2, 2011 at 3:32 PM, jyoti bhandari wrote: > Hi

Re: 404 error

2011-05-02 Thread jyoti bhandari
Hi Anand, I did not get what u said, can u please elaborate :D Thanks Jyothi On Mon, May 2, 2011 at 5:36 PM, andy_the ultimate baker < anandghaywankar...@gmail.com> wrote: > first write the name of controller before helper > then ur punching index in url where as there is no need, just punch >

Re: 404 error

2011-05-02 Thread andy_the ultimate baker
first write the name of controller before helper then ur punching index in url where as there is no need, just punch posts then in ur action on controller write print_r($this->data);exit; and see waht u get, if nothing then check action of the ctp by Anand On May 2, 4:43 pm, jyoti bhandari wrot

Re: "unneccessary" query

2011-05-02 Thread QXY
Hello! http://bin.cakephp.org/saved/66911 I'm not laughing I'm wondering why your code looks so different from how the book, and everyone else, writes their code. There are different examples in the manual for the same problem.I'm trying to figure out how those work and apply to my problem, ma

Re: 404 error

2011-05-02 Thread jyoti bhandari
HI, i have created three pages like following I have created model "post,php" within models folder I have created controller "posts_controller.php" within controller folder. I have created folder called as posts within views. within Posts folder, i have created index.ctp file and these are

Integrating Dojo in the CakePHP framework

2011-05-02 Thread Marco K
Hello, does anybody have experience with integrating Dojo in Cake? I know there's a Dojo-Cake Helper, but i haven't had success with it. I am trying to integrate Dojo without this helper. This is the code- block in my home.ctp:

Re: Standard

2011-05-02 Thread AD7six
On May 2, 12:21 pm, Ryan Snowden wrote: > ^ > True. > > Small gripe: > Although I admire Sessions, can CakePHP pick one method? Preferably > shorthand ie. $this->Auth. I know, I know... I don't, what do you mean -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.

Re: "unneccessary" query

2011-05-02 Thread AD7six
On May 2, 12:16 pm, AD7six wrote: > On May 2, 11:44 am, QXY wrote: > > > Hello! > > >http://bin.cakephp.org/saved/66911 > > > First of all, I have to tell you I'm learning CakePHP, so if you see > > something weird > > please do not laugh or give negative criticism, because everybody was > > be

Re: Standard

2011-05-02 Thread Ryan Snowden
^ True. Small gripe: Although I admire Sessions, can CakePHP pick one method? Preferably shorthand ie. $this->Auth. I know, I know... On 30 April 2011 08:47, cricket wrote: > On Fri, Apr 29, 2011 at 6:36 PM, Philip Thompson > wrote: > > Actually, I meant $this->Session->read('user'). To grab t

Re: "unneccessary" query

2011-05-02 Thread AD7six
On May 2, 11:44 am, QXY wrote: > Hello! > > http://bin.cakephp.org/saved/66911 > > First of all, I have to tell you I'm learning CakePHP, so if you see > something weird > please do not laugh or give negative criticism, because everybody was > beginner once. ;) I'm not laughing I'm wondering wh

Re: "unneccessary" query

2011-05-02 Thread QXY
Hello! http://bin.cakephp.org/saved/66911 First of all, I have to tell you I'm learning CakePHP, so if you see something weird please do not laugh or give negative criticism, because everybody was beginner once. ;) where in the book does it suggest doing create(find()); ? Nowhere, but I don'

Re: "unneccessary" query

2011-05-02 Thread AD7six
On May 2, 10:11 am, QXY wrote: > Hello! > > Thanks for answer. The final code is here:http://bin.cakephp.org/saved/66911 > Now I'm getting "only" 2 of those queries, still dont know why the > duplicate. > About create(), I'm using it to reset model data, since saving within a > loop. > That's wh

Re: "unneccessary" query

2011-05-02 Thread QXY
Hello! Thanks for answer. The final code is here: http://bin.cakephp.org/saved/66911 Now I'm getting "only" 2 of those queries, still dont know why the duplicate. About create(), I'm using it to reset model data, since saving within a loop. That's what the cookbook says too. But I'm open for

Re: "unneccessary" query

2011-05-02 Thread euromark
i really dont like your approach $this->Member->create( $this->Member->find('first', array( 'conditions' => array('Member.character' => $new_data['name']), 'recursive' => -1) ) ); is not a nice thing to do it messes

Re: Question about pagination

2011-05-02 Thread Tilen Majerle
No, class 'current' is statically written and can't be changed -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/5/2 Roland Pish > Hi there. > > When displaying $paginator->numbers(), I need to replace the current > class of the current page from 'current' to 'active', so that the > current