Re: App::Import and Model

2008-10-22 Thread BillBris


Thanks again.  I altered my code to use $uses and removed the code for
App::Import.  Everything still works as expected.

B.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: change MIT license to GPL?

2008-10-22 Thread Gwoo

Nate,

You should stick to coding and leave the licensing questions to the
people who actually know what they are talking about.
Please see my previous message to learn a little about intellectual
property issues.

Sincerely,
Garrett J. Woodworth
JD/MBA 2005 Fordham University
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



TCPDF is not generating pdf...

2008-10-22 Thread xelios

on visiting the page.. {http://localhost/cake12/CakePHP/books/viewPdf}

It is displaying a blank page...

any clue...
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursion

2008-10-22 Thread mirfan

Hello david
All the problems ahve been solved now i am sending you an email where
i have attached an image please give me some suggestion about that.
Regards,

On Oct 22, 9:22 pm, Luiz Poleto <[EMAIL PROTECTED]> wrote:
> Well...
> I've just find out what the error was...
>
> In my model, i had
>
> var $actAs = array('Tree');
>
> instead of
>
> var $actsAs = array('Tree');
>
> D'oh!
>
> Regards,
> Luiz Poleto
>
> On Oct 22, 1:42 pm, Luiz Poleto <[EMAIL PROTECTED]> wrote:
>
> > I have the same issue:
>
> > You have an error in your SQL syntax; check the manual that
> > corresponds to your MySQL server version for the right syntax to use
> > near 'generatetreelist' at line 1
>
> > I changed the table to be compliant with the instructions in the
> > cookbook, and i'm getting this error now.
> > Any ideas?
>
> > Regards,
> > Luiz Poleto
>
> > On Oct 22, 7:09 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
> > > Is your table set up correctly (includes parent_id, lft, rght)?
> > > Post the error you're getting here, stabbing in the dark doesn't work
> > > too well. ;o)
>
> > > Chrs,
> > > Dav
>
> > > On 22 Oct 2008, at 14:16, mirfan wrote:
>
> > > > Hello david,
> > > > The link you provide me nearly solved my problem thanks, but there is
> > > > a problem when i was trying it in a separate project it works as i
> > > > need but when i integrate it in my project it gives me an sql error i
> > > > don't know why is that problem coming please help me
>
> > > > On Oct 20, 7:31 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> > > >>http://book.cakephp.org/view/91/Tree
>
> > > >> On 19 Oct 2008, at 20:10,mirfanwrote:
>
> > > >>> Hi,
> > > >>> I have a problem withrecursion. I have a table for keeping the
> > > >>> account information of all members in which each member has a parent
> > > >>> now i have to find out all of the members in the downline of a
> > > >>> specific one look at the following example.
> > > >>> Member1
> > > >>> |
> > > >>>
> > > >>>   |   |
> > > >>>   Member2   Member3
> > > >>> | |
> > > >>>   Member4---
> > > >>>|  |
> > > >>> Member5 Member6
> > > >>> from member2 to member6 all are the downline of Member1 and member5
> > > >>> and 6 are downline of member3
> > > >>> please give a solution for this i am really tired and boared.
> > > >>> Regards,
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



problem with using TCPDF...

2008-10-22 Thread xelios

I am using TCPDF for creating pdf. I have following problem:

Fatal error: Class 'XTCPDF' not found in C:\xampp\htdocs\cake12\CakePHP
\app\views\books\view_pdf.ctp on line 3..


please help me!
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Controller Action Testing

2008-10-22 Thread Joel Perras

Two things:

1) I would suggest using the more fully qualified format of
testAction: testAction(array('controller'=>'galleries', 'action' =>
'show', 'xyz')); For simple requests both formats should be identical,
but the latter will be more useful when you start applying more
complex routing schemes.

2) If your controller method being tested calls Controller::redirect()
at any time, the test exit without any warning. This is because the
redirect method was refactored some time ago to call Object::_stop()
upon completion (a smart thing, IMHO), which is actually just a
wrapper for exit(). You can get around this by overriding the _stop
method in your app_controller, but only for test execution:

/**
* Override of Object::_stop.
*
* For unit testing of controllers.
*
* @param integer $status
* @return mixed Null if testing, execution of Object::_stop otherwise.
*/
function _stop($status = 0) {

  if (defined('CAKEPHP_UNIT_TEST_EXECUTION') &&
CAKEPHP_UNIT_TEST_EXECUTION == 1) {
  return;
  }
  else return parent::_stop();
}


hth.

-J.


On Oct 22, 8:11 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> today i tried to implement some testing classes in my project. But i
> can't ge t them run the right way.
>
> For example this simple test method:
> The first test calls the show action with a string that should fail
> and redirect. The second test with an integer as parameter should run
> correctly.
>
> function testShowAction() {
>         $this->testAction('/galleries/show/xyz');
>         $this->assertResponse(REDIRECT);
>         $this->testAction('/galleries/show/2');
>         $this->assertResponse(SUCCESS);
>
> }
>
> When i call this method in the "myproject/test.php" it redirects me to
> the gallery and exit the test.
> Whats the right way to test an controller action ?
>
> Best Regards
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: change MIT license to GPL?

2008-10-22 Thread Nate

On Oct 22, 4:15 pm, pepejose <[EMAIL PROTECTED]> wrote:
> hello, I've been looking for information about the GPL and MIT and
> wanted to know, because I am not sure, if I can change the license of
> a framework cakephp to GPL and as I have to make changes
>
> greetings and thank you very much

You can certainly re-release the framework under a different license,
though why anyone would ever want to use the GPL is quite beyond me.
Please see here: 
http://video.google.com/videoplay?docid=8073195220998636516&ei=Eu7_SL7BIYruqALaz7m7BA
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SEO friendly

2008-10-22 Thread Brett Wilton

Also Mariano did another article before Sluggable behaviour which was
quite good :-

http://bakery.cakephp.org/articles/view/adding-friendly-urls-to-the-cake-blog-tutorial

If you want a more restful URL you can use the router side of things for this.


Brett Wilton
http://wiltonsoftware.com

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction not receiving $this->data

2008-10-22 Thread Braulio

Fixed and committed!  Maybe you would like to copy the solution...

On 21 oct, 21:38, Braulio <[EMAIL PROTECTED]> wrote:
> I think I may have found the bug and the solution.  See 
> here:https://trac.cakephp.org/ticket/5628#comment:6.
>
> Regards,
>
> B.
>
> On 20 oct, 17:04, Braulio <[EMAIL PROTECTED]> wrote:
>
> > I reported it as a bug, and it has been accepted.  I hope it will soon
> > be corrected.
>
> >https://trac.cakephp.org/ticket/5628
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SEO friendly

2008-10-22 Thread teknoid

check out the sluggable behavior:
http://bakery.cakephp.org/articles/view/slug-behavior


On Oct 21, 2:30 am, bookme <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to make my wesite SEO frienldy?
>
> I  read SlugBehavior and going to implement it.
>
> I saw SeoHelper in bakesale code and see that it's generating url like
>
>  bakesale/mac-mini-p-29.html
>
> but I didn't get any help on bakery for this..can some body tell me
> how can I generate link like above because bakesale code is in version
> 1.1..and I am doing  work on 1.2
>
> Is there any other way doing this?
>
> Thanks
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP performance issue.

2008-10-22 Thread Mathew

Just because the CPU is running at a 100% does not at all mean the CPU
is overloaded.

All it means is that there is one or more threads executing
continuously on all CPUs.

You have no way of know what that means for HTTP response times.

100% CPU usage for any Linux daemon is perfectly normal if that daemon
is busy. Since your hitting the server hard running automated tests
one would expect to see 100% CPU usage.

CPU usages and server load are not the same thing.

You need to make judgments based upon the HTTP response times, and not
worry about thread activity, because visitors will only know how long
it takes their browsers to get an HTTP response.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SEO friendly

2008-10-22 Thread Brett Wilton

Using the router is one way to achieve this.

Here's a few articles on this...
http://book.cakephp.org/view/46/Routes-Configuration
http://debuggable.com/posts/new-router-goodies:480f4dd6-4d40-4405-908d-4cd7cbdd56cb


Brett Wilton
http://wiltonsoftware.com

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Controller Action Testing

2008-10-22 Thread [EMAIL PROTECTED]

Hi,

today i tried to implement some testing classes in my project. But i
can't ge t them run the right way.

For example this simple test method:
The first test calls the show action with a string that should fail
and redirect. The second test with an integer as parameter should run
correctly.

function testShowAction() {
$this->testAction('/galleries/show/xyz');
$this->assertResponse(REDIRECT);
$this->testAction('/galleries/show/2');
$this->assertResponse(SUCCESS);
}

When i call this method in the "myproject/test.php" it redirects me to
the gallery and exit the test.
Whats the right way to test an controller action ?

Best Regards
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Habtm fetching data

2008-10-22 Thread cem

Hi I have auctions which can have more than one category . I want to
get the categories which belongs to a specified auction .

So the Category HABTM Auction . Thats Right because I can store data
in the join table . My problem is :

   While fetching data what will I do ?

$this->Auction->Category->find('all' ,array('conditions'...))

   was an advice from the chat which does not work any other ideas ?

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Flash and audio in Cake

2008-10-22 Thread Adam Royle

The issue is that flash is looking in the wrong place for your mp3
file. Relative paths are relative to the *HTML page* when they are
embedded. So you either need to:

1. Use a relative path from the site root (eg "/images/
Cleve_Bus_Connect.mp3") in your player.swf
2. Pass the location to the mp3 as a parameter to your swf (this is
what I usually do)
3. Write some code in player.swf to create an absolute path based on
the _root._url value (a bit more complex)

My final tip is to use Firebug whenever you're debugging issues like
this - it shows what url flash is trying to load, and which ones are
404 not found.

Cheers,
Adam

On Oct 23, 3:47 am, tapupartforpres <[EMAIL PROTECTED]> wrote:
> Hello.  I have a flash player that is playing a mp3 on our site.  It
> is not playing the linked mp3 file 
> (http://www.cbcmagazine.com/october/events).  But when I go directly to
> the file on the server it plays fine (http://www.cbcmagazine.com/
> images/player.swf).  Has anyone seen this happen with mp3 files linked
> to a flash player?  Thanks
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP create url's Rails way - rHelper

2008-10-22 Thread Nookie

I've just create new helper to create urls faster then just using
Router::url().
You can check it here -> http://bin.cakephp.org/view/490647179
I'll would like to know what you think about it and i'm waiting for
suggestions.
thanks
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: change MIT license to GPL?

2008-10-22 Thread Olexandr Melnyk
As far as my small licensing knowledge goes, derivatives of a MIT-licensed
work can be licensed under GPL, but the original copyright notice has to be
left.

Not to mean that it would be a good idea to fork CakePHP under a not
backwards-compatible open source license, which would prevent from a
potential merge with the main code base in the future.

2008/10/23 Gwoo <[EMAIL PROTECTED]>

>
> No, only the owner of the copyright can change the license. Depending
> on the size of the changes you make, you may or may not be able to
> claim ownership in the copyright. By my estimation, you would have to
> substantially change more than 50% of every class. That means
> modifying the logic not just changing names around.  Anyway, you can
> make changes to the framework without changing the license. If you
> think your changes are that great, you should really think again.
> >
>


-- 
Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: passedArgs help!

2008-10-22 Thread Gwoo

in that case use $this->data['Question']['survey_id'] = $this-
>passedArgs['survey_id']; in your controller method
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: change MIT license to GPL?

2008-10-22 Thread Gwoo

No, only the owner of the copyright can change the license. Depending
on the size of the changes you make, you may or may not be able to
claim ownership in the copyright. By my estimation, you would have to
substantially change more than 50% of every class. That means
modifying the logic not just changing names around.  Anyway, you can
make changes to the framework without changing the license. If you
think your changes are that great, you should really think again.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHPShop v2 is a cake app!

2008-10-22 Thread Pablo

I have honestly not given that idea much thought.  I mostly approached
the development as if phpShop were the base application and that it
would have it's own set of plugins to expand its functionality.  I
would have to see how a plugin can have plugins...  Or how to have a
similar ability to extend functionality.  If you have ideas or can
point me in the right direction, please let me know.

Thanks!

On Oct 22, 9:42 am, acoustic_overdrive <[EMAIL PROTECTED]>
wrote:
> Hi Pablo,
>
> Nice to hear from you. I might be able to contribute a gift voucher
> and promotional code module for instance in a few months as this is
> something I need soon, and perhaps much more.
>
> Have you thought about the pros and cons of writing this whole thing
> as a plugin rather than an application? It might make it easier for
> people to incorporate it in existing Cake-based sites, though I
> understand you audience is much wider than just cake users.
>
> Jamie
>
> On Oct 22, 1:01 pm, Pablo <[EMAIL PROTECTED]> wrote:
>
> > Hi all, I am pablo fromphpshop.org.  Just to clarify, YES,phpshop
> > 2.0 is based on the CakePHP 1.2 branch.
>
> > We have been working on the code quite a bit and as you can see if you
> > install from SVN, we are pretty close to getting to the point a
> > releasable product.  While there are many items that still need to be
> > worked on, the main things that are missing in my mind are the store's
> > checkout authentication (login/register) and the payment processing
> > part (currently has code for paypal plugin, but we'd like to work on
> > other plugins for other processors).  What's there for the entire
> > checkout process works now, kind of sort of, but needs major testing.
> > Assuming these two items get done, we'd have a cart that could be
> > deployed.  Of course, there are a whole series of things that could
> > also be worked on before we'd call this "ready for production"; if
> > you'd like to contribute, please get in touch.  Having other bakers
> > help would be great!
>
> > If the site is looks bad, it would be great if you could send a screen
> > shot so I can see what the problem is.
>
> > Thanks,
> > Pablo

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



change MIT license to GPL?

2008-10-22 Thread pepejose

hello, I've been looking for information about the GPL and MIT and
wanted to know, because I am not sure, if I can change the license of
a framework cakephp to GPL and as I have to make changes

greetings and thank you very much

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Write view output to file - best MVC approach?

2008-10-22 Thread Dardo Sordi Bogado

> 2nd idea : maybe there is a way to override View (like an AppView for
> instance)

You can create your own view classes extending view and set:

 var $view = 'MyView'

in your controller.


But I think cake's built-in view class will do the trick:

1. Call render('the-xml-view')
2. Get the rendered view ($this->output)
3. Save the data in a file
4. Empty $this->output
5. Call render with the view the user should get.

HTH,
- Dardo Sordi.

> I don't know of it's possible, but if I were you, I'll check towards
> this way
>
> On 22 oct, 17:08, "Liebermann, Anja Carolin"
> <[EMAIL PROTECTED]> wrote:
>> Hi djiize,
>>
>> Thanks for the hint. But my problem with the size of my view would still 
>> remain.
>>
>> I guess in the end the view will contain several thousands (litearally) of 
>> lines in xml and would cause a crash of either php / server / or browser. So 
>> what I would like to do is write chunks of data from the view output into a 
>> file while it is generated and not after I have a big servercrashing 
>> datablob.
>> Any idea?
>>
>> Background information: I program a product information system and in the 
>> end all gathered data should go to an xml-export file for e.g. a WCMS, 
>> catalogue or a distributor.
>>
>> Greetings Anja
>>
>> -Ursprüngliche Nachricht-
>> Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von 
>> djiize
>> Gesendet: Mittwoch, 22. Oktober 2008 16:55
>> An: CakePHP
>> Betreff: Re: Write view output to file - best MVC approach?
>>
>> in Controller code, a call to $this->render() returns the content of the 
>> view HTH
>>
>> On 22 oct, 15:49, "Liebermann, Anja Carolin"
>>
>> <[EMAIL PROTECTED]> wrote:
>> > Hi everybody,
>>
>> > I make good progress with my xml-export.
>> > Since I expect the output to become very big, I would like to write
>> > the resulting view rather to the harddisk to download later than show
>> > it on the screen.
>>
>> > Now my questions:
>> > In my controller I have an function which could write strings in a file.
>> > But my strings are composed in my view!
>>
>> > What is the best approach to stay in the MVC world?
>>
>> > Call the write function form the view? Or transfer all foreach logic
>> > to the controller? If I do the second what do I do with strings I have
>> > put in elements?
>>
>> > If I want to avoid an overflow in my RAM do I have to flush something
>> > in between?
>>
>> > Thank you for your opinion and any hints!
>>
>> > Anja
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Pagination not working with MS SQL...

2008-10-22 Thread Braulio

Hi.

I am having troubles with pagination, because when I go to the next
page or another one the browsers always reloads the same page in all
of the actions where I use it.

I have Configure::write('debug', 2) and I am seeing that the SQL
queries generated are wrong (there is no ORDER BY).  They should be
like here: 
http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/.
In SQL Server 2005 and above something like this link would work:
http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx.

Is this happenning to someone else?  If so, I will send a bug report.

Regards,

B.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: where is my main page??

2008-10-22 Thread scs

I would suggest going through the Blog Tutorial

On Oct 22, 4:22 pm, teknoid <[EMAIL PROTECTED]> wrote:
> Create the file...
>
> Also read up on Auth in the manual.
>
> On Oct 22, 4:13 pm, "soldier.coder" <[EMAIL PROTECTED]>
> wrote:
>
> > when I browse to the root of my app, I get the out of the box
> > messages.  One of them boldy states:
>
> > To change the content of this page, edit: APP/views/pages/home.ctp.
>
> > But when I look for that file, there is just an empty directory!
>
> > Where does the page that is being rendered come from??
>
> > And maybe more to the point, I would like the controller for this page
> > to force users to log in.  Where is that controller??
>
> > Thank you for your help
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



where is my main page??

2008-10-22 Thread soldier.coder

when I browse to the root of my app, I get the out of the box
messages.  One of them boldy states:

To change the content of this page, edit: APP/views/pages/home.ctp.

But when I look for that file, there is just an empty directory!

Where does the page that is being rendered come from??


And maybe more to the point, I would like the controller for this page
to force users to log in.  Where is that controller??


Thank you for your help

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: where is my main page??

2008-10-22 Thread teknoid

Create the file...

Also read up on Auth in the manual.

On Oct 22, 4:13 pm, "soldier.coder" <[EMAIL PROTECTED]>
wrote:
> when I browse to the root of my app, I get the out of the box
> messages.  One of them boldy states:
>
> To change the content of this page, edit: APP/views/pages/home.ctp.
>
> But when I look for that file, there is just an empty directory!
>
> Where does the page that is being rendered come from??
>
> And maybe more to the point, I would like the controller for this page
> to force users to log in.  Where is that controller??
>
> Thank you for your help
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: controller fixturize drops table in end, how to test data?

2008-10-22 Thread Howard Glynn
> On Wed, Oct 22, 2008 at 1:47 PM, Defranco <[EMAIL PROTECTED]> wrote:
>
> Regarding controller testing using Test Suite on 1.2.RC3:
> 

Defranco,

Sadly I don't know the answer to your question, but I'd encourage you to
have a go with SVN head (nightly) as this does appear to fix some quirks of
testing ( i think you are part of the thread at *http://tinyurl.com/66sujk )
* I did read the libs earlier today and I suspect you could hack the core to
stop this deletion, at least in the very short term.  Did you investigate
the callbacks at all (2nd set of code at
http://book.cakephp.org/view/366/Testing-controllers ) -  that might allow
you to pause before the drops? (PS If you do find an answer please share!)

But I thought I'd hijack the thread somewhat and add some words of
encouragement for those who are using testing (and those who develop it -
thanks!) and this pops up in their searching ...

After many traumas, false starts etc, I have my app models testing with SVN
head at about 96% coverage. I'm using a mix of hand crafted fixtures and
imported (copied) tables. I moved on to controller testing yesterday and
haven't got very far as yet, but I think it will take time.

Certainly the ease with which you can do model testing is a huge motivator
for the "fat model" approach often touted on here, I've pushed as much as I
can back there which can only be a good thing.

For controllers, as many may well know:

- Things like redirects in the actual controller break things very easily.
  (there are various threads relating to this, eg *http://tinyurl.com/6ns7tg
*

- fixturize is nice, but I've had problems transferring large amounts of
records (at least I think that is what it is doing, I might be wrong?). Also
my old legacy DB with a timestamp breaks it

- a force downloaded file via headers (CSV) via a controlller method throws
up problems (similar to redirect i suppose)

Right now, the only thing I can really do with controller testing is get the
index and check that; I'm not complaining too much, that proves my setup is
right - I'm sure I will figure out more in the coming days.

Debuggable's blog piece is useful - esp. the comments - I posted some
outline model code there (me = "aitch") *http://tinyurl.com/6pq26c*

The bakery article is now well out of date unfortunately; the book is not
bad but lacks a lot of up to date details if you are on the bleeding edge.

I've read a lot of the src to try and establish what is going on. Also the
inbuilt test cases of course have useful nuggets to learn from. I think that
is often the best bet, but as I think has been alluded to on this list and
elsewhere the testing is in a state of flux and somewhat immature compared
to the rest of the package.

I'd encourage others to persevere as it does function well but it takes some
effort; however it is very rewarding when it works and gives terrific
confidence levels. It is interesting when done properly as it really
encourages you to write test-friendly code which must be a good thing.
Superb if you work in an environment where you are looking to "hand off"
your code / site to someone else for ongoing maintenance.

When I get some time and fully understand it, and the code settles down a
bit (maybe 1.2 actual release) I *will* write something comprehensive up.

H


On Wed, Oct 22, 2008 at 1:47 PM, Defranco <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Regarding controller testing using Test Suite on 1.2.RC3:
>
> How do I test resulting data after I run testAction and
> fixturize=true? The problem is that all all tables are dropped after
> testAction routine.
>
> For example if I run a simple testAction:
>
> $this->testAction(  "/mycontroller/index",
>array(  'fixturize' => true));
>
>
> fixturize=true will make it to create all tables before running
> index(), but it will drop all tables after testAction... how do I test
> resulting data if the tables are all dropped?
>
> Is possible to make testAction to fixturize data but do not drop it so
> I can test resulting data saved on tables?
>
> kind regards
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Disable / Hide Login Message

2008-10-22 Thread MDB

I am not setting it all, I am new to cake so I am guessing it is part
of the built in authorization.


On Oct 22, 2:46 pm, gravyface <[EMAIL PROTECTED]> wrote:
> You using session->setFlash()?  You might be able to try
> session->delete('flash') to remove that message where you see fit.  Not
> positive that will work though...
>
>
>
> MDB wrote:
> > Hello all, I have a login page where if the default login fails, it
> > tries using a second login.  Due to this, the "Login failed. Invalid
> > username or password." message appears even if my second login was
> > sucessfull.  So my question is, how do I get rid of this message or
> > hide it?  If I hit refresh in the browser, it does go away.- Hide quoted 
> > text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone running on network solutions hosting? netsolhost

2008-10-22 Thread [EMAIL PROTECTED]

Just to close this -- the behavior I'm observing only happens with the
internalized cake controllers, I build a couple new controllers for
the app and their helper utilization was correct.  I'm good at this
point, thanks for your help Penfold

On Oct 22, 10:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Yep.  With increasing specificity ...
>
> In the top one RewriteBase / ... in /app RewriteBase /app and in
> webroot RewriteBase /app/webroot
>
> Also tried with adding trailing / in the later two with no effect
> (positive or negative)
>
> On Oct 22, 9:59 am, Penfold <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > have to applied the rewritebase to all the .htaccess files as there
> > are 3?
>
> > On 22 Oct, 15:24, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > Thanks.   Adding RewriteBase to the .htaccess files at least let's the
> > > framework load and run ...
>
> > > Causes a different issue ... again, only on the deployment/production
> > > box, not on dev --
>
> > > I've rewritten the / route to an under construction page which works
> > > fine as I haven't used any helpers in it, but when I nav to sitename/
> > > pages/home to see the setup page and check that everything is usable,
> > > it comes up unstyled -- when I do a view source, the helpers appear to
> > > be including the controller name in the path to the css ...
>
> > > link rel="stylesheet" type="text/css" href="/pages/css/
> > > cake.generic.css"
>
> > > thoughts?
>
> > > Again, this is latest Beta, not the RC from this morning.
>
> > > Hank
>
> > > On Oct 22, 6:36 am, Penfold <[EMAIL PROTECTED]> wrote:
>
> > > > its proabely and issue with .htaccess add BaseRewrite / to it.
>
> > > > Check out bakery for 1 and 1, this is normally a common issue with
> > > > hosting providers
>
> > > > On 21 Oct, 17:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > > Have a client that bought hosting before contacting me ... he's on
> > > > > network solutions with php running under fastcgi.
>
> > > > > I have simple 1 page php stuff including a phpinfo page running, but
> > > > > when I copy up a cake project and install the .htaccess file all I get
> > > > > are 500 Errors.
>
> > > > > I have the app running locally for dev under mod_php5 apache2 just
> > > > > fine, so it's the deployment.
>
> > > > > Running the current beta3 if that matters.
>
> > > > > Thanks,
>
> > > > > Hank
>
> > > > > ... I did a number of searches, both here, google and elsewhere before
> > > > > posting, but if I missed something obvious, a gentle pointer would be
> > > > > appreciated.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Write view output to file - best MVC approach?

2008-10-22 Thread [EMAIL PROTECTED]

In your case I think keeping the server from crashing tops MVC
design. :)

But considering how other things in CakePHP are organized you could
skip the view and output using a component or just a plain class.
Compare to something like EmailComponent, File class. Your email is
rendered by the email component not an email view. The view is for
returning the result of a request to the requesting browser. When
"rendering" to other outputs you exit through a side-door in Cakes MVC
layers. :)

One thing I have noticed is that out-of memory errors usually come
about the same time as php's max execution time (roughly). So if you
are going to be writing thousands of lines and worry about memory...
you also need to worry about time. Even if you increase the execution
time the browser will eventually give up waiting. What I am getting at
is wether this output will be triggered in a request or as a cron or
something similar?

Another related thing I have observed is that it probably won't be
your view causing problems. The View will only contain the resulting
text output (1MB of raw text is a lot). What will eat your memory
faster is the array-data used to generate the view. So you can
probably get away with just "paginating" (find with limit and page
set) your data in a loop and calling $this->render() each time and
saving the result (as suggested by djiize). It will still take a long
time. As a cron I have had my script go through 950'000 rows of quite
complex data and generating reports on it... a few thousand rows at a
time in a while-loop from a shell with no memory problems and the
normal website still running (not locking up).

Something like:
$page = 1;
while ( $all = $this->MyModel->find('all', array(
'conditions'=>array(
'MyModel.created >' => $startDate
),
'recursive'=>'-1',
'order'=>'MyModel.created ASC',
'limit'=>'5000',
'page' => $page++
))) {
foreach ( $all as $one ) {
// generate stuff here
}
}


/Martin


On Oct 22, 5:08 pm, "Liebermann, Anja Carolin"
<[EMAIL PROTECTED]> wrote:
> Hi djiize,
>
> Thanks for the hint. But my problem with the size of my view would still 
> remain.
>
> I guess in the end the view will contain several thousands (litearally) of 
> lines in xml and would cause a crash of either php / server / or browser. So 
> what I would like to do is write chunks of data from the view output into a 
> file while it is generated and not after I have a big servercrashing datablob.
> Any idea?
>
> Background information: I program a product information system and in the end 
> all gathered data should go to an xml-export file for e.g. a WCMS, catalogue 
> or a distributor.
>
> Greetings Anja
>
> -Ursprüngliche Nachricht-
> Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von djiize
> Gesendet: Mittwoch, 22. Oktober 2008 16:55
> An: CakePHP
> Betreff: Re: Write view output to file - best MVC approach?
>
> in Controller code, a call to $this->render() returns the content of the view 
> HTH
>
> On 22 oct, 15:49, "Liebermann, Anja Carolin"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi everybody,
>
> > I make good progress with my xml-export.
> > Since I expect the output to become very big, I would like to write
> > the resulting view rather to the harddisk to download later than show
> > it on the screen.
>
> > Now my questions:
> > In my controller I have an function which could write strings in a file.
> > But my strings are composed in my view!
>
> > What is the best approach to stay in the MVC world?
>
> > Call the write function form the view? Or transfer all foreach logic
> > to the controller? If I do the second what do I do with strings I have
> > put in elements?
>
> > If I want to avoid an overflow in my RAM do I have to flush something
> > in between?
>
> > Thank you for your opinion and any hints!
>
> > Anja
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



HABTM not auto-populating field

2008-10-22 Thread djXternal

Hey guys, I am fairly new to the HABTM usage in cake, I am trying to
setup a simple edit page for a table "channels" that has a HABTM
relationship with "tags" using the join table "channels_tags" in my
view page it successfully see the related tags for the channel, but
when I use the form help and use: input('Tag'); ?>
it outputs a muli-select box like it should, but there is no data
inside the box...

Here is the relevant code:

/models/channel.php


/models/tag.php


/controllers/channels_controller.php
set('channels', $this->Channel->find('all'));
}

function view($id) {
$this->set('channel', $this->Channel->findById($id));
$this->set('users', $this->User->find('all'));
}

function edit($id = null) {
if (empty($this->data)) {
$this->set('channel', $this->Channel->findById($id));
}
else {
//do something
}
}
}
?>

/views/channels/edit.ctp
create('Channel', array('action' => 'edit'));
echo $form->input('title');
echo $form->input('Tag');
echo $form->end('Update');
?>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Disable / Hide Login Message

2008-10-22 Thread gravyface

You using session->setFlash()?  You might be able to try 
session->delete('flash') to remove that message where you see fit.  Not 
positive that will work though...

MDB wrote:
> Hello all, I have a login page where if the default login fails, it
> tries using a second login.  Due to this, the "Login failed. Invalid
> username or password." message appears even if my second login was
> sucessfull.  So my question is, how do I get rid of this message or
> hide it?  If I hit refresh in the browser, it does go away.
> 
> 
> > 

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP performance issue.

2008-10-22 Thread [EMAIL PROTECTED]

Hi,
This is probably a silly question: Isn't a stress test supposed to max
out the server?

That said, I know little of serious performance testing. :)

I would stress my server, not to find out if my App has performance
problems but to find out what the limit of my server is.
When I profile my code to find bottlenecks, I need to measure how long
my code takes to run certain methods or groups of methods. Maxing out
Apache would not tell me much.

I mostly "maunally" profile suspected bottlenecks in my apps. I add
lots and lots of data, because 2nd to requestAction, the biggest slow-
down in most cases is data manipulation. Then I try to cause some
clear improvement by optimizing how and what data is queried.
Containable is my new best friend :)

Are you using JMeter because it is able to track how php handles each
request?

/Martin
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Disable / Hide Login Message

2008-10-22 Thread MDB

Hello all, I have a login page where if the default login fails, it
tries using a second login.  Due to this, the "Login failed. Invalid
username or password." message appears even if my second login was
sucessfull.  So my question is, how do I get rid of this message or
hide it?  If I hit refresh in the browser, it does go away.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Working 1.2 Auth with "remember me" feature

2008-10-22 Thread RyOnLife


Tim and Co.,  just wanted say thanks for the great code. I was really
struggling to understand the Auth component and this got me up and running.

You mentioned in your initial post that your code was cobbled from all over
and you'd give the original authors credit if you were able. I recognized a
good bit of the code from 
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/ . So
thanks to that blogger. I also point this out because that post still helped
me to understand much of the improved code in this thread.
-- 
View this message in context: 
http://www.nabble.com/Working-1.2-Auth-with-%22remember-me%22-feature-tp17205622p20116330.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: I'm having a problem with containable

2008-10-22 Thread Stinkbug

That did it.  Thanks!  Gee, I guess it just takes a extra set of eyes
sometimes.  I've looked at that code in the docs 20 times probably and
never caught that.

On Oct 21, 9:49 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> > 'contain' => array('ListLink', array(
>
> Try:
> 'contain' => array('ListLink' => array(...
>
> Make a connection between 'LinkList' => and => it's => array().
> The way you wrote it it's two separate parameters...
>
> On 22 Oct 2008, at 06:43, Stinkbug wrote:
>
>
>
> > I think my code looks almost exactly like what's in the docs with the
> > exception of the extra condition.  I'm not getting my desired results
> > and I'm not sure what I'm doing wrong.  Here is what my data looks
> > like that's getting returned.
>
> > Array
> > (
> >    [ListTitle] => Array
> >        (
> >            [id] => 3
> >            [title] => Featured Story
> >        )
>
> >    [ListLink] => Array
> >        (
> >            [0] => Array
> >                (
> >                    [id] => 1
> >                    [title] => It's the great and mighty Stinkbug!
> >                    [link] =>http://blog.stinkbug.net
> >                    [list_title_id] => 3
> >                    [created] => 2008-10-20 15:05:01
> >                    [modified] => 2008-10-20 15:41:49
> >                    [deleted] => 1
> >                    [deleted_date] => 2008-10-20 15:41:49
> >                )
>
> >            [1] => Array
> >                (
> >                    [id] => 2
> >                    [title] => It's Google!
> >                    [link] =>http://www.google.com
> >                    [list_title_id] => 3
> >                    [created] => 2008-10-20 16:35:54
> >                    [modified] => 2008-10-20 16:35:54
> >                    [deleted] => 0
> >                    [deleted_date] =>
> >                )
>
> >            [2] => Array
> >                (
> >                    [id] => 3
> >                    [title] => Stinkbug The Man
> >                    [link] =>http://www.stinkbug.net
> >                    [list_title_id] => 3
> >                    [created] => 2008-10-21 09:38:14
> >                    [modified] => 2008-10-21 09:38:14
> >                    [deleted] => 1
> >                    [deleted_date] => 2008-10-21 09:49:12
> >                )
>
> >            [3] => Array
> >                (
> >                    [id] => 4
> >                    [title] => A Test URL
> >                    [link] =>http://www.google.com
> >                    [list_title_id] => 3
> >                    [created] => 2008-10-21 09:43:41
> >                    [modified] => 2008-10-21 09:43:41
> >                    [deleted] => 1
> >                    [deleted_date] => 2008-10-21 09:46:57
> >                )
>
> >            [4] => Array
> >                (
> >                    [id] => 5
> >                    [title] => Oops, Stinkbugs did it again!
> >                    [link] =>http://www.stinkbug.net
> >                    [list_title_id] => 3
> >                    [created] => 2008-10-21 11:17:15
> >                    [modified] => 2008-10-21 11:17:15
> >                    [deleted] => 0
> >                    [deleted_date] =>
> >                )
>
> >        )
>
> > )
>
> > And here is my code that returns that data:
>
> > //Grab the Features Stories data.
> > $this->ListTitle->Behaviors->attach('Containable');
>
> > $featuredStories = $this->ListTitle->find('first', array(
> >    'conditions' => array('ListTitle.id' => 3),
> >    'contain' => array('ListLink', array(
> >            'conditions' => array('ListLink.deleted' => 0),
> >            'order' => 'ListLink.created DESC',
> >            'limit' => 3
> >    )
> > )));
>
> > By looking at the code I think you can see what I would like
> > returned.  All of ListLink where deleted = 0.  As you can see from my
> > data above, it's returning everything.  I am getting some errors.
>
> > Warning (2): preg_match() expects parameter 2 to be string, array
> > given [CORE\cake\libs\model\behaviors\containable.php, line 280]
> > Notice (8): Array to string conversion [CORE\cake\libs\model\behaviors
> > \containable.php, line 283]
> > Notice (8): Array to string conversion [CORE\cake\libs\model\behaviors
> > \containable.php, line 340]
> > Warning (512): Model "ListTitle" is not associated with model
> > "Array" [CORE\cake\libs\model\behaviors\containable.php, line 342]
>
> > Not sure what they mean though.  Here are the queries getting spit
> > out.
>
> > SELECT `ListTitle`.`id`, `ListTitle`.`title` FROM `list_titles` AS
> > `ListTitle` WHERE `ListTitle`.`id` = 3 LIMIT 1
>
> > SELECT `ListLink`.`id`, `ListLink`.`title`, `ListLink`.`link`,
> > `ListLink`.`list_title_id`, `ListLink`.`created`,
> > `ListLink`.`modified`, `ListLink`.`deleted`, `ListLink`.`deleted_date`
> > FROM `list_links` AS `ListLink` WHERE `ListLink`.`list_title_id` = (3)
>
> > As you can see, the conditions for the ListLink model is totally being
>

Flash and audio in Cake

2008-10-22 Thread tapupartforpres

Hello.  I have a flash player that is playing a mp3 on our site.  It
is not playing the linked mp3 file (
http://www.cbcmagazine.com/october/events).  But when I go directly to
the file on the server it plays fine (http://www.cbcmagazine.com/
images/player.swf).  Has anyone seen this happen with mp3 files linked
to a flash player?  Thanks



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP performance issue.

2008-10-22 Thread Marcelius

I was wandering if your stress test setup is correct and relevant?

100 threads and ramp up of 5 seconds, that's 20 requests per second.
You have 2 pages / requests to test, which would actually generate 40
requests per second.
That would initially explain that 5ms response time because either
your client computer can't handle all those requests or you've used up
all your available bandwith given by your hosting provider.

Second your cpu load. That basicly depends on your server's hardware.
I can perform a stress test on a 368 computer and say it doesn't
respond fast enough :-) So not only stress test parameters are
important, also the server hardware should be noted when posting
results I guess...

And you could allways check the most common bottlenecks such as
requestAction etc...

So I do believe you could possibly have a performance problem but its
not possible for someone to say what the problem is if not all the
facts are there ;-)

Still verry interessting this kind of stuff by the way :-)

On 22 okt, 14:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I've started stress testing application and have problems with
> performance.
> First, I thought it was because of problems in code, but after few
> tests I deceided remove all logic and test clear framework.
>
> Latest stable version (cake_1.1.20.7692) was downloaded and installed
> on 2 different servers.
> Jakarta JMeter was used as stress-testing utility.
> Number of threads: 100
> Ramp-Up period: 5 sec
>
> I tried to test 2 requests:
> 1) request main page of cake (CakePHP Rapid Development ...)
> 2) pages/test. I created simple view without any logic inside.
> Both results were the same and both are strange for me. I have had
> follow digits:
> average time 1000 ms (it's normal) and max. time up to 5 ms.
> I executed top at server and watched - processor was overloaded.
>
> top - 16:30:05 up  3:04,  2 users,  load average: 14.04, 5.06, 1.83
> Tasks: 156 total,  33 running, 123 sleeping,   0 stopped,   0 zombie
> Cpu(s): 81.1%us, 17.9%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.2%hi,
> 0.8%si,  0.0%st
> Mem:   2065068k total,   986420k used,  1078648k free,   131132k
> buffers
> Swap:  2031608k total,        0k used,  2031608k free,   404868k
> cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  5046 daemon    15   0 36488 7380 4288 R   19  0.4   0:04.43 httpd
>  5151 daemon    15   0 36428 7144 4100 S   16  0.3   0:03.78 httpd
>  5092 daemon    15   0 36488 7380 4288 R   14  0.4   0:04.47 httpd
>  5165 daemon    15   0 36428 7144 4100 R   12  0.3   0:00.74 httpd
>  5173 daemon    15   0 36428 7144 4100 R   11  0.3   0:00.83 httpd
>  5175 daemon    16   0 36428 7144 4100 R    9  0.3   0:00.53 httpd
>  5180 daemon    16   0 36428 6668 3628 R    9  0.3   0:00.27 httpd
>  5066 daemon    15   0 36744 7484 4392 D    8  0.4   0:05.27 httpd
>  5203 daemon    15   0 36684 6660 3620 D    8  0.3   0:00.24 httpd
>  5162 daemon    15   0 36428 7144 4100 D    8  0.3   0:01.29 httpd
>  5149 daemon    15   0 36428 7144 4100 D    7  0.3   0:03.12 httpd
>  5146 daemon    15   0 36428 7144 4100 D    6  0.3   0:02.92 httpd
>  5174 daemon    15   0 36684 6964 3928 D    6  0.3   0:00.20 httpd
>  5152 daemon    15   0 36428 7144 4100 R    5  0.3   0:01.71 httpd
>  5153 daemon    15   0 36428 7144 4100 D    5  0.3   0:03.01 httpd
>  5137 daemon    15   0 36428 7144 4100 D    5  0.3   0:04.13 httpd
>  5139 daemon    15   0 36428 7144 4100 R    4  0.3   0:03.09 httpd
>
> In really, there is often even 99% CPU used.
> I tried to run this test with native php-application and cpu usage was
> normal in this way, so I think the reason of this overload is cake.
> Have someone stres-tested cake-application? What is the reason of big
> cpu usage? What should I do to make it normal?
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Login Password

2008-10-22 Thread MDB

Thanks

On Oct 22, 1:07 pm, gravyface <[EMAIL PROTECTED]> wrote:
> beforeFilter()
>
>
>
> MDB wrote:
> > Hello all, is there a way to get the login password before it is
> > hashed?  I need to pass the password to a seperate system where the
> > passwords are not hashed so I need both the hashed and unhashed
> > password.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Login Password

2008-10-22 Thread gravyface

beforeFilter()

MDB wrote:
> Hello all, is there a way to get the login password before it is
> hashed?  I need to pass the password to a seperate system where the
> passwords are not hashed so I need both the hashed and unhashed
> password.
> 
> 
> > 

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Login Password

2008-10-22 Thread MDB

Hello all, is there a way to get the login password before it is
hashed?  I need to pass the password to a seperate system where the
passwords are not hashed so I need both the hashed and unhashed
password.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Hosting

2008-10-22 Thread gravyface

App will be going live shortly and expect some peak traffic that's 
probably beyond my own server's capabilities (rather be safe than 
sorry).  Certainly not Slashdot-scale abuse, but there's going to be 
some fairly heavy uploading and concurrent traffic for at least the 
first few days or weeks.
I've been looking at some cloud goodness like TextDrive, Mosso, etc. but 
dreamhost.com may be an option as well, although the unique IP thing is 
a DNS pita.
Would love to hear your experiences with hosting production CakePHP 1.2 
apps.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: passedArgs help!

2008-10-22 Thread Cody Sortore

Hey thanks for the help!  I'm having troubles getting it into the form
now though...

I've always had hidden values like ID and stuff that I wanted to place
as a hidden object in a form.  This is what I have... tried several
other configurations to no avail, like putting pr($this-
>passedArgs['surveyid']) directly in the form for the value.


passedArgs['surveyid']); ?>
create('Question');?>


input('survey_id', array('type'=>'hidden', 'value'=>
'$surveyid' ));
echo $form->input('question');
?>

end('Submit');?>



On Oct 22, 2:50 am, Gwoo <[EMAIL PROTECTED]> wrote:
> $this->passedArgs is available in the view. just pr($this->passedArgs)
> and see what you get.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursion

2008-10-22 Thread Luiz Poleto

Well...
I've just find out what the error was...

In my model, i had

var $actAs = array('Tree');

instead of

var $actsAs = array('Tree');

D'oh!

Regards,
Luiz Poleto

On Oct 22, 1:42 pm, Luiz Poleto <[EMAIL PROTECTED]> wrote:
> I have the same issue:
>
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'generatetreelist' at line 1
>
> I changed the table to be compliant with the instructions in the
> cookbook, and i'm getting this error now.
> Any ideas?
>
> Regards,
> Luiz Poleto
>
> On Oct 22, 7:09 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
> > Is your table set up correctly (includes parent_id, lft, rght)?
> > Post the error you're getting here, stabbing in the dark doesn't work  
> > too well. ;o)
>
> > Chrs,
> > Dav
>
> > On 22 Oct 2008, at 14:16, mirfan wrote:
>
> > > Hello david,
> > > The link you provide me nearly solved my problem thanks, but there is
> > > a problem when i was trying it in a separate project it works as i
> > > need but when i integrate it in my project it gives me an sql error i
> > > don't know why is that problem coming please help me
>
> > > On Oct 20, 7:31 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> > >>http://book.cakephp.org/view/91/Tree
>
> > >> On 19 Oct 2008, at 20:10,mirfanwrote:
>
> > >>> Hi,
> > >>> I have a problem with recursion. I have a table for keeping the
> > >>> account information of all members in which each member has a parent
> > >>> now i have to find out all of the members in the downline of a
> > >>> specific one look at the following example.
> > >>>                         Member1
> > >>>                             |
> > >>>            
> > >>>           |                               |
> > >>>   Member2                   Member3
> > >>>         |                                 |
> > >>>   Member4            ---
> > >>>                            |                              |
> > >>>                     Member5                 Member6
> > >>> from member2 to member6 all are the downline of Member1 and member5
> > >>> and 6 are downline of member3
> > >>> please give a solution for this i am really tired and boared.
> > >>> Regards,
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: loginRedirect question re: Closed ticket @ Trac #5057

2008-10-22 Thread escape

I understand, and you're right that our main goal is a login page that
redirects to a specific location but it would be nice to also
allow users to bookmark or shortcut directly to specific pages where
they would be authenticated before redirection to that page (isn't
Cake great!).

I guess the simplest way to describe this in the context of our app
would be to think about a web-based CRM.  The main objective is a
login page that acts as a gateway to the protected user-specific
dashboard.  In our case we have a controller called 'users' with
actions for login/logout (per the 1.2 Cake Docs demo) and we're using
both Auth and ACL components.  I'm describing urls in terms of
controllers/actions because we're developing the app using Cake's
awesome router capabilities of reverse mapping of url's by specifying
arrays of controller/action instead of fixed url's.

I've created an action redirectHome that only does a redirect to the
users controller login action.  That redirectHome action is setup as
'/' in the Cake router config.  The loginRedirect value of the Auth
component is set to redirect the visitor to the index action of the
users controller.

So if the visitor goes directly to the dashboard root they're
redirected to the login action of the users controller.  Perfect!  But
while both auth/acl are in use, when they login, the default cake
action is to flash a message that they're not authorized to view that
page and they get the login prompt again (even with loginRedirect set
to redirect the user to the index action of the users controller).  If
they then login a second time, the redirect to the index action of the
users controller succeeds.  It's almost like the loginRedirect is
occurring pre-acl and the visitor is brought back to the login action
even though they are already authenticated and have access to the page
in question.

As mentioned, the ability to allow a user to shortcut directly to a
page inside their dashboard would be nice as well.  In that case it
would be beneficial to allow Auth/ACL to authenticate the user and
then send to the page they requested.

So the idea of handling the redirect myself in the login action didn't
feel like the right solution.  The "fix" of deleting the auth.redirect
session var in beforeFilter did the trick for me.  But I wonder why
Cake doesn't handle this situation "out of the box" as it seems like a
very common use of auth/acl.  From the perspective of one new to Cake
(but loving it) it feels "broken" when you go to a login page and
login with valid credentials but are told you're not authorized to
view that page and when you login a second time it works.  If this
isn't the perfect use for the loginRedirect value then I couldn't
imagine what would be.


On Oct 22, 8:44 am, Gwoo <[EMAIL PROTECTED]> wrote:
> I guess I am having a hard time understanding exactly what you expect
> to happen. Initially, I thought you wanted the login to always
> redirect to the same location. This would be solved with autoRedirect
> = false and handling it in the login action. Maybe you could provide a
> better example, with some actual urls? This might help me understand
> the problem a bit better.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Alphabetizing SQL Data

2008-10-22 Thread tapupartforpres

Great thanks.  Let me give that a try.  I appreciate your help.

On Oct 21, 7:22 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> > the best way to do this is via your sql code not your php code.
> > You'll probably need to add "ORDER BY `name`' to the end of the sql
> > statement or something similar.
>
> actually, you want to do teh compete opposite with cake! you want to
> use the order by argument in the find method, eg:
>
> $this->Model->find('all', array(
>         'order'=>'Model.name asc'
> ));
>
> for more info seehttp://book.cakephp.org/view/449/find
>
> hth
>
> jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: loginRedirect question re: Closed ticket @ Trac #5057

2008-10-22 Thread Jay Reeder
I wrote a lengthy reply earlier but I guess it wasn't delivered.

The simplest way to describe our application would be that of a web-based
CRM.  Most site pages will be user-specific and most users will access those
pages through a 'login' page that acts as gateway to the application and
redirects them to a specific location.  However, it would be nice to allow
users to bookmark internal pages and when they attempt to access those
directly, the auth/acl components will authorize through login and then
redirect to the originally requested page (isn't Cake great!).

I'll describe urls in terms of controllers and actions because that's how
we're writing the app (to take advantage of the Cake router's awesome
reverse mapping capabilities for url generation).

The Cake router is mapped so that '/' redirects to the Users controller
login action.  We're using both the Auth and ACL components per the 1.2
documentation example.  When a user requests the main page of the cake
application (as in http://www.mycakeapp.com/) they're redirected to the
Users controller login action where they can login to their dashboard.

The auth component has a value for loginRedirect that should redirect the
visitor to the index action of the Users controller if no other page was
requested (as is the case here).  When the user logs in with valid
credentials that are authorized to view the index action of the users
controller, they're returned to the login action with a flash message that
tells them they're not authorized to access that page.  If they login a
second time with the same credentials then they're redirected as originally
intended.

To someone new to Cake, it appears that this is broken when you go to a
login screen and login with valid credentials but are redirected back to the
same screen with a flash prompt that you're not authorized to view that page
and then when you login a second time you're redirected as originally
intended.  It's almost as if the auth login redirect is happening before the
ACL is provided the Auth info.  I don't think we experienced this issue
before we implemented ACL (but I'm not sure).

The suggested fix of deleting the session var for Auth.redirect in the
beforeFilter
works great for our application.

This login style is a fairly common practice for web apps that use Auth/Acl
and if this isn't the perfect case for using loginRedirect then I couldn't
imagine what would be.  This may be an oversimplification, but couldn't Cake
check to see if the originally requested URL is the same as the
Auth.redirect and if they match then delete the session var and don't bother
redirecting (to a page you're already on)?


On Wed, Oct 22, 2008 at 8:44 AM, Gwoo <[EMAIL PROTECTED]> wrote:

>
> I guess I am having a hard time understanding exactly what you expect
> to happen. Initially, I thought you wanted the login to always
> redirect to the same location. This would be solved with autoRedirect
> = false and handling it in the login action. Maybe you could provide a
> better example, with some actual urls? This might help me understand
> the problem a bit better.
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakeapp.com

2008-10-22 Thread Paul H

Super!
Option I'm missing: Download the ready baked sources.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP performance issue.

2008-10-22 Thread Luiz Poleto

I also run a few performance tests using jMeter and cake.
In my case, i was trying to check the faster database: MySQL or
PostgreSQL.
Unfortunately, i don't have the test results here with me, but as soon
as i get home, i'll post it here.

I just can say that, although i had a high CPU usage, the results were
quite fast.

Regards,
Luiz Poleto

On Oct 22, 10:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I've started stress testing application and have problems with
> performance.
> First, I thought it was because of problems in code, but after few
> tests I deceided remove all logic and test clear framework.
>
> Latest stable version (cake_1.1.20.7692) was downloaded and installed
> on 2 different servers.
> Jakarta JMeter was used as stress-testing utility.
> Number of threads: 100
> Ramp-Up period: 5 sec
>
> I tried to test 2 requests:
> 1) request main page of cake (CakePHP Rapid Development ...)
> 2) pages/test. I created simple view without any logic inside.
> Both results were the same and both are strange for me. I have had
> follow digits:
> average time 1000 ms (it's normal) and max. time up to 5 ms.
> I executed top at server and watched - processor was overloaded.
>
> top - 16:30:05 up  3:04,  2 users,  load average: 14.04, 5.06, 1.83
> Tasks: 156 total,  33 running, 123 sleeping,   0 stopped,   0 zombie
> Cpu(s): 81.1%us, 17.9%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.2%hi,
> 0.8%si,  0.0%st
> Mem:   2065068k total,   986420k used,  1078648k free,   131132k
> buffers
> Swap:  2031608k total,        0k used,  2031608k free,   404868k
> cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  5046 daemon    15   0 36488 7380 4288 R   19  0.4   0:04.43 httpd
>  5151 daemon    15   0 36428 7144 4100 S   16  0.3   0:03.78 httpd
>  5092 daemon    15   0 36488 7380 4288 R   14  0.4   0:04.47 httpd
>  5165 daemon    15   0 36428 7144 4100 R   12  0.3   0:00.74 httpd
>  5173 daemon    15   0 36428 7144 4100 R   11  0.3   0:00.83 httpd
>  5175 daemon    16   0 36428 7144 4100 R    9  0.3   0:00.53 httpd
>  5180 daemon    16   0 36428 6668 3628 R    9  0.3   0:00.27 httpd
>  5066 daemon    15   0 36744 7484 4392 D    8  0.4   0:05.27 httpd
>  5203 daemon    15   0 36684 6660 3620 D    8  0.3   0:00.24 httpd
>  5162 daemon    15   0 36428 7144 4100 D    8  0.3   0:01.29 httpd
>  5149 daemon    15   0 36428 7144 4100 D    7  0.3   0:03.12 httpd
>  5146 daemon    15   0 36428 7144 4100 D    6  0.3   0:02.92 httpd
>  5174 daemon    15   0 36684 6964 3928 D    6  0.3   0:00.20 httpd
>  5152 daemon    15   0 36428 7144 4100 R    5  0.3   0:01.71 httpd
>  5153 daemon    15   0 36428 7144 4100 D    5  0.3   0:03.01 httpd
>  5137 daemon    15   0 36428 7144 4100 D    5  0.3   0:04.13 httpd
>  5139 daemon    15   0 36428 7144 4100 R    4  0.3   0:03.09 httpd
>
> In really, there is often even 99% CPU used.
> I tried to run this test with native php-application and cpu usage was
> normal in this way, so I think the reason of this overload is cake.
> Have someone stres-tested cake-application? What is the reason of big
> cpu usage? What should I do to make it normal?
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursion

2008-10-22 Thread Luiz Poleto

I have the same issue:

You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'generatetreelist' at line 1

I changed the table to be compliant with the instructions in the
cookbook, and i'm getting this error now.
Any ideas?

Regards,
Luiz Poleto

On Oct 22, 7:09 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Is your table set up correctly (includes parent_id, lft, rght)?
> Post the error you're getting here, stabbing in the dark doesn't work  
> too well. ;o)
>
> Chrs,
> Dav
>
> On 22 Oct 2008, at 14:16, mirfan wrote:
>
>
>
> > Hello david,
> > The link you provide me nearly solved my problem thanks, but there is
> > a problem when i was trying it in a separate project it works as i
> > need but when i integrate it in my project it gives me an sql error i
> > don't know why is that problem coming please help me
>
> > On Oct 20, 7:31 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> >>http://book.cakephp.org/view/91/Tree
>
> >> On 19 Oct 2008, at 20:10,mirfanwrote:
>
> >>> Hi,
> >>> I have a problem with recursion. I have a table for keeping the
> >>> account information of all members in which each member has a parent
> >>> now i have to find out all of the members in the downline of a
> >>> specific one look at the following example.
> >>>                         Member1
> >>>                             |
> >>>            
> >>>           |                               |
> >>>   Member2                   Member3
> >>>         |                                 |
> >>>   Member4            ---
> >>>                            |                              |
> >>>                     Member5                 Member6
> >>> from member2 to member6 all are the downline of Member1 and member5
> >>> and 6 are downline of member3
> >>> please give a solution for this i am really tired and boared.
> >>> Regards,
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Write view output to file - best MVC approach?

2008-10-22 Thread djiize

1st idea : test it, you'll see if your server crash
2nd idea : maybe there is a way to override View (like an AppView for
instance)
I don't know of it's possible, but if I were you, I'll check towards
this way

On 22 oct, 17:08, "Liebermann, Anja Carolin"
<[EMAIL PROTECTED]> wrote:
> Hi djiize,
>
> Thanks for the hint. But my problem with the size of my view would still 
> remain.
>
> I guess in the end the view will contain several thousands (litearally) of 
> lines in xml and would cause a crash of either php / server / or browser. So 
> what I would like to do is write chunks of data from the view output into a 
> file while it is generated and not after I have a big servercrashing datablob.
> Any idea?
>
> Background information: I program a product information system and in the end 
> all gathered data should go to an xml-export file for e.g. a WCMS, catalogue 
> or a distributor.
>
> Greetings Anja
>
> -Ursprüngliche Nachricht-
> Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von djiize
> Gesendet: Mittwoch, 22. Oktober 2008 16:55
> An: CakePHP
> Betreff: Re: Write view output to file - best MVC approach?
>
> in Controller code, a call to $this->render() returns the content of the view 
> HTH
>
> On 22 oct, 15:49, "Liebermann, Anja Carolin"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi everybody,
>
> > I make good progress with my xml-export.
> > Since I expect the output to become very big, I would like to write
> > the resulting view rather to the harddisk to download later than show
> > it on the screen.
>
> > Now my questions:
> > In my controller I have an function which could write strings in a file.
> > But my strings are composed in my view!
>
> > What is the best approach to stay in the MVC world?
>
> > Call the write function form the view? Or transfer all foreach logic
> > to the controller? If I do the second what do I do with strings I have
> > put in elements?
>
> > If I want to avoid an overflow in my RAM do I have to flush something
> > in between?
>
> > Thank you for your opinion and any hints!
>
> > Anja
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakeapp.com

2008-10-22 Thread powtac

-Removed redundant row "updated"
-SQL Designer is now english by default
-Added download: http://cakeapp.com/ (also SQL dump of database will
come)
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHPShop v2 is a cake app!

2008-10-22 Thread keymaster

PHPshop is considered to be one of the more respected carts in
opensource. It has been around a long time. If I'm not mistaken, I
believe Joomla's Virtuemart was originally based on phpShop.

This has to be one of the bigger news items to hit the cake world
since the Mambo decision to build on top of cake.  (the Mambo
decision, btw, seems to have gone nowhere fast).

I think the community will look forward to keeping an eye on phpShop
as it develops.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to modify a field in afterFind()

2008-10-22 Thread [EMAIL PROTECTED]

Hi,
I thought I'd ask this here. (see why below)
How do I write afterFind() to modify a field.

For example just something simple like this (just an example):

function afterFind($data) {
foreach ($data as $key => $val) {
if ( isset($val[$this->alias]['name']) ) {
$data[$key][$this->alias]['name2'] = $val[$this->alias]
['name'];
}
}
debug($data);
return $data;
}


What I want to know is how to pick out the field from the passed data
array. There are so many different ways the data is formatted that I
end up with a quite messy series of for's and if's and I still don't
fell 100% sure I got them all. I feel there must be some sure-fire way
to write these.

The Cookbook is not complete compared to what I get.
http://book.cakephp.org/view/681/afterFind

The API does not mention much about this.

I did not find any test in the core that helped me.

I did not find anything on Google that dealt with anything but basic
"primary" data.

I noticed that sometimes afterFind() is called more than once with
different data-structure each time. I asked about that here:
http://groups.google.com/group/cake-php/browse_thread/thread/c83e5f40ac861caa/1d88bdb31fa3d12f

I'd love some clarification of this callback. Thans in advance.
/Martin
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone running on network solutions hosting? netsolhost

2008-10-22 Thread [EMAIL PROTECTED]

Yep.  With increasing specificity ...

In the top one RewriteBase / ... in /app RewriteBase /app and in
webroot RewriteBase /app/webroot

Also tried with adding trailing / in the later two with no effect
(positive or negative)

On Oct 22, 9:59 am, Penfold <[EMAIL PROTECTED]> wrote:
> hi,
>
> have to applied the rewritebase to all the .htaccess files as there
> are 3?
>
> On 22 Oct, 15:24, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Thanks.   Adding RewriteBase to the .htaccess files at least let's the
> > framework load and run ...
>
> > Causes a different issue ... again, only on the deployment/production
> > box, not on dev --
>
> > I've rewritten the / route to an under construction page which works
> > fine as I haven't used any helpers in it, but when I nav to sitename/
> > pages/home to see the setup page and check that everything is usable,
> > it comes up unstyled -- when I do a view source, the helpers appear to
> > be including the controller name in the path to the css ...
>
> > link rel="stylesheet" type="text/css" href="/pages/css/
> > cake.generic.css"
>
> > thoughts?
>
> > Again, this is latest Beta, not the RC from this morning.
>
> > Hank
>
> > On Oct 22, 6:36 am, Penfold <[EMAIL PROTECTED]> wrote:
>
> > > its proabely and issue with .htaccess add BaseRewrite / to it.
>
> > > Check out bakery for 1 and 1, this is normally a common issue with
> > > hosting providers
>
> > > On 21 Oct, 17:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > Have a client that bought hosting before contacting me ... he's on
> > > > network solutions with php running under fastcgi.
>
> > > > I have simple 1 page php stuff including a phpinfo page running, but
> > > > when I copy up a cake project and install the .htaccess file all I get
> > > > are 500 Errors.
>
> > > > I have the app running locally for dev under mod_php5 apache2 just
> > > > fine, so it's the deployment.
>
> > > > Running the current beta3 if that matters.
>
> > > > Thanks,
>
> > > > Hank
>
> > > > ... I did a number of searches, both here, google and elsewhere before
> > > > posting, but if I missed something obvious, a gentle pointer would be
> > > > appreciated.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AW: Write view output to file - best MVC approach?

2008-10-22 Thread Liebermann, Anja Carolin

Hi djiize,

Thanks for the hint. But my problem with the size of my view would still remain.

I guess in the end the view will contain several thousands (litearally) of 
lines in xml and would cause a crash of either php / server / or browser. So 
what I would like to do is write chunks of data from the view output into a 
file while it is generated and not after I have a big servercrashing datablob.
Any idea?

Background information: I program a product information system and in the end 
all gathered data should go to an xml-export file for e.g. a WCMS, catalogue or 
a distributor. 

Greetings Anja 

-Ursprüngliche Nachricht-
Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von djiize
Gesendet: Mittwoch, 22. Oktober 2008 16:55
An: CakePHP
Betreff: Re: Write view output to file - best MVC approach?


in Controller code, a call to $this->render() returns the content of the view 
HTH

On 22 oct, 15:49, "Liebermann, Anja Carolin"
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I make good progress with my xml-export.
> Since I expect the output to become very big, I would like to write 
> the resulting view rather to the harddisk to download later than show 
> it on the screen.
>
> Now my questions:
> In my controller I have an function which could write strings in a file.
> But my strings are composed in my view!
>
> What is the best approach to stay in the MVC world?
>
> Call the write function form the view? Or transfer all foreach logic 
> to the controller? If I do the second what do I do with strings I have 
> put in elements?
>
> If I want to avoid an overflow in my RAM do I have to flush something 
> in between?
>
> Thank you for your opinion and any hints!
>
> Anja


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone running on network solutions hosting? netsolhost

2008-10-22 Thread Penfold

hi,

have to applied the rewritebase to all the .htaccess files as there
are 3?

On 22 Oct, 15:24, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Thanks.   Adding RewriteBase to the .htaccess files at least let's the
> framework load and run ...
>
> Causes a different issue ... again, only on the deployment/production
> box, not on dev --
>
> I've rewritten the / route to an under construction page which works
> fine as I haven't used any helpers in it, but when I nav to sitename/
> pages/home to see the setup page and check that everything is usable,
> it comes up unstyled -- when I do a view source, the helpers appear to
> be including the controller name in the path to the css ...
>
> link rel="stylesheet" type="text/css" href="/pages/css/
> cake.generic.css"
>
> thoughts?
>
> Again, this is latest Beta, not the RC from this morning.
>
> Hank
>
> On Oct 22, 6:36 am, Penfold <[EMAIL PROTECTED]> wrote:
>
> > its proabely and issue with .htaccess add BaseRewrite / to it.
>
> > Check out bakery for 1 and 1, this is normally a common issue with
> > hosting providers
>
> > On 21 Oct, 17:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > Have a client that bought hosting before contacting me ... he's on
> > > network solutions with php running under fastcgi.
>
> > > I have simple 1 page php stuff including a phpinfo page running, but
> > > when I copy up a cake project and install the .htaccess file all I get
> > > are 500 Errors.
>
> > > I have the app running locally for dev under mod_php5 apache2 just
> > > fine, so it's the deployment.
>
> > > Running the current beta3 if that matters.
>
> > > Thanks,
>
> > > Hank
>
> > > ... I did a number of searches, both here, google and elsewhere before
> > > posting, but if I missed something obvious, a gentle pointer would be
> > > appreciated.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Write view output to file - best MVC approach?

2008-10-22 Thread djiize

in Controller code, a call to $this->render() returns the content of
the view
HTH

On 22 oct, 15:49, "Liebermann, Anja Carolin"
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I make good progress with my xml-export.
> Since I expect the output to become very big, I would like to write the
> resulting view rather to the harddisk to download later than show it on
> the screen.
>
> Now my questions:
> In my controller I have an function which could write strings in a file.
> But my strings are composed in my view!
>
> What is the best approach to stay in the MVC world?
>
> Call the write function form the view? Or transfer all foreach logic to
> the controller? If I do the second what do I do with strings I have put
> in elements?
>
> If I want to avoid an overflow in my RAM do I have to flush something in
> between?
>
> Thank you for your opinion and any hints!
>
> Anja
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone running on network solutions hosting? netsolhost

2008-10-22 Thread [EMAIL PROTECTED]

Thanks.   Adding RewriteBase to the .htaccess files at least let's the
framework load and run ...

Causes a different issue ... again, only on the deployment/production
box, not on dev --

I've rewritten the / route to an under construction page which works
fine as I haven't used any helpers in it, but when I nav to sitename/
pages/home to see the setup page and check that everything is usable,
it comes up unstyled -- when I do a view source, the helpers appear to
be including the controller name in the path to the css ...

link rel="stylesheet" type="text/css" href="/pages/css/
cake.generic.css"

thoughts?

Again, this is latest Beta, not the RC from this morning.

Hank

On Oct 22, 6:36 am, Penfold <[EMAIL PROTECTED]> wrote:
> its proabely and issue with .htaccess add BaseRewrite / to it.
>
> Check out bakery for 1 and 1, this is normally a common issue with
> hosting providers
>
> On 21 Oct, 17:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Have a client that bought hosting before contacting me ... he's on
> > network solutions with php running under fastcgi.
>
> > I have simple 1 page php stuff including a phpinfo page running, but
> > when I copy up a cake project and install the .htaccess file all I get
> > are 500 Errors.
>
> > I have the app running locally for dev under mod_php5 apache2 just
> > fine, so it's the deployment.
>
> > Running the current beta3 if that matters.
>
> > Thanks,
>
> > Hank
>
> > ... I did a number of searches, both here, google and elsewhere before
> > posting, but if I missed something obvious, a gentle pointer would be
> > appreciated.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Write view output to file - best MVC approach?

2008-10-22 Thread Liebermann, Anja Carolin

Hi everybody,

I make good progress with my xml-export.
Since I expect the output to become very big, I would like to write the
resulting view rather to the harddisk to download later than show it on
the screen. 

Now my questions:
In my controller I have an function which could write strings in a file.
But my strings are composed in my view! 

What is the best approach to stay in the MVC world?

Call the write function form the view? Or transfer all foreach logic to
the controller? If I do the second what do I do with strings I have put
in elements?

If I want to avoid an overflow in my RAM do I have to flush something in
between?

Thank you for your opinion and any hints!

Anja

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHPShop v2 is a cake app!

2008-10-22 Thread acoustic_overdrive

Hi Pablo,

Nice to hear from you. I might be able to contribute a gift voucher
and promotional code module for instance in a few months as this is
something I need soon, and perhaps much more.

Have you thought about the pros and cons of writing this whole thing
as a plugin rather than an application? It might make it easier for
people to incorporate it in existing Cake-based sites, though I
understand you audience is much wider than just cake users.

Jamie





On Oct 22, 1:01 pm, Pablo <[EMAIL PROTECTED]> wrote:
> Hi all, I am pablo from phpshop.org.  Just to clarify, YES, phpshop
> 2.0 is based on the CakePHP 1.2 branch.
>
> We have been working on the code quite a bit and as you can see if you
> install from SVN, we are pretty close to getting to the point a
> releasable product.  While there are many items that still need to be
> worked on, the main things that are missing in my mind are the store's
> checkout authentication (login/register) and the payment processing
> part (currently has code for paypal plugin, but we'd like to work on
> other plugins for other processors).  What's there for the entire
> checkout process works now, kind of sort of, but needs major testing.
> Assuming these two items get done, we'd have a cart that could be
> deployed.  Of course, there are a whole series of things that could
> also be worked on before we'd call this "ready for production"; if
> you'd like to contribute, please get in touch.  Having other bakers
> help would be great!
>
> If the site is looks bad, it would be great if you could send a screen
> shot so I can see what the problem is.
>
> Thanks,
> Pablo
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP performance issue.

2008-10-22 Thread [EMAIL PROTECTED]

I've started stress testing application and have problems with
performance.
First, I thought it was because of problems in code, but after few
tests I deceided remove all logic and test clear framework.

Latest stable version (cake_1.1.20.7692) was downloaded and installed
on 2 different servers.
Jakarta JMeter was used as stress-testing utility.
Number of threads: 100
Ramp-Up period: 5 sec

I tried to test 2 requests:
1) request main page of cake (CakePHP Rapid Development ...)
2) pages/test. I created simple view without any logic inside.
Both results were the same and both are strange for me. I have had
follow digits:
average time 1000 ms (it's normal) and max. time up to 5 ms.
I executed top at server and watched - processor was overloaded.

top - 16:30:05 up  3:04,  2 users,  load average: 14.04, 5.06, 1.83
Tasks: 156 total,  33 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s): 81.1%us, 17.9%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.2%hi,
0.8%si,  0.0%st
Mem:   2065068k total,   986420k used,  1078648k free,   131132k
buffers
Swap:  2031608k total,0k used,  2031608k free,   404868k
cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 5046 daemon15   0 36488 7380 4288 R   19  0.4   0:04.43 httpd
 5151 daemon15   0 36428 7144 4100 S   16  0.3   0:03.78 httpd
 5092 daemon15   0 36488 7380 4288 R   14  0.4   0:04.47 httpd
 5165 daemon15   0 36428 7144 4100 R   12  0.3   0:00.74 httpd
 5173 daemon15   0 36428 7144 4100 R   11  0.3   0:00.83 httpd
 5175 daemon16   0 36428 7144 4100 R9  0.3   0:00.53 httpd
 5180 daemon16   0 36428 6668 3628 R9  0.3   0:00.27 httpd
 5066 daemon15   0 36744 7484 4392 D8  0.4   0:05.27 httpd
 5203 daemon15   0 36684 6660 3620 D8  0.3   0:00.24 httpd
 5162 daemon15   0 36428 7144 4100 D8  0.3   0:01.29 httpd
 5149 daemon15   0 36428 7144 4100 D7  0.3   0:03.12 httpd
 5146 daemon15   0 36428 7144 4100 D6  0.3   0:02.92 httpd
 5174 daemon15   0 36684 6964 3928 D6  0.3   0:00.20 httpd
 5152 daemon15   0 36428 7144 4100 R5  0.3   0:01.71 httpd
 5153 daemon15   0 36428 7144 4100 D5  0.3   0:03.01 httpd
 5137 daemon15   0 36428 7144 4100 D5  0.3   0:04.13 httpd
 5139 daemon15   0 36428 7144 4100 R4  0.3   0:03.09 httpd

In really, there is often even 99% CPU used.
I tried to run this test with native php-application and cpu usage was
normal in this way, so I think the reason of this overload is cake.
Have someone stres-tested cake-application? What is the reason of big
cpu usage? What should I do to make it normal?

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: loginRedirect question re: Closed ticket @ Trac #5057

2008-10-22 Thread Gwoo

I guess I am having a hard time understanding exactly what you expect
to happen. Initially, I thought you wanted the login to always
redirect to the same location. This would be solved with autoRedirect
= false and handling it in the login action. Maybe you could provide a
better example, with some actual urls? This might help me understand
the problem a bit better.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHPShop v2 is a cake app!

2008-10-22 Thread Mathew

Hi Pablo,

http://fxwars.mathew3d.com/images/webpage.jpg

That's how the page renders for me. You can see the smaller text on
the side menu, and footers is hard to read. The rest is kind of
blocky.

I'm using Firefox 3.0.3 on Windows XP.

When I render the page using IE 7.0, and Safari 3.1.2 it looks fine.
Maybe the font your using doesn't come with Firefox.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



controller fixturize drops table in end, how to test data?

2008-10-22 Thread Defranco

Hi,

Regarding controller testing using Test Suite on 1.2.RC3:

How do I test resulting data after I run testAction and
fixturize=true? The problem is that all all tables are dropped after
testAction routine.

For example if I run a simple testAction:

$this->testAction(  "/mycontroller/index",
array(  'fixturize' => true));


fixturize=true will make it to create all tables before running
index(), but it will drop all tables after testAction... how do I test
resulting data if the tables are all dropped?

Is possible to make testAction to fixturize data but do not drop it so
I can test resulting data saved on tables?

kind regards


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: loginRedirect question re: Closed ticket @ Trac #5057

2008-10-22 Thread escape

Thanks!  I did read thoroughly (I thought) :).

But if you disable autoRedirect then you lose the nifty feature to
auto redirect back to where you were originally going - if someone
where to try and directly access a page under auth/acl protection (the
opposite of our main goal but you never know what users will want).
Again, I'm new to Cake, but I'm sure that I could figure out where
cake stores that originally requested URL and handle that redirect
myself too - but why go to all the trouble to do something that Cake
will do automatically?  (BTW, as mentioned - my problem was fixed by
dropping the session value in beforeFilter)

It seems pretty simple that if the loginRedirect value == the url
you're trying to access then in that one case there's not a need to
auto-redirect. :)  Why not have cake automatically drop that session
value (auth.redirect) if you're already there?

Our app works and I don't have an ax to grind.  I'm just trying to
help out.


On Oct 22, 3:48 am, Gwoo <[EMAIL PROTECTED]> wrote:
> reading the comment on the ticket thoroughly would provide the
> solution"You can set autoRedirect = false, then handle the
> redirect in the login action"

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Accessing form field results in undefined index error

2008-10-22 Thread nanomag

If you use a field called password, I'm not sure but I think that Cake
automatically hash it. you have to compare $this->auth->password($this-
>data['User']['confirm_password']) to $this->data['User']
['password'];

see http://book.cakephp.org/view/565/Troubleshooting-Auth-Problems

On Oct 21, 3:45 pm, Valheru <[EMAIL PROTECTED]> wrote:
> I am trying to compare to (password) fields in a form, using CakePHP
> 1.2. Calling a method "confirmpassword" in the controller results in a
> Javascript error:
>
> Notice (8): Undefined index:  confirm_password [APP\controllers
> \users_controller.php, line 60]
>
> $this->autoRender=false;
>
> $password = $this->data['User']['password'];
>
> $confirmpassword = $this->data['User']['confirm_password'];
>
> UsersController::checkpassword() - APP\controllers
> \users_controller.php, line 60
> Object::dispatchMethod() - CORE\cake\libs\object.php, line 114
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
> [main] - APP\webroot\index.php, line 9
>
> The code is as follows:
>
> function checkpassword() {
>                         $this->autoRender=false;
>                         $password = $this->data['User']['password'];
>                         $confirmpassword = 
> $this->data['User']['confirm_password'];
>
>                         if (!empty($password))
>                         {
>
>                                 if (!$this->User->validates($field = 
> array($password)))
>                                 {
>                                         echo "Invalid 
> password";
>                                 }
>                                 else
>                                 {
>                                         if ($password !== $confirmpassword)
>                                         {
>                                                 echo " class=\"error\">Passwords must match";
>                                         }
>                                         else
>                                         {
>                                                 echo " class=\"success\">Passwords match";
>                                         }
>                                 }
>                         }
>         }
>
> As you can see the two fields in the form are calls "password" and
> "confirm_password". The password field is being found fine, but
> confirm_password isn't. "password" is a field in the "users" table of
> my database, "while "confirm_password" isn't - is this maybe causing
> the problem?  And how can I solve this? Thanks in advance.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File Uploading problem

2008-10-22 Thread Da-Omiete Iboroma

Can I change anything in phpmyadmin so that I can upload larger files?
because my database can not upload any file that is more than 999kb.

Thanks

Damelinks

On 10/21/08, Donkeybob <[EMAIL PROTECTED]> wrote:
>
> I've gotten this to work. haha . . .it was a php.ini setting of the
> file upload variables that was uploaded to the wrong place and also a
> x-m4a media type validation. . . .thanks for everybody's help.
>
> On Oct 21, 11:37 am, [EMAIL PROTECTED] wrote:
>> If you are using iis in windows server 2003, the default upload size is
>> 200kb.
>> This can be changed in IIS and also edit the metabase.xml file.
>>
>> Sent from my Verizon Wireless BlackBerry
>>
>> -Original Message-
>> From: LunarDraco <[EMAIL PROTECTED]>
>>
>> Date: Tue, 21 Oct 2008 08:29:15
>> To: CakePHP
>> Subject: Re: File Uploading problem
>>
>> The file size for most http post is limited by the server and php to
>> something less than 2048. Which limits your capabilities of the size
>> of file you can upload.
>> In order to upload files larger than this limit you would need to
>> chunk the file and then reassemble the file on the server.
>>
>> This usually requires some kind of client side java applet, that can
>> break the file into pieces and send the pieces as individual posts.
>> An example of this ishttp://www.jumploader.com/, there are many more
>> paid and free large file upload applets, and flash components.
>>
>> I choose jumploader for my project because it runs on all three
>> platforms that I intend to support. And if I really don't like
>> something I have the option of buying the source.
>>
>> Do some searching for large file upload applet you'll find what you
>> need to get past your current problem.
>>
>> On Oct 20, 2:21 pm, Donkeybob <[EMAIL PROTECTED]> wrote:
>> > The file size is 7 mb
>>
>> > my php.ini settings:
>> > max_execution_time = 30
>> > max_input_time = 60
>> > memory_limit = 32M
>> > post_max_size = 75M
>> > upload_max_filesize = 50M
>>
>> > I post it to the database too. The area where it errors, is when it
>> > saves the data because $this->data does not have filename, mediatype
>> > and size included.
>>
>> > On Oct 20, 3:35 pm, Julien Buratto <[EMAIL PROTECTED]> wrote:
>>
>> > > Donkeybob wrote:
>> > > > I'm using this: $form->file('filename') in my file upload utilty.
>> > > > Some
>> > > > certain files will upload and save the data, but some files types
>> > > > don't. . . . . .ex. podcast.m4a.
>>
>> > > > When i submit the form . . .this->data only posts:
>> > > > Array
>> > > > (
>> > > > [Fileupload] => Array
>> > > > (
>> > > > [name] => Podcast name
>> > > > [type] => Podcast
>> > > > [filename] =>
>> > > > [mediatype] =>
>> > > > [size] => 0
>> > > > [path] =>
>> > > > )
>>
>> > > > )
>>
>> > > > Why would it not read the file details? I can upload other files . .
>> > > > .
>>
>> > > > thanks
>> > > > Rich
>>
>> > > Size? did you check the php.ini file ? are you writing to db ? if so,
>> > > which is the max query size you are allowed to execute ?
>>
>> > > J
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File Download Problem

2008-10-22 Thread Da-Omiete Iboroma

Thanks but I  am using just that.  But it cannot upload any file that
is more than 999kb.

Is there any configuration that I will do to phpmyadmin so that it can
upload files that are more than 999kb?

Thanks

On 10/21/08, Thanga Durai <[EMAIL PROTECTED]> wrote:
> If you are using blob data type make it as longblob.
>
> Thangadurai.
>
> On Tue, Oct 21, 2008 at 4:57 PM, AD7six <[EMAIL PROTECTED]> wrote:
>
>>
>>
>>
>> On Oct 20, 3:41 pm, "Da-Omiete Iboroma" <[EMAIL PROTECTED]> wrote:
>> > Please I am having problem downloading pdf (Acrobat reader) files that
>> > I uploaded in mysql database.
>> >
>> > The file downloads but it does not embed the pdf file in the browser.
>> >
>> > Instead, it opens the pdf file and make the current page blank
>> >
>> > Below is the file download code.  Pls help me
>> >
>> > > >  $db_name = "database_name";
>> > $table_name = "books_table";
>> > $connection = mysql_connect("localhost", "username", "password") or
>> > die("couldn't connect.");
>>
>> As this has nothing to do with using CakePHP, thread closed.
>>
>> Cheers,
>>
>> AD
>> >
>>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHPShop v2 is a cake app!

2008-10-22 Thread Pablo

Hi all, I am pablo from phpshop.org.  Just to clarify, YES, phpshop
2.0 is based on the CakePHP 1.2 branch.

We have been working on the code quite a bit and as you can see if you
install from SVN, we are pretty close to getting to the point a
releasable product.  While there are many items that still need to be
worked on, the main things that are missing in my mind are the store's
checkout authentication (login/register) and the payment processing
part (currently has code for paypal plugin, but we'd like to work on
other plugins for other processors).  What's there for the entire
checkout process works now, kind of sort of, but needs major testing.
Assuming these two items get done, we'd have a cart that could be
deployed.  Of course, there are a whole series of things that could
also be worked on before we'd call this "ready for production"; if
you'd like to contribute, please get in touch.  Having other bakers
help would be great!

If the site is looks bad, it would be great if you could send a screen
shot so I can see what the problem is.

Thanks,
Pablo

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



can we write arabic using TCPDF...

2008-10-22 Thread xelios

Hi,

using TCPDF can we write arabic in pdf...
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Anyone running on network solutions hosting? netsolhost

2008-10-22 Thread Penfold

its proabely and issue with .htaccess add BaseRewrite / to it.

Check out bakery for 1 and 1, this is normally a common issue with
hosting providers

On 21 Oct, 17:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Have a client that bought hosting before contacting me ... he's on
> network solutions with php running under fastcgi.
>
> I have simple 1 page php stuff including a phpinfo page running, but
> when I copy up a cake project and install the .htaccess file all I get
> are 500 Errors.
>
> I have the app running locally for dev under mod_php5 apache2 just
> fine, so it's the deployment.
>
> Running the current beta3 if that matters.
>
> Thanks,
>
> Hank
>
> ... I did a number of searches, both here, google and elsewhere before
> posting, but if I missed something obvious, a gentle pointer would be
> appreciated.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread Adam Royle

The query executed is there... it just doesn't look like a regular
query.

Query: addStar

I'm guessing you've got a $this->Book->addStar() call but haven't
defined the addStar()  method??

This happens because cakephp automatically executes a query by the
same name of the method, assuming it's a stored procedure. Can be very
confusing if you don't know this already.

Cheers,
Adam


On Oct 22, 8:51 pm, xelios <[EMAIL PROTECTED]> wrote:
> Following is the out put of my error:
> /
> */
> Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'addStar' at line 1 [CORE\cake\libs\model
> \datasources\dbo_source.php, line 521]
>
> Code | Context
>
> $sql    =       "addStar"
> $error  =       "1064: You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near 'addStar' at line 1"
> $out    =       null
>
>             $out = null;
>             if ($error) {
>                 trigger_error(" align:left\">SQL Error: {$this->error}",
> E_USER_WARNING);
>
> DboSource::showQuery() - CORE\cake\libs\model\datasources
> \dbo_source.php, line 521
> DboSource::execute() - CORE\cake\libs\model\datasources
> \dbo_source.php, line 208
> DboSource::fetchAll() - CORE\cake\libs\model\datasources
> \dbo_source.php, line 344
> DboSource::query() - CORE\cake\libs\model\datasources\dbo_source.php,
> line 305
> Model::call__() - CORE\cake\libs\model\model.php, line 404
> Overloadable::__call() - CORE\cake\libs\overloadable_php5.php, line 59
> AppModel::addStar() - [internal], line ??
> BooksController::star() - APP\controllers\books_controller.php, line
> 65
> Object::dispatchMethod() - CORE\cake\libs\object.php, line 116
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
> [main] - APP\webroot\index.php, line 90
>
> Query: addStar
>
> Warning (2): Cannot modify header information - headers already sent
> by (output started at C:\xampp\htdocs\cake12\CakePHP\cake\basics.php:
> 111) [CORE\cake\libs\controller\controller.php, line 587]
>
> Code | Context
>
> $status =       "Location:http://localhost/cake12/CakePHP/books";
>
> header - [internal], line ??
> Controller::header() - CORE\cake\libs\controller\controller.php, line
> 587
> Controller::redirect() - CORE\cake\libs\controller\controller.php,
> line 568
> BooksController::star() - APP\controllers\books_controller.php, line
> 68
> Object::dispatchMethod() - CORE\cake\libs\object.php, line 116
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
> [main] - APP\webroot\index.php, line 90
>
> (default) 1 query took 0 ms Nr  Query   Error   Affected        Num. rows     
>   Took
> (ms)
> 1       addStar 1064: You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near 'addStar' at line 1                    0
>
> /
> */
>
> BUT I WANT TO SEE ACTUAL QUERY EXECUTED.
>
> On Oct 22, 3:47 pm, phpcurious <[EMAIL PROTECTED]> wrote:
>
> > if you don't see any debug dump, that could have been due to your
> > $cakeDebug is either empty or not in default.ctp layout
>
> > On Oct 22, 6:38 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > > My debug line is as follows:
> > > Configure::write('debug', 2);
>
> > > but still its not showing queries
>
> > > On Oct 22, 3:24 pm, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > app/config/core.php - the first line of code.
>
> > > > ---
> > > > /**
> > > >  * CakePHP Debug Level:
> > > >  *
> > > >  * Production Mode:
> > > >  *      0: No error messages, errors, or warnings shown. Flash messages
> > > > redirect.
> > > >  *
> > > >  * Development Mode:
> > > >  *      1: Errors and warnings shown, model caches refreshed, flash
> > > > messages halted.
> > > >  *      2: As in 1, but also with full debug messages and SQL output.
> > > >  *      3: As in 2, but also with full controller dump.
> > > >  *
> > > >  * In production mode, flash messages redirect after a time interval.
> > > >  * In development mode, you need to click the flash message to
> > > > continue.
> > > >  */
> > > > ---
>
> > > > On Oct 22, 12:20 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > > > > I've an error in my sql query. How can I print query for debugging
> > > > > purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co

Re: How to print query...

2008-10-22 Thread Gonzalo Servat
On Wed, Oct 22, 2008 at 8:51 AM, xelios <[EMAIL PROTECTED]> wrote:

>
> Following is the out put of my error:
> /
>
> */
> Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'addStar' at line 1 [CORE\cake\libs\model
> \datasources\dbo_source.php, line 521]
>
> Code | Context
>
> $sql=   "addStar"
> $error  =   "1064: You have an error in your SQL syntax; check the
> manual
> that corresponds to your MySQL server version for the right syntax to
> use near 'addStar' at line 1"
> $out=   null
>
[..snip..]

>From reading the log, it looks like the query executed is just 'addStar' ??

- Gonzalo

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread xelios

Following is the out put of my error:
/
*/
Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'addStar' at line 1 [CORE\cake\libs\model
\datasources\dbo_source.php, line 521]

Code | Context

$sql=   "addStar"
$error  =   "1064: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'addStar' at line 1"
$out=   null

$out = null;
if ($error) {
trigger_error("SQL Error: {$this->error}",
E_USER_WARNING);

DboSource::showQuery() - CORE\cake\libs\model\datasources
\dbo_source.php, line 521
DboSource::execute() - CORE\cake\libs\model\datasources
\dbo_source.php, line 208
DboSource::fetchAll() - CORE\cake\libs\model\datasources
\dbo_source.php, line 344
DboSource::query() - CORE\cake\libs\model\datasources\dbo_source.php,
line 305
Model::call__() - CORE\cake\libs\model\model.php, line 404
Overloadable::__call() - CORE\cake\libs\overloadable_php5.php, line 59
AppModel::addStar() - [internal], line ??
BooksController::star() - APP\controllers\books_controller.php, line
65
Object::dispatchMethod() - CORE\cake\libs\object.php, line 116
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
[main] - APP\webroot\index.php, line 90

Query: addStar

Warning (2): Cannot modify header information - headers already sent
by (output started at C:\xampp\htdocs\cake12\CakePHP\cake\basics.php:
111) [CORE\cake\libs\controller\controller.php, line 587]

Code | Context

$status =   "Location: http://localhost/cake12/CakePHP/books";

header - [internal], line ??
Controller::header() - CORE\cake\libs\controller\controller.php, line
587
Controller::redirect() - CORE\cake\libs\controller\controller.php,
line 568
BooksController::star() - APP\controllers\books_controller.php, line
68
Object::dispatchMethod() - CORE\cake\libs\object.php, line 116
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
[main] - APP\webroot\index.php, line 90

(default) 1 query took 0 ms Nr  Query   Error   AffectedNum. rows   
Took
(ms)
1   addStar 1064: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'addStar' at line 10

/
*/


BUT I WANT TO SEE ACTUAL QUERY EXECUTED.






On Oct 22, 3:47 pm, phpcurious <[EMAIL PROTECTED]> wrote:
> if you don't see any debug dump, that could have been due to your
> $cakeDebug is either empty or not in default.ctp layout
>
> On Oct 22, 6:38 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > My debug line is as follows:
> > Configure::write('debug', 2);
>
> > but still its not showing queries
>
> > On Oct 22, 3:24 pm, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > app/config/core.php - the first line of code.
>
> > > ---
> > > /**
> > >  * CakePHP Debug Level:
> > >  *
> > >  * Production Mode:
> > >  *      0: No error messages, errors, or warnings shown. Flash messages
> > > redirect.
> > >  *
> > >  * Development Mode:
> > >  *      1: Errors and warnings shown, model caches refreshed, flash
> > > messages halted.
> > >  *      2: As in 1, but also with full debug messages and SQL output.
> > >  *      3: As in 2, but also with full controller dump.
> > >  *
> > >  * In production mode, flash messages redirect after a time interval.
> > >  * In development mode, you need to click the flash message to
> > > continue.
> > >  */
> > > ---
>
> > > On Oct 22, 12:20 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > > > I've an error in my sql query. How can I print query for debugging
> > > > purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread phpcurious

if you don't see any debug dump, that could have been due to your
$cakeDebug is either empty or not in default.ctp layout

On Oct 22, 6:38 pm, xelios <[EMAIL PROTECTED]> wrote:
> My debug line is as follows:
> Configure::write('debug', 2);
>
> but still its not showing queries
>
> On Oct 22, 3:24 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > app/config/core.php - the first line of code.
>
> > ---
> > /**
> >  * CakePHP Debug Level:
> >  *
> >  * Production Mode:
> >  *      0: No error messages, errors, or warnings shown. Flash messages
> > redirect.
> >  *
> >  * Development Mode:
> >  *      1: Errors and warnings shown, model caches refreshed, flash
> > messages halted.
> >  *      2: As in 1, but also with full debug messages and SQL output.
> >  *      3: As in 2, but also with full controller dump.
> >  *
> >  * In production mode, flash messages redirect after a time interval.
> >  * In development mode, you need to click the flash message to
> > continue.
> >  */
> > ---
>
> > On Oct 22, 12:20 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > > I've an error in my sql query. How can I print query for debugging
> > > purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread xelios

My debug line is as follows:
Configure::write('debug', 2);

but still its not showing queries


On Oct 22, 3:24 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> app/config/core.php - the first line of code.
>
> ---
> /**
>  * CakePHP Debug Level:
>  *
>  * Production Mode:
>  *      0: No error messages, errors, or warnings shown. Flash messages
> redirect.
>  *
>  * Development Mode:
>  *      1: Errors and warnings shown, model caches refreshed, flash
> messages halted.
>  *      2: As in 1, but also with full debug messages and SQL output.
>  *      3: As in 2, but also with full controller dump.
>  *
>  * In production mode, flash messages redirect after a time interval.
>  * In development mode, you need to click the flash message to
> continue.
>  */
> ---
>
> On Oct 22, 12:20 pm, xelios <[EMAIL PROTECTED]> wrote:
>
> > I've an error in my sql query. How can I print query for debugging
> > purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread [EMAIL PROTECTED]

app/config/core.php - the first line of code.

---
/**
 * CakePHP Debug Level:
 *
 * Production Mode:
 *  0: No error messages, errors, or warnings shown. Flash messages
redirect.
 *
 * Development Mode:
 *  1: Errors and warnings shown, model caches refreshed, flash
messages halted.
 *  2: As in 1, but also with full debug messages and SQL output.
 *  3: As in 2, but also with full controller dump.
 *
 * In production mode, flash messages redirect after a time interval.
 * In development mode, you need to click the flash message to
continue.
 */
---


On Oct 22, 12:20 pm, xelios <[EMAIL PROTECTED]> wrote:
> I've an error in my sql query. How can I print query for debugging
> purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to print query...

2008-10-22 Thread Amit Badkas
2008/10/22 xelios <[EMAIL PROTECTED]>

>
> I've an error in my sql query. How can I print query for debugging
> purposes.
>

- If the debug setting is greater than 1 then SQL queries will get outputted
at the bottom of page

-- 
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL on cakephp 1.2

2008-10-22 Thread Jon Bennett

> I haven't worked my way thorugh this tutorial though so maybe this will be 
> more enlighteing than the others:
> http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1

I struggled for ages, but then a decent article was added to the
bakery - am using that in my apps now and it's fine.

http://book.cakephp.org/view/641/Simple-Acl-controlled-Application

cheers,

Jon


-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to print query...

2008-10-22 Thread xelios

I've an error in my sql query. How can I print query for debugging
purposes.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AW: ACL on cakephp 1.2

2008-10-22 Thread Liebermann, Anja Carolin

Same for me.

I tried to find my way through this (I have a quite complex application) when I 
stared with my current project, but gave up after 3 days and delayed ACL for 
version 1.2 : Hopefully then things will look a bit easier because by now I am 
more acquainted with cake syntax.

I haven't worked my way thorugh this tutorial though so maybe this will be more 
enlighteing than the others:
http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1

Anja

-Ursprüngliche Nachricht-
Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von [EMAIL 
PROTECTED]
Gesendet: Mittwoch, 22. Oktober 2008 09:28
An: CakePHP
Betreff: ACL on cakephp 1.2


dear bakers

i hope to find a will done document about ACL in cake version 1.2 because i 
need to use it and i cant understand how it is works .

so please if any one have a good tutorial or example or any link that i can use

and thanks in advance



--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help with ACL

2008-10-22 Thread Penfold

HI,

In your example there are users with multiple groups. this tutorial
will help you.

http://www.cakephpforum.net/index.php?s=5b11d7970e067edd8521121a5b0593e9&showtopic=745


On 21 Oct, 06:06, jst4fun <[EMAIL PROTECTED]> wrote:
> Hi All,
> I have been trying to create an application using cakephp ACL and have
> been pulling out my hairs for past few days. I was not able to get
> much help from the IRC so my last hope is with this group.Those
> reading this might feel stupid, but I am beginner so please bear with
> me.  I followed the tutorial 
> athttp://book.cakephp.org/view/641/Simple-Acl-controlled-Application
> and I felt it was a good starting point. But my issue is that, in that
> tutorial group structure created is of the following format
> Administrator
>   - User1
> Employee
>   - User2
>   - User3
> Editor
>   - User2
>   - User4
> In my situation there needs to be another top level group as follows
> Office1
>    - Administrator
>        - User1
>    - Employee
>       - User2
>       - User3
>    - Editor
>       - User2
>       - User4
> Office2
>    - Administrator
>        - User5
>    - Accountant
>       - Use5
>       - User2
>    - HR
>       - User2
>       - User4
> The above structure means there will be a parent group for a group.
> What change should be made to the code 
> inhttp://book.cakephp.org/view/545/Using-the-AclBehavior
> to bring out such a grouping. If my question is not clear please let
> me know. Please please please help me out. Thanks
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursion

2008-10-22 Thread David C. Zentgraf

Is your table set up correctly (includes parent_id, lft, rght)?
Post the error you're getting here, stabbing in the dark doesn't work  
too well. ;o)

Chrs,
Dav

On 22 Oct 2008, at 14:16, mirfan wrote:

>
> Hello david,
> The link you provide me nearly solved my problem thanks, but there is
> a problem when i was trying it in a separate project it works as i
> need but when i integrate it in my project it gives me an sql error i
> don't know why is that problem coming please help me
>
> On Oct 20, 7:31 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>> http://book.cakephp.org/view/91/Tree
>>
>> On 19 Oct 2008, at 20:10,mirfanwrote:
>>
>>
>>
>>> Hi,
>>> I have a problem with recursion. I have a table for keeping the
>>> account information of all members in which each member has a parent
>>> now i have to find out all of the members in the downline of a
>>> specific one look at the following example.
>>> Member1
>>> |
>>>
>>>   |   |
>>>   Member2   Member3
>>> | |
>>>   Member4---
>>>|  |
>>> Member5 Member6
>>> from member2 to member6 all are the downline of Member1 and member5
>>> and 6 are downline of member3
>>> please give a solution for this i am really tired and boared.
>>> Regards,
> >


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: new CakePHP baby born: www.cooreea.com

2008-10-22 Thread [EMAIL PROTECTED]


I really like the concept. I hope it grows to a critical mass soon.
After only a quick click-around it looks and works great too.

A few small comments:
- Leaving the field empty and clicking "Confirm Address" will zoom the
map to  a point in the water not too far from Wellington. You might
want to choose some default address to zoom to.
- The home page (not logged in) could be  more inviting by making more
things interactive. Like making consignments and journeys expandable
in some way. Being able to interact more, and see entries in more
detail, before signing up might attract more people.

Let me know when you decide to release in Sweden :)
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



I'd like to delete them from the bottom in the layout.

2008-10-22 Thread ghost

I'd like to delete them from the bottom in the layout.

(default) 0 query took ms
Nr  Query   Error   AffectedNum. rows   Took (ms)


I'd like to delete the article, as above.


And I'd like to delete the shortcut icon.
What should I do?

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: undefined method Sanitize::sql()

2008-10-22 Thread Gwoo

Sanitize was never required to prevent sql injection as the dbo layer
handles that already by correctly escaping values. If you want to use
Sanitize make sure you App::import('Sanitize')
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



new CakePHP baby born: www.cooreea.com

2008-10-22 Thread stefanski

Hello awesome CakePHP Community!

Thank you a lot for helping me out with questions in the last 8 months
when I was working on my own web project and first CakePHP project:
It's a peer-to-peer transport network, that helps people come together
who want to send stuff and people who want to get some of their fuel
money back while travelling: www.cooreea.com

We appreciate any comments about the site as we just launched and need
feedback, feedback, feedback.

And most thanks to the core team for keep on developing, we use 1.2 RC
3 which really rocks! My web development code quality improved soo
much since I used CakePHP :-)

You guys are great!

stefanski
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: new CakePHP baby born: www.cooreea.com

2008-10-22 Thread Gwoo

I did not take too much time to go through the site, but I really like
the idea and how it is coming together. Maybe I could get a ride share
for me an my surfboard to NZ from CA...
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: passedArgs help!

2008-10-22 Thread Gwoo

$this->passedArgs is available in the view. just pr($this->passedArgs)
and see what you get.
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: loginRedirect question re: Closed ticket @ Trac #5057

2008-10-22 Thread Gwoo

reading the comment on the ticket thoroughly would provide the
solution"You can set autoRedirect = false, then handle the
redirect in the login action"
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: App::Import and Model

2008-10-22 Thread [EMAIL PROTECTED]

On Oct 21, 8:09 pm, BillBris <[EMAIL PROTECTED]> wrote:
> Oddly enough, I added your suggestion and changed to debug=1 in the
> core.php.  Everything worked just fine.  I returned the debug level to
> 0 and everything still worked just fine.  The only difference was I
> had turned off my dev box overnight and this was a fresh run.  Very
> odd.


This might have been a cache issue. If you alter your database or
create new models while in debug 0 you may not always see the changes
if Cake is reading the cache.

/Martin
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL on cakephp 1.2

2008-10-22 Thread amro . t17

dear bakers

i hope to find a will done document about ACL in cake version 1.2
because i need to use it and i cant understand how it is works .

so please if any one have a good tutorial or example or any link that
i can use

and thanks in advance

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cookie tutorial

2008-10-22 Thread .
same here.. so you still are leaving out the domain variable?

On Tue, Oct 21, 2008 at 11:13 AM, Stinkbug <[EMAIL PROTECTED]> wrote:

>
> I had a problem with cookies a while back. Couldn't seem to reference
> them after I saved them. I know the docs say the domain variable is
> required, but as soon as removed it, everything started working as
> expected.
>
> On Oct 20, 1:27 am, . <[EMAIL PROTECTED]> wrote:
> > I don't think it is saving the cookie, because if i go to another page,
> > doing $this->Cookie->read('name') returns null... how do i persist the
> > cookie?
> >
> > On Sun, Oct 19, 2008 at 11:25 PM, . <[EMAIL PROTECTED]> wrote:
> > >  $this->Cookie->name = 'location';
> > >   $this->Cookie->time =  3600;  // or '1 hour'
> > >   $this->Cookie->path = '/';
> > >   $this->Cookie->domain = 'localhost';
> > >   $this->Cookie->secure = true;  //i.e. only sent if using secure HTTPS
> > >   $this->Cookie->key = 'qSI232qs*&sXOw!';
> >
> > >  $this->Cookie->write('name','Larry');
> >
> > > if I do the above, where is the cookie "location" saved to? I did a
> search
> > > on my HDD but cannot find the file.
> >
> > > On Sun, Oct 19, 2008 at 11:03 PM, Daniel Hofstetter <
> [EMAIL PROTECTED]>wrote:
>  >
> > >> Hi,
> >
> > >> > is there any tutorial about cookie component for cakephp? i am
> having
> > >> > trouble using it.
> >
> > >>http://book.cakephp.org/view/177/Cookies
> >
> > >> Hope that helps!
> >
> > >> --
> > >> Daniel Hofstetter
> > >>http://cakebaker.42dh.com
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---