Re: Site down after restart

2014-06-03 Thread Ma';moon
What about your web server? is it up?


On Mon, Jun 2, 2014 at 2:58 PM, Hod Benbinyamin  wrote:

> I installed latest cakephp (2.5.1 stable)
> Open browser on it and was able to see homepage.
>
> Restarted the machine and now i get 'webpage is not available'
> ping works
>
> Any idea?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Online baking tool for CakePHP

2013-04-10 Thread Ma';moon
The tool is awesome,  Thanks for sharing :)
Just a small question though, dont you think that it reinvents the wheel? i
mean bake tool is already easy to use on a localhost machine so why
would anyone need to use an online baking tool?


On Wed, Apr 10, 2013 at 9:19 AM, Christian Cadéré  wrote:

> Petit Four is an online application dedicated to speed up the design and
> code generation of CakePHP projects.
>
> It allows to design the models of an application: fields, validation rules
> and relations, with a simple user interface. Then with one clic it
> generates:
>
>- a SQL database
>- Model files with all validation rules and relations
>- Standard CakePHP Controllers files
>- Standard CakePHP view files
>
> It has just been released so it is still a bit basic and may contain some
> bugs, but we are working to improve it and would be glad to receive
> comments and suggestions !
>
> You can use it here : http://patisserie.keensoftware.com/en/cakes
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Benchmark framework article

2013-03-28 Thread Ma';moon
With all due respect but this benchmark is ridicules!, comparing native
coded application with a framework app doesn't make any sense, worst yet
comparing programming languages in terms of performance taking in mind the
natural diffs between programming languages, its almost like comparing
water with milk where both of them are liquids but each one of them has its
own use!


On Thu, Mar 28, 2013 at 8:58 PM, Miles J  wrote:

> Found this article. Pretty interesting that Cake is last place in every
> benchmark (given that it's multiple languages).
>
> http://www.techempower.com/blog/2013/03/28/framework-benchmarks/
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: New to frame work

2013-02-05 Thread Ma';moon
Start with the cookbook http://book.cakephp.org/2.0/en/index.html


On Tue, Feb 5, 2013 at 1:23 AM, Mohammed Azharuddin  wrote:

> How r u all? hope this mail reach you  all with Good health..
>
> i'm new to frame work i never used frame work in my projects i like to
> develop project using cake php can anybody help me...??
>
>
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Best practice for EXTERNAL api?

2013-01-07 Thread Ma';moon
http://book.cakephp.org/2.0/en/models/datasources.html
Check out the example usage of "FarAwaySource"


On Mon, Jan 7, 2013 at 9:59 AM, marcus33cz  wrote:

> Hi all,
>
> I have several external APIs which I'd like to use - such as this one:
> http://www.pinnaclesports.com/apimanual/commands.aspx
>
> The scripts I want to create will use the HttpSocket class (to get the
> data via API) and some model classes such as Match (to save the data in my
> DB).
> The scripts should be run by CRON (and I guess it should be accessible
> manually as well).
>
> Now the question is *where in the structure of cakePHP should I put my
> scripts that get data from the API and save them?*
> *(I think it is not exactly a plugin and I don't want to create another
> model either - because all my models are mapped to a DB table and the API
> wouldn't be.)*
>
> Thanks a lot!
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Error: Call to a member function find() on a non-object

2012-10-18 Thread Ma';moon
Just check your database permissions and make sure that the user mentioned
in your database.php file is actually able to use the database mentioned by
its name in the same file, my hunch is telling me that this is your problem
:)

On Thu, Oct 18, 2012 at 8:22 PM, Russell Brown wrote:

> I should also point out that I was able to do the Blog Tutorial without
> any problems.  No problems with database connection
>
> I think I am just going to put this one aside for a while and focus on
> developing a new application.
>
>
> On Monday, October 15, 2012 6:58:52 PM UTC-5, Russell Brown wrote:
>
>> Error:  Call to a member function find() on a non-object
>> File:  c:\wamp\www\cake222\app\**Controller\**AddressesController.php
>>
>> I get the error on the $this->set('address_list',
>> $this->Address->find('all')) line below:
>>
>> Partial listing of my AddressesController file:
>>
>> > class AddressesController extends AppController {
>>   var $name = 'addresses';
>>
>>  function index($id = null) {
>> $this->set('address_list', $this->Address->find('all'));
>>   }
>>
>> I have a controller called AddressesController.php.  I have a Model
>> called Address.php.  The table is called addresses.
>>
>> I am using Cake 2.2.2 and PHP 5.3.8 and Apache 2.2.21 and MySQL 5.5.16
>>
>>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Error: Call to a member function find() on a non-object

2012-10-18 Thread Ma';moon
Does it say at what line the error occurs? What does your web server's
error log say?

On Thu, Oct 18, 2012 at 6:14 PM, Russell Brown wrote:

> Yes.  I did a clean install and still get the error.
>
> I get the DebugKit toolbar -it works fine.
>
> For some reason I can't just type debug($this); before and after the
> variable I want to check.  Still gives me a syntax error.
>
> On Thursday, October 18, 2012 3:50:23 PM UTC-5, cricket wrote:
>
>> Any other info on what the syntax error is? I'm beginning to think
>> something is really borked with your install.
>>
>> On Thu, Oct 18, 2012 at 4:28 PM, Russell Brown 
>> wrote:
>> > When I put debug($this); in the file, however I get a syntax error on
>> that
>> > line.
>> >
>> > I am using Cake 2.2.2 and I have installed the DebugKit too.
>> >
>> >
>> >
>> > On Monday, October 15, 2012 8:27:58 PM UTC-5, Wallace Cardoso Colaço
>> Ricardo
>> > wrote:
>> >>
>> >> Try to debug what objects(Models) are being loaded...
>> >>
>> >> Doing so you will know for sure the name of the instance Address.
>> >>
>> >> Put this before your find:
>> >>
>> >> debug($this);
>> >>
>> >> On Oct 15, 2012, at 9:23 PM, Russell Brown wrote:
>> >>
>> >> Here is my index.ctp view file in the View\Addresses folder:
>> >>
>> >> > >> echo $this->Html->link('Add New Address', array('action'=>'add'));
>> >> ?>
>> >> 
>> >>   
>> >>  Id
>> >>  First Name
>> >>  Last Name
>> >>  Email
>> >>  Phone
>> >>  Address
>> >>  Options
>> >>   
>> >>
>> >> > >>   foreach ( $address_list as $line ) {
>> >>   $address = $line['Address'];
>> >> echo
>> >> ''.
>> >> ''.$address['id'].''.
>> >> ''.$this->Html->link($**address['first_name'],
>> array('action'=>'view',
>> >> 'id'=>$address['id'])).''**.
>> >> ''.$address['last_name'].'**'.
>> >> ''.$address['email'].''.
>> >> ''.$address['phone'].''.
>> >> ''.$address['address'].''.
>> >> ''.$this->Html->link('**edit', array('action'=>'edit',
>> >> 'id'=>$address['id'])).' '.
>> >>
>> >> $this->Html->link('delete', array('action'=>'delete',
>> >> 'id'=>$address['id'])).''**.
>> >> '';
>> >>
>> >>   };
>> >> ?>
>> >> 
>> >>
>> >>
>> >> On Monday, October 15, 2012 6:58:52 PM UTC-5, Russell Brown wrote:
>> >>>
>> >>> Error:  Call to a member function find() on a non-object
>> >>> File:  c:\wamp\www\cake222\app\**Controller\**AddressesController.php
>>
>> >>>
>> >>> I get the error on the $this->set('address_list',
>> >>> $this->Address->find('all')) line below:
>> >>>
>> >>> Partial listing of my AddressesController file:
>> >>>
>> >>> > >>> class AddressesController extends AppController {
>> >>>   var $name = 'addresses';
>> >>>
>> >>>  function index($id = null) {
>> >>> $this->set('address_list', $this->Address->find('all'));
>> >>>   }
>> >>>
>> >>> I have a controller called AddressesController.php.  I have a Model
>> >>> called Address.php.  The table is called addresses.
>> >>>
>> >>> I am using Cake 2.2.2 and PHP 5.3.8 and Apache 2.2.21 and MySQL
>> 5.5.16
>> >>>
>> >>
>> >> --
>> >> Like Us on FaceBook 
>> >> https://www.facebook.com/**CakePHP
>> >> Find us on Twitter http://twitter.com/CakePHP
>> >>
>> >> ---
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "CakePHP" group.
>> >> To post to this group, send email to cake...@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> cake-php+u...@googlegroups.com**.
>> >>
>> >> Visit this group at 
>> >> http://groups.google.com/**group/cake-php?hl=en.
>>
>> >>
>> >>
>> >>
>> >>
>> > --
>> > Like Us on FaceBook 
>> > https://www.facebook.com/**CakePHP
>> > Find us on Twitter http://twitter.com/CakePHP
>> >
>> > ---
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "CakePHP" group.
>> > To post to this group, send email to cake...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > cake-php+u...@**googlegroups.com.
>> > Visit this group at 
>> > http://groups.google.com/**group/cake-php?hl=en.
>>
>> >
>> >
>>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.co

Re: Error: Call to a member function find() on a non-object

2012-10-15 Thread Ma';moon
Will you also dump your model file contents

On Mon, Oct 15, 2012 at 7:58 PM, Russell Brown wrote:

> Error:  Call to a member function find() on a non-object
> File:  c:\wamp\www\cake222\app\Controller\AddressesController.php
>
> I get the error on the $this->set('address_list',
> $this->Address->find('all')) line below:
>
> Partial listing of my AddressesController file:
>
>  class AddressesController extends AppController {
>   var $name = 'addresses';
>
>  function index($id = null) {
> $this->set('address_list', $this->Address->find('all'));
>   }
>
> I have a controller called AddressesController.php.  I have a Model called
> Address.php.  The table is called addresses.
>
> I am using Cake 2.2.2 and PHP 5.3.8 and Apache 2.2.21 and MySQL 5.5.16
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: ImageMagick & Cake Ver 2.0.4

2012-05-21 Thread Ma';moon
Why don't you rais up debug mode or check your server's logs and see
whats happening!
Trust your self, you can do it :)

On Mon, May 21, 2012 at 7:20 PM, Blues Clues  wrote:

> Hi
> I have added this code by mapping the file location to files/upload/ under
> webroot folder of Cakephp. However, nothing happens. Would you know why
> this might be happening?
>
> -Adhi
>
>  $im = new imagick( 'files/upload/test.pdf[0]' );
>
> // convert to jpg
> $im->setImageColorspace(255);
> $im->setCompression(Imagick::C**OMPRESSION_JPEG);
> $im->setCompressionQuality(60)**;
> $im->setImageFormat('jpeg');
>
> //resize
> $im->resizeImage(290, 375, ima**gick::FILTER_LANCZOS, 1);
>
> //write image on server
> $im->writeImage('files/upload/thumb.jpg');
> $im->clear();
> $im->destroy();
>
> ?>
>
>
> On Monday, May 21, 2012 11:26:00 AM UTC-4, Justin Edwards wrote:
>>
>> http://php.net/manual/en/**imagick.setimageformat.php
>>
>> > // read page 1
>> $im = new imagick( 'test.pdf[ 0]' );
>>
>> // convert to jpg
>> $im->setImageColorspace(255);
>> $im->setCompression(Imagick::C**OMPRESSION_JPEG);
>> $im->setCompressionQuality(60)**;
>> $im->setImageFormat('jpeg');
>>
>> //resize
>> $im->resizeImage(290, 375, ima**gick::FILTER_LANCZOS, 1);
>>
>> //write image on server
>> $im->writeImage('thumb.jpg');
>> $im->clear();
>> $im->destroy();
>> ?>
>>
>> On Mon, May 21, 2012 at 10:14 AM, Blues Clues wrote:
>>
>>> Hi,
>>>
>>> Thanks. Very encouraging start. Would you be kind to provide some sample
>>> code to use this in my controller? I am losing my mind on this to convert
>>> PDF to PNG file in my cakephp 1.3 controller.
>>>
>>> -Adhi
>>>
>>>
>>> On Monday, May 21, 2012 10:30:36 AM UTC-4, ibejohn818 wrote:
>>>
 Use the pecl library imagick. It is more than capable and has a very
 good interface

 http://pecl.php.net/package/**im**agick
 On May 21, 2012 7:25 AM, "bluesclues9"  wrote:

> Hi
> Just curious about this question as I have a similar need. Did you
> ever get
> an answer or figured out yourself?
>
> thanks
> -Adhi
>
> --
> View this message in context: http://cakephp.1045679.n5.**nabb**
> le.com/ImageMagick-Cake-**Ver-2-**0-4-tp5126927p5708144.**html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and
> help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@**googlegro**ups.comFor
>  more options, visit this group at
> http://groups.google.com/**group**/cake-php
>
  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscribe@**googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/**group/cake-php
>>>
>>
>>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: not updating modified, how ?

2012-01-28 Thread Ma';moon
try something like:
$this->request->data['Device']['updated'] = false;

On Sat, Jan 28, 2012 at 4:37 PM, Charles Bueche  wrote:

>  Hey bakers,
>
> I'm using CakePHP 2.1 on Ubuntu.
>
> I'm trying to update a single DB field, without CakePHP updating the
> "modified" field. Here is my code:
>
> $this->Device->id = $device_id;
> $this->request->data['Device']['last_seen'] = date("Y-m-d
> H:i:s");
> $this->request->data['modified'] = false;
> $this->Device->save($this->request->data, array('fieldList' =>
> array( 'last_seen')));
>
> However, "modified" gets an update. In
> http://book.cakephp.org/2.0/en/models/saving-your-data.html, there is a
> tip saying " If you don’t want the updated field to be updated when saving
> some data add 'updated' => false to your $data array".
>
> I tried 'updated' => false and 'modified' => false, but "modified" always
> gets an update. Any idea how I can avoid this ?
>
> TIA,
> Charles
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Confused: Trying to get values from a table outside of the controller.

2011-11-23 Thread Ma';moon
100% Granted!

On Wed, Nov 23, 2011 at 2:18 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Don't just rely on recursion. Always use the containable behaviour.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 23 Nov 2011, at 02:05, Ma'moon wrote:
>
> If there is any kind of association between `Post` and `Period` models
> then you can easily play with model's `recursive` flag to obtain what you
> want, otherwise you may manually load `Period` model in your
> `PostsController` and fetch the information you seek, code language:
> $this->loadModel('Period');
> $this->set('periods', $this->Period->find('all'));
>
> On Mon, Nov 21, 2011 at 7:53 PM, GG  wrote:
>
>> I have a PostsController. I have a posts table. I can easily get the
>> information I need from that table. I am trying to get information
>> from my periods table, from my posts controller. I am confused on how
>> to best do that. This is how I get the information from my posts
>> table.
>>
>> ( I am getting all info in the posts table, where user_id = *logged in
>> user*, class_period = 1, and created on todays date.)
>>
>> $this->set('period1', $this->Post->find('all', array(
>>
>> 'conditions'=>array('user_id'=>$this->Session-
>> >read('Auth.User.id'), 'class_period'=>1, 'created' => date('Ymd'))
>>   )));
>>
>>
>> ( I want to get all info in the periods table, where user_id=*logged
>> in user* )
>>
>> But I do not know how to get the values of the periods table from the
>> PostsController.
>>
>> Thanks!
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Confused: Trying to get values from a table outside of the controller.

2011-11-22 Thread Ma';moon
If there is any kind of association between `Post` and `Period` models then
you can easily play with model's `recursive` flag to obtain what you want,
otherwise you may manually load `Period` model in your `PostsController`
and fetch the information you seek, code language:
$this->loadModel('Period');
$this->set('periods', $this->Period->find('all'));

On Mon, Nov 21, 2011 at 7:53 PM, GG  wrote:

> I have a PostsController. I have a posts table. I can easily get the
> information I need from that table. I am trying to get information
> from my periods table, from my posts controller. I am confused on how
> to best do that. This is how I get the information from my posts
> table.
>
> ( I am getting all info in the posts table, where user_id = *logged in
> user*, class_period = 1, and created on todays date.)
>
> $this->set('period1', $this->Post->find('all', array(
>
> 'conditions'=>array('user_id'=>$this->Session-
> >read('Auth.User.id'), 'class_period'=>1, 'created' => date('Ymd'))
>   )));
>
>
> ( I want to get all info in the periods table, where user_id=*logged
> in user* )
>
> But I do not know how to get the values of the periods table from the
> PostsController.
>
> Thanks!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to get client mac address in PHP ..?

2011-11-21 Thread Ma';moon
HTTP doesn't carry the MAC address over to your server, plus this is not a
CakePHP question so i suggest using google before asking such a question in
a specific mailing list that is dedicated for a specific topic.

On Mon, Nov 21, 2011 at 1:15 PM, rrvasanth wrote:

> Dear friends...
>
>  I need to know the MAC address of the connect clients, how can I do
> this in PHP?
>
> Thanks
> Vasanth
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: can't connect to db

2011-11-05 Thread Ma';moon
Most likely you need to leave the port section empty in your db
configuration

On Sat, Nov 5, 2011 at 9:55 PM, bluethundr  wrote:

> ## cake cannot connect to the databse
>
> Your tmp directory is writable.
>
> The FileEngine is being used for caching. To change the config edit
> APP/config/core.php
>
> Your database configuration file is present.
>
> Cake is NOT able to connect to the database.
>
> ## database config file
>
>
> class DATABASE_CONFIG {
>
>var $default = array(
>'driver' => 'mysql',
>'persistent' => false,
>'host' => 'localhost',
>'login' => 'admin',
>'password' => 'secret',
>'database' => 'cake',
>'prefix' => '',
>'port' => '/var/lib/mysql/mysql.sock',
> //'encoding' => 'utf8',
>);
>
>var $test = array(
>'driver' => 'mysql',
>'persistent' => false,
>'host' => 'localhost',
>'login' => 'admin',
>'password' => 'secret',
>'database' => 'cakeblog',
>'prefix' => '',
>'port' => '/var/lib/mysql/mysql.sock',
> //'encoding' => 'utf8',
>);
> }
>
>
>
> ## user can connect to (and use) database on the command line
>
>
> [root@cloud cake]# mysql -uadmin -psecret
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 2
> Server version: 5.5.17-log MySQL Community Server (GPL) by Remi
>
> Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights
> reserved.
>
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> mysql> use cake
> Database changed
>
> thank you!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I hate CLI

2011-11-01 Thread Ma';moon
Command line is very powerful, you just need to know how to use it and once
you got used to it you will never like doing anything out of command line.
You're welcome!

On Tue, Nov 1, 2011 at 1:20 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> chmod a+rwX webroot/media/transfer
>
> ...runs without error and set the permissions for the media/transfer
> directory.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 11:02, Ma'moon wrote:
>
> Will you try without -R option
>
> On Tue, Nov 1, 2011 at 12:38 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> /Sites/mysitename/app
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 1 Nov 2011, at 10:33, Ma'moon wrote:
>>
>> Are you executing the command from the directory that contains the
>> webroot folder?, please run pwd to make sure of the location that you are
>> executing this command from
>>
>> On Tue, Nov 1, 2011 at 12:24 PM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> Running that command from app I get:
>>>
>>> chmod: -R: No such file or directory
>>>
>>> chmod a+rwX webroot/media/{transfer,filter} -R
>>>
>>> ... returns the same result too.
>>>
>>> The directories do exist.
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> Tel: +44 (0) 208 123 3822
>>> Mob: +44 (0) 7973 481949
>>> Skype: jeremy_burns
>>> http://www.classoutfit.com
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 1 Nov 2011, at 10:02, Ma'moon wrote:
>>>
>>> try this chmod a+rwX -R webroot/media/{transfer,filter}
>>>
>>> On Tue, Nov 1, 2011 at 11:26 AM, Jeremy Burns <
>>> jeremybu...@classoutfit.com> wrote:
>>>
>>>> I'm a GUI man me. CLI stuff just makes me go blank. It's like staring
>>>> into a black hole. Give me something I can point at and click and I'm
>>>> a happy man.
>>>>
>>>> I'm following the tutorial for setting up David Persson's media
>>>> plugin. Each time I run this:
>>>>
>>>> chmod -R a+rwX webroot/media/{transfer,filter}
>>>>
>>>> ... in Terminal I get this error:
>>>>
>>>> chmod: Invalid file mode: -R
>>>>
>>>> I have Googled but can't find the answer. Can any of you CLI junkies
>>>> help me out please?
>>>>
>>>> --
>>>> Our newest site for the community: CakePHP Video Tutorials
>>>> http://tv.cakephp.org
>>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>>> help others with their CakePHP related questions.
>>>>
>>>>
>>>> To unsubscribe from this group, send email to
>>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>>> group at http://groups.google.com/group/cake-php
>>>>
>>>
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>> group at http://groups.google.com/group/cake-php
>>>
>>>
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>> group at http://groups.google.com/group/cake-php
>>>
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this grou

Re: I hate CLI

2011-11-01 Thread Ma';moon
Will you try without -R option

On Tue, Nov 1, 2011 at 12:38 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> /Sites/mysitename/app
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 10:33, Ma'moon wrote:
>
> Are you executing the command from the directory that contains the webroot
> folder?, please run pwd to make sure of the location that you are executing
> this command from
>
> On Tue, Nov 1, 2011 at 12:24 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> Running that command from app I get:
>>
>> chmod: -R: No such file or directory
>>
>> chmod a+rwX webroot/media/{transfer,filter} -R
>>
>> ... returns the same result too.
>>
>> The directories do exist.
>>
>> Jeremy Burns
>> Class Outfit
>>
>> Tel: +44 (0) 208 123 3822
>> Mob: +44 (0) 7973 481949
>> Skype: jeremy_burns
>> http://www.classoutfit.com
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 1 Nov 2011, at 10:02, Ma'moon wrote:
>>
>> try this chmod a+rwX -R webroot/media/{transfer,filter}
>>
>> On Tue, Nov 1, 2011 at 11:26 AM, Jeremy Burns <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> I'm a GUI man me. CLI stuff just makes me go blank. It's like staring
>>> into a black hole. Give me something I can point at and click and I'm
>>> a happy man.
>>>
>>> I'm following the tutorial for setting up David Persson's media
>>> plugin. Each time I run this:
>>>
>>> chmod -R a+rwX webroot/media/{transfer,filter}
>>>
>>> ... in Terminal I get this error:
>>>
>>> chmod: Invalid file mode: -R
>>>
>>> I have Googled but can't find the answer. Can any of you CLI junkies
>>> help me out please?
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>>> group at http://groups.google.com/group/cake-php
>>>
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>>
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I hate CLI

2011-11-01 Thread Ma';moon
Are you executing the command from the directory that contains the webroot
folder?, please run pwd to make sure of the location that you are executing
this command from

On Tue, Nov 1, 2011 at 12:24 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Running that command from app I get:
>
> chmod: -R: No such file or directory
>
> chmod a+rwX webroot/media/{transfer,filter} -R
>
> ... returns the same result too.
>
> The directories do exist.
>
> Jeremy Burns
> Class Outfit
>
> Tel: +44 (0) 208 123 3822
> Mob: +44 (0) 7973 481949
> Skype: jeremy_burns
> http://www.classoutfit.com
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 10:02, Ma'moon wrote:
>
> try this chmod a+rwX -R webroot/media/{transfer,filter}
>
> On Tue, Nov 1, 2011 at 11:26 AM, Jeremy Burns  > wrote:
>
>> I'm a GUI man me. CLI stuff just makes me go blank. It's like staring
>> into a black hole. Give me something I can point at and click and I'm
>> a happy man.
>>
>> I'm following the tutorial for setting up David Persson's media
>> plugin. Each time I run this:
>>
>> chmod -R a+rwX webroot/media/{transfer,filter}
>>
>> ... in Terminal I get this error:
>>
>> chmod: Invalid file mode: -R
>>
>> I have Googled but can't find the answer. Can any of you CLI junkies
>> help me out please?
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I hate CLI

2011-11-01 Thread Ma';moon
try this chmod a+rwX -R webroot/media/{transfer,filter}

On Tue, Nov 1, 2011 at 11:26 AM, Jeremy Burns
wrote:

> I'm a GUI man me. CLI stuff just makes me go blank. It's like staring
> into a black hole. Give me something I can point at and click and I'm
> a happy man.
>
> I'm following the tutorial for setting up David Persson's media
> plugin. Each time I run this:
>
> chmod -R a+rwX webroot/media/{transfer,filter}
>
> ... in Terminal I get this error:
>
> chmod: Invalid file mode: -R
>
> I have Googled but can't find the answer. Can any of you CLI junkies
> help me out please?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP and subdomains

2011-10-23 Thread Ma';moon
I have fixed the problem, i am posting my solution so it might help
somebody.
So basically it turned out that my .haccess file should look something like:

RewriteEngine on
## Check to see if the URL is without www part and its not a
predefined subdomain, then attach www part to HTTP_HOST
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} !^corp\.
RewriteCond %{HTTP_HOST} !^static\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

## Continue normally with CakePHP request cycle
RewriteCond %{HTTP_HOST} ^(www\.)?example.com$
RewriteRule^$ app/webroot/[L]
RewriteCond %{HTTP_HOST} ^(www\.)?example.com$
RewriteRule(.*) app/webroot/$1 [L]


The only thing that bothers me on the above hack is that every request will
be checked to see if it matches one of the 3 conditions above but i think
that i can live with that for now.

Hope this will help somebody someday.

Thanks Guys.


On Sun, Oct 23, 2011 at 10:03 AM, Ma'moon  wrote:

> Hello Guys,
>
> I have a problem that i don't really know how to fix since am not really
> an apache nor mod_rewrite expert, i did my homework by researching and
> googling but with no luck so far.
> I need to create subdomains beside the directory that contains my CakePHP
> installation, right inside the directory that contains the first .haccess
> file that redirects all requests to app/webroot, my .htaccess content is as
> follows:
>
> 
> RewriteEngine on
> ## sub-domains section
> RewriteCond %{HTTP_HOST} ^corp\.
> RewriteRule^$ subdomains/corp/[L]
> RewriteRule(.*) subdomains/corp/$1 [L]
> ## instead of example.com lets redirect the request for a 301
> page with URL www.example.com
> RewriteCond %{HTTP_HOST} !^www\.
> RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
> ## CakePHP section
> RewriteEngine on
> RewriteRule^$ app/webroot/[L]
> RewriteRule(.*) app/webroot/$1 [L]
> 
>
> in the holder directory for the above .hatccess file i have a folder
> called subdomains, inside that folder i have other folders that contains
> some applications, for example the "corp" folder is a wordpress
> installation, i also have static folder that contains JS and CSS files so
> that they will be requested from a subdomain instead of the same domain
> that the page lays on, this is basically to make use of concurrent browser
> requests.
>
> Having this .htaccess content makes my server produce 500 internal server
> error and my whole CakePHP application goes down beside having the
> subdomains unfixed.
> Am not really sure where the problem exactly is so i thought may be
> somebody have passed through this before then i will thankful if he/she may
> share the experience on resolving this issue.
>
> Perhaps i must also mention that my server is a shared host and its
> running CakePHP 1.3
>
> Thanks a lot.
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


CakePHP and subdomains

2011-10-23 Thread Ma';moon
Hello Guys,

I have a problem that i don't really know how to fix since am not really an
apache nor mod_rewrite expert, i did my homework by researching and
googling but with no luck so far.
I need to create subdomains beside the directory that contains my CakePHP
installation, right inside the directory that contains the first .haccess
file that redirects all requests to app/webroot, my .htaccess content is as
follows:


RewriteEngine on
## sub-domains section
RewriteCond %{HTTP_HOST} ^corp\.
RewriteRule^$ subdomains/corp/[L]
RewriteRule(.*) subdomains/corp/$1 [L]
## instead of example.com lets redirect the request for a 301 page
with URL www.example.com
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
## CakePHP section
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteRule(.*) app/webroot/$1 [L]


in the holder directory for the above .hatccess file i have a folder called
subdomains, inside that folder i have other folders that contains some
applications, for example the "corp" folder is a wordpress installation, i
also have static folder that contains JS and CSS files so that they will be
requested from a subdomain instead of the same domain that the page lays
on, this is basically to make use of concurrent browser requests.

Having this .htaccess content makes my server produce 500 internal server
error and my whole CakePHP application goes down beside having the
subdomains unfixed.
Am not really sure where the problem exactly is so i thought may be
somebody have passed through this before then i will thankful if he/she may
share the experience on resolving this issue.

Perhaps i must also mention that my server is a shared host and its running
CakePHP 1.3

Thanks a lot.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem when downloading a video file

2011-10-04 Thread Ma';moon
Can you post your controller code and let us see how you exactly implemented
this?

On Tue, Oct 4, 2011 at 10:41 AM, thomaus  wrote:

> Nobody no clue?
>
> On Oct 3, 5:36 pm, thomaus  wrote:
> > Thanks for your answers.
> >
> > Here is how I set my header (the video file is a .mp4 one)
> >
> > header('Content-Description: File Transfer');
> > header('Content-Type: video/mp4');
> >
> > // This is for the mp3 file
> > //  header('Content-Type: audio/mp3');
> >
> > header('Content-Disposition: attachment; filename=' .
> $file);
> > header('Content-Transfer-Encoding: binary');
> > header('Expires: 0');
> > header('Cache-Control: must-revalidate, post-check=0,
> pre-check=0');
> > header("Cache-Control: private", false);
> > header('Pragma: public');
> > header('Content-Length: ' . $file_size);
> >
> > But anyway, the code works when not executed with CakePHP, so it
> > should not be a header problem.
> >
> > On Oct 3, 5:11 pm, somebody who carez 
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > You may need to set a correct header for the file to get the browser to
> > > process it correctly.
> >
> > >http://php.net/manual/en/function.readfile.php
> >
> > > Thank you,
> > > -Alex Goretoy
> >
> > > On Mon, Oct 3, 2011 at 10:03 AM, thomaus  wrote:
> > > > Hi there,
> >
> > > > I'm experiencing a very strange problem. I'm trying to remotely
> > > > download a video file.
> >
> > > > I've done a very basic PHP code using the readfile() function. This
> > > > code works absolutely fine.
> >
> > > > Now when I copy / paste the exact same code into my CakePHP
> > > > controller, the URL works, a file is actually downloaded, the size of
> > > > the downloaded file is correct, but the type of the file is not
> > > > recognized, i.e. the video can't be played.
> > > > I tried the same with a mp3 file, just to check if the problem was
> not
> > > > a video format one, and the same problem happened. And again the
> > > > original PHP code is working fine with this mp3 file.
> >
> > > > I have added these 3 lines just in case in my controller :
> > > >Configure::write('debug', 0);
> > > >$this->autoLayout = false;
> > > >$this->autoRender = false;
> > > > but the same problem happens.
> >
> > > > Any idea?
> >
> > > > --
> > > > Our newest site for the community: CakePHP Video Tutorials
> > > >http://tv.cakephp.org
> > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > others with their CakePHP related questions.
> >
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> > > > athttp://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem when downloading a video file

2011-10-03 Thread Ma';moon
Though i would diffidently put the file in webroot to save server resources
and perhaps yet better i would try to put it in a CDN but if you would like
to serve the file the way you described, have you written [*header*
("Content-Type: *video*/x-ms-wmv");] before you send the file back to
client.

On Mon, Oct 3, 2011 at 11:03 AM, thomaus  wrote:

> Hi there,
>
> I'm experiencing a very strange problem. I'm trying to remotely
> download a video file.
>
> I've done a very basic PHP code using the readfile() function. This
> code works absolutely fine.
>
> Now when I copy / paste the exact same code into my CakePHP
> controller, the URL works, a file is actually downloaded, the size of
> the downloaded file is correct, but the type of the file is not
> recognized, i.e. the video can't be played.
> I tried the same with a mp3 file, just to check if the problem was not
> a video format one, and the same problem happened. And again the
> original PHP code is working fine with this mp3 file.
>
> I have added these 3 lines just in case in my controller :
>Configure::write('debug', 0);
>$this->autoLayout = false;
>$this->autoRender = false;
> but the same problem happens.
>
> Any idea?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Array reconstruction

2011-09-25 Thread Ma';moon
How about the tree behavior http://book.cakephp.org/view/1341/Basic-Usage

On Sun, Sep 25, 2011 at 7:29 AM, g.dimakopou...@velicron.eu <
g.dimakopou...@velicron.eu> wrote:

> I want to turn the following array into an associative one. The
> original array is indexed like [0],[1],[2],…[n]. The function I used
> was Set::combine but I couldn't reconstruct all three levels of the
> desired associative array.
>
>Array
>(
>[0] => Array
>(
>[ACCOUNTS] => Array
>(
>[description] => A
>)
>
>[HEADERS] => Array
>(
>[description] => B
>)
>
>[COLUMNS] => Array
>(
>[description] => C
>[id] => 8
>)
>
>)
>[1] => Array
>(
>[ACCOUNTS] => Array
>(
>[description] => A1
>)
>
>[HEADERS] => Array
>(
>[description] => B1
>)
>
>[COLUMNS] => Array
>(
>[description] => C1
>[id] => 9
>)
>
>)
>)
>
>
> I want to end up with the following associative array:
>
>Array
>(
>[A] => Array
>(
>[B] => Array
>(
>[C] => 8
>)
>)
>[A1] => Array
>(
>[B1] => Array
>(
>[C1] => 9
>)
>)
>)
>
> With the Set::combine function I can create part of the array above
> but not the whole array in one go.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: baker to commit to svn

2011-09-12 Thread Ma';moon
Do you mean having the generated files being committed to SVN automatically
after baking the project?

On Mon, Sep 12, 2011 at 5:38 PM, hr_software_developer  wrote:

> You can make classes based on relationship using cake-baker, right?
> ( view, model, and controller classes )
> Once I bake them I need to push these classes to svn repository so
> others can "update" their work environment so
> that they use already generated classes.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: New developer; Cake is NOT able to connect to the database.

2011-09-06 Thread Ma';moon
Just a quick small hint, never use "root" account for production, instead
create another database user and grant for it the desired permissions. and
by the way, if "root" worked for you then clearly you have a problem with
the "previous" user's permissions or existence.

On Tue, Sep 6, 2011 at 1:24 PM, Jeremy Williams  wrote:

> changed the username to 'root' and it connected! thanks guys!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Streaming CakeFest 2011

2011-09-03 Thread Ma';moon
Yep, they're perfectly working :)
Thanks Larry

On Sat, Sep 3, 2011 at 6:46 AM, Larry E. Masters  wrote:

> They are streaming, check again.
>
> --
> Larry E. Masters
>
>
> On Sat, Sep 3, 2011 at 4:31 AM, Ma'moon  wrote:
>
>> Neither the first one!
>>
>> On Sat, Sep 3, 2011 at 5:25 AM, Larry E. Masters wrote:
>>
>>> We are streaming CakeFest 2011 from Manchester at live.cakephp.org
>>>
>>> We have 2 tracks
>>>
>>> http://live.cakephp.org/
>>>
>>> http://live.cakephp.org/pages/second_track
>>>
>>>
>>> --
>>> Larry E. Masters
>>>
>>>  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Streaming CakeFest 2011

2011-09-03 Thread Ma';moon
Neither the first one!

On Sat, Sep 3, 2011 at 5:25 AM, Larry E. Masters  wrote:

> We are streaming CakeFest 2011 from Manchester at live.cakephp.org
>
> We have 2 tracks
>
> http://live.cakephp.org/
>
> http://live.cakephp.org/pages/second_track
>
>
> --
> Larry E. Masters
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Streaming CakeFest 2011

2011-09-03 Thread Ma';moon
second track is not streaming!

On Sat, Sep 3, 2011 at 5:25 AM, Larry E. Masters  wrote:

> We are streaming CakeFest 2011 from Manchester at live.cakephp.org
>
> We have 2 tracks
>
> http://live.cakephp.org/
>
> http://live.cakephp.org/pages/second_track
>
>
> --
> Larry E. Masters
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: View caching with gzip

2011-09-01 Thread Ma';moon
Nope, you cannot access $this->params from bootstrap since the core libs are
not loaded yet to be used in the condition, on the other hand, you can use
$_SERVER['REQUEST_URI'] in order to build your condition body.

On Thu, Sep 1, 2011 at 11:00 AM, Teddy Zeenny  wrote:

> Whether I use gzipping depends on the action/view, and not in my entire
> application as sometimes my actions serve pdf or image content instead of
> html.  So I gzip based on the action i.e:
>
> if( $this->params['action']=='view' )ob_start('ob_gzhandler');
>
> You think I can condition my gzip in boostrap.php ?
>
> On Thu, Sep 1, 2011 at 5:53 PM, Ma'moon  wrote:
>
>> put ob_start ('ob_gzhandler') in your bootstrap.php file.
>>
>>
>> On Thu, Sep 1, 2011 at 10:27 AM, Teddy Zeenny wrote:
>>
>>> Hey guys,
>>>
>>> Does anyone have an idea on how to gzip cached views ?
>>>
>>> The way I would do it is use ob_start ('ob_gzhandler') in my
>>> controller's beforeFilter.
>>>
>>> The problem is when a view is cached, the beforeFilter is no longer
>>> called.
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: View caching with gzip

2011-09-01 Thread Ma';moon
put ob_start ('ob_gzhandler') in your bootstrap.php file.

On Thu, Sep 1, 2011 at 10:27 AM, Teddy Zeenny  wrote:

> Hey guys,
>
> Does anyone have an idea on how to gzip cached views ?
>
> The way I would do it is use ob_start ('ob_gzhandler') in my
> controller's beforeFilter.
>
> The problem is when a view is cached, the beforeFilter is no longer
> called.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: SQL / PHP Beginner....

2011-08-18 Thread Ma';moon
Hi Edmund,

There is a big difference between PHP and CakePHP, PHP is a web/scripting
programming language while CakePHP "Which was built using PHP" is actually a
web application framework that you use to build web applications.
I suggest getting your hands really dirty with PHP first before you come
over to CakePHP so you can use the framework effectively and efficiently.

Good Luck

On Thu, Aug 18, 2011 at 5:59 AM, Edmund Wilson <
edwilson120...@googlemail.com> wrote:

> Hi I am trying to make a simple PHP page that queries a MySQL
> database.
>
> There are two tables created by a program (I don't have any control
> over the creation of these tables) but they both created by the same
> data source.
>
> I was trying to form a FULL JOIN to display data from both tables in
> one web page - However I can't seem to get this to work. The only
> common column in both is ResultSetID which in one is totally unique -
> the other is repeated (although the identifier does relate to the same
> user and data entered by that user)
>
> The two tables are:
>
> resultsets: (which contains the following columns)
> ResultSetID, Candidate, QuizName, PercentageScore, PercentagePass,
> PassFail
>
> and
>
> questiondata (which contains the following colloums)
> ResultSetID, SectionReference, Responce
>
> The code I have strung together so far is as follows:.
>
>
> 
> // Make The MySQL Server + Datebase Connection
> mysql_connect("localhost", "root", "") or die(mysql_error());
> mysql_select_db("questions") or die(mysql_error());
>
>
>
> // Construct our join query
> $query = "SELECT * FROM questions.resultsets
>  FULL JOIN questions.questiondata
>  ON ResultSetID";
>
> $result = mysql_query($query) or die(mysql_error());
>
>
> // Print out the contents of each row into a table
> while($row = mysql_fetch_array($result)){
>echo $row['resultsets.ResultSetID']. " - ".
> $row['questiondata.QuestionID']. " - ". $row['questiondata.Responce'];
>echo "";
> }
> ?>
>
> But the output I am getting from the webpage is:
> Column 'ResultSetID' in on clause is ambiguous
>
> Is this because the ResultSetID in the questiondata is not unique per
> row? And if so is there any way to merge the two tables together?
>
> Sorry to be a real novice but I only started to look at PHP and MySQL
> last night!
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: View and Edit at the same time

2011-08-14 Thread Ma';moon
Put the same content that you got from the database in a form contained
within a hidden , offer a link or a button named "Edit", onclick at
that button show the hidden  that contains the form which will save
"edit" the data.

Am not really sure if that would be a CakePHP related issue though!

On Sun, Aug 14, 2011 at 9:45 PM, nOLL  wrote:

> Hi,
>
> i would like to create page that can view the data from the database.
> At the same time, i could directly edit the data rather than create
> another link to update the data.
>
> How can i do this?
>
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Check username availability using jquery

2011-08-07 Thread Ma';moon
The only thing that i can see that worth the concern is using  $this
->params['form']['username'] and also $this->User->query() , its been
clearly stated in the cook book that using "query" instead of "find" will
make you go with your own to prepare the SQL statement that you wish to
execute, i would recommend using $this->data instead of $this->params and
also using $this->User->find instead of $this->User->query to stay in the
safe side.

On Sat, Aug 6, 2011 at 5:09 PM, Neil !!!  wrote:

> I found a way to workout correctly but bit worried about security.
> help me guys
> here is a link on which i found a way to a article to check username
> availability...
>
>
> http://www.instatutorial.com/check-username-availability-using-jquery-in-cakephp
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP 1.3.11 and 2.0.0-beta released

2011-07-26 Thread Ma';moon
Thank you so much for this wonderful effort, i would love to stay that i
have been always a happy baker but now am truly much happier than ever :)
Please guys keep up the great work, without this amazing effort our life
will much harder, i just love CakePHP, i truly lovin it :)

On Tue, Jul 26, 2011 at 4:03 PM, José Lorenzo  wrote:

> The CakePHP core team is proud to announce the immediate availability of
> CakePHP 1.3.11 and 2.0.0-beta. 1.3.11 is a bugfix/maintenance release for
> the the 1.3 branch. 2.0.0-beta marks the beginning of API stabilization and
> means no more backwards incompatible changes should be done from this point,
> but it does not mean it is intended for production systems yet. Since the
> release CakePHP 1.3.10 in late May, there have been over 27 commits[1] and
> 10 tickets resolved. There have been a few changes that may affect your
> application:
> 1.3
>
>- Fixtures are now truncated in reverse order, this can help some
>applications with constraints in database to run tests more smoothly
>- Database credentials will now be hidden from debug output to protect
>users that forgot to set debug = 0 in their production servers
>- Fixed bug for detecting correct setup for mod_rewrite
>- Datasource will now return false instead of raising an error if
>unable to connect to Mysql or Mysqli
>- Added a banner to the default home.ctp to show important CakePHP
>announcements
>
> 2.0
>
> In the 2.0 the team has made huge strides on implementing the remaining
> items on the todo list for the next version of the framework, we had a big
> tide of new committers and lots of pull requests on github. We're thrilled
> on the interest the community is putting on CakePHP 2.0. Since 2.0.0-alpha
> there have been over 375 commits[2] with various topic branches merged in.
> There are a couple of big changes that will require you to update your app
> if already running apps in 2.0. the biggest change is in the Dispatching
> process that will require an instance on CakeResponse passed from the
> index.php webroot file. Also the default routes were extracted to their own
> file that needs to be included in your app's routes.php file, just update
> app/Config/routes.php according to the one bundled in the default
> distribution. Here is a quick list of the highlight for this release:
>
>- Microsoft SqlServer 2008 and 2011 is now a first class citizen
>- FormHelper is now able to guess model metadata again, it is now
>advisable to hint the helper with the controller $uses property of what
>models is the controller using. This contrasts with 1.3 applications where
>$uses supposed a performance hit. This is not true anymore for 2.0
>- The i18n extract shell is now able to exclude plugins from the
>process or extract one in particular
>- The validation messages in models can now be automatically extracted
>by the i18n shell, there is no need as in 1.3 applications for translating
>the messages in the constructor anymore
>- Default routes are now located in their own file that needs to be
>included in your app/Config/routes.php, make sure you update it!
>- Dispatcher now takes a CakeResponse as a second argument, make sure
>you update your app/webroot/index.php file!
>- Model::saveAll() was refactored and now the model has saveMany,
>saveAssociatied, validateMany and validateAssociated methods
>- Model::find() was refactored and the query building process is done a
>in new buildQuery() method
>- Lots of performance improvements From this point, the CakePHP core
>team will focus on fixing any bug that pops out on the lighthouse[3] and
>finish the new 2.0 book[4] which is now git based and compiled using 
> sphinx.
>If you feel like you can give us a hand on getting an excellent
>documentation, please feel free to fork the repo and send us pull request
>for changes. We are also looking forward improving our API documentation, 
> so
>pull requests for doc blocks in code are also very welcome!
>
> As CakeFest 2011[5] is near we're encouraging developers to buy tickets
> before the early bird prices are over. We'll have a bunch of surprises to
> show in Manchester this September including certificates for attendees to
> the training workshops, two tracks for talks, lots of international
> speakers, and much more. Make sure you know the schedule[6] if you have not
> yet made up your mind!
>
> A huge thanks to all involved in terms of both contributions through
> commits, tickets, documentation edits, and otherwise contribute to the
> framework. Without you there would be no CakePHP.
> Links
>
>- [1] http://cakephp.org/changelogs/1.3.11
>- [2] http://cakephp.org/changelogs/2.0.0-beta
>- [3] http://cakephp.lighthouseapp.com/projects/42648-cakephp/overview
>- [4] https://github.com/cakephp/docs/
>- [5] http://cakefest.org
>- [6] http://cakefest.org/schedule
>
>  

Re: Where should i contact right people in CakePHP.org because this security critical problem

2011-06-23 Thread Ma';moon
On Thu, Jun 23, 2011 at 3:22 PM, majna  wrote:

> It's not just database.php credentials issue,
> debugger "code and context" can output any code excerpt.
> For example, you may have API_KEY just above some code that produce
> PHP notice,
> and debugger will show your key.
>
> Proposal:
> - add notice in docs and cake "core.php" config
> - enable "code and context" only for dev host (127.0.0.1) or remove it
> (not very useful)
>
+1

> - stop arguing and be polite :)
>
> On Jun 23, 8:47 pm, AD7six  wrote:
> > On Jun 23, 7:41 pm, Miles J  wrote:
> >
> > > What are you talking about, stop trolling. I know that was incorrect,
> > > but that's my point. How are developers supposed to know *which* is
> > > the correct way until they encounter the problem? Its not stated in
> > > the docs, and a new Cake developer isn't going to know any better.
> > > Database credentials, regardless of who's fault it is, should *never*
> > > be displayed in plain text, who's smart idea was that?
> >
> > yours
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 404 error

2011-05-02 Thread Ma';moon
just check the URL http://localhost/cakephp1.3.8/ and see if you get a nice
default welcome page colored and styled, if you get this page then your
mod_rewrite is ON otherwise it will be OFF or not enabled.

Ma'moon

On Mon, May 2, 2011 at 3:51 PM, jyoti bhandari wrote:

> Ma'moom: I actually donno is that on or not. how to figure that out?
>
> On Mon, May 2, 2011 at 6:08 PM, Ma'moon  wrote:
>
>> Can you see the page 
>> "http://localhost/cakephp1.3.8/<http://localhost/cakephp1.3.8/posts/index>"
>> rendered properly with all style sheets elements? are you sure that you have
>> mod_rewrite enabled in your web server's configuration?
>>
>> Ma'moon
>>
>> On Mon, May 2, 2011 at 3:32 PM, jyoti bhandari wrote:
>>
>>> Hi Anand,
>>>
>>> I did not get what u said, can u please elaborate :D
>>>
>>> Thanks
>>> Jyothi
>>>
>>>
>>> On Mon, May 2, 2011 at 5:36 PM, andy_the ultimate baker <
>>> anandghaywankar...@gmail.com> wrote:
>>>
>>>> first write the name of controller before helper
>>>> then ur punching index in url where as there is no need, just punch
>>>> posts
>>>> then in ur action on controller
>>>> write
>>>> print_r($this->data);exit;
>>>> and see waht u get,
>>>> if nothing then check action of the ctp
>>>>
>>>> by
>>>> Anand
>>>>
>>>>
>>>> On May 2, 4:43 pm, jyoti bhandari  wrote:
>>>> > HI,
>>>> >
>>>> > i have created three pages like following
>>>> >
>>>> > I have created model "post,php" within models folder
>>>> >
>>>> > >>> > class Post extends AppModel {
>>>> > var $name = 'Post';}
>>>> >
>>>> > ?>
>>>> >
>>>> > I have created controller "posts_controller.php" within controller
>>>> folder.
>>>> > >>> > class PostsController extends AppController {
>>>> > var $helpers = array('Html', 'Form');
>>>> > var $name = 'Posts';
>>>> > function index() {
>>>> >
>>>> > }
>>>> > }
>>>> >
>>>> > ?>
>>>> >
>>>> > I have created folder called as posts within views.
>>>> > within Posts folder, i have created index.ctp file and these are the
>>>> > contents within that file.
>>>> >
>>>> >  
>>>> > Blog posts
>>>> >
>>>> > After creating all this , i am calling the following url
>>>> >
>>>> > http://localhost/cakephp1.3.8/posts/index
>>>> >
>>>> > This is all situation, now please help me out. It would be gr8 help
>>>> >
>>>> > Thanks
>>>> > Jyothi
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On Mon, May 2, 2011 at 12:22 PM, Ma'moon  wrote:
>>>> > > What is the URL that you are calling in order to render the page?
>>>> >
>>>> > > Ma'moon
>>>> >
>>>> > > On Mon, May 2, 2011 at 8:00 AM, jyoti bhandari <
>>>> jytbhand...@gmail.com>wrote:
>>>> >
>>>> > >> It is already set to 2. :(
>>>> >
>>>> > >> On Mon, May 2, 2011 at 4:48 AM, Ma'moon 
>>>> wrote:
>>>> >
>>>> > >>> in file app/config/core.php change the value of {debug} and set it
>>>> to
>>>> > >>> "2", refresh the page and check if it throws any errors or
>>>> warnings.
>>>> >
>>>> > > On Sun, May 1, 2011 at 7:20 AM, Jo  wrote:
>>>> >
>>>> > >>>> Hi,
>>>> >
>>>> > >>>> I am new to cakephp. I am installing the cakephp and created
>>>> model,
>>>> > >>>> controller and view according to the tutorial. but i am getting
>>>> this
>>>> > >>>> error "The requested URL /cakephp1.3.8/posts/index was not found
>>>> on
>>>> > >>

Re: 404 error

2011-05-02 Thread Ma';moon
Can you see the page
"http://localhost/cakephp1.3.8/<http://localhost/cakephp1.3.8/posts/index>"
rendered properly with all style sheets elements? are you sure that you have
mod_rewrite enabled in your web server's configuration?

Ma'moon

On Mon, May 2, 2011 at 3:32 PM, jyoti bhandari wrote:

> Hi Anand,
>
> I did not get what u said, can u please elaborate :D
>
> Thanks
> Jyothi
>
>
> On Mon, May 2, 2011 at 5:36 PM, andy_the ultimate baker <
> anandghaywankar...@gmail.com> wrote:
>
>> first write the name of controller before helper
>> then ur punching index in url where as there is no need, just punch
>> posts
>> then in ur action on controller
>> write
>> print_r($this->data);exit;
>> and see waht u get,
>> if nothing then check action of the ctp
>>
>> by
>> Anand
>>
>>
>> On May 2, 4:43 pm, jyoti bhandari  wrote:
>> > HI,
>> >
>> > i have created three pages like following
>> >
>> > I have created model "post,php" within models folder
>> >
>> > > > class Post extends AppModel {
>> > var $name = 'Post';}
>> >
>> > ?>
>> >
>> > I have created controller "posts_controller.php" within controller
>> folder.
>> > > > class PostsController extends AppController {
>> > var $helpers = array('Html', 'Form');
>> > var $name = 'Posts';
>> > function index() {
>> >
>> > }
>> > }
>> >
>> > ?>
>> >
>> > I have created folder called as posts within views.
>> > within Posts folder, i have created index.ctp file and these are the
>> > contents within that file.
>> >
>> >  
>> > Blog posts
>> >
>> > After creating all this , i am calling the following url
>> >
>> > http://localhost/cakephp1.3.8/posts/index
>> >
>> > This is all situation, now please help me out. It would be gr8 help
>> >
>> > Thanks
>> > Jyothi
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Mon, May 2, 2011 at 12:22 PM, Ma'moon  wrote:
>> > > What is the URL that you are calling in order to render the page?
>> >
>> > > Ma'moon
>> >
>> > > On Mon, May 2, 2011 at 8:00 AM, jyoti bhandari > >wrote:
>> >
>> > >> It is already set to 2. :(
>> >
>> > >> On Mon, May 2, 2011 at 4:48 AM, Ma'moon  wrote:
>> >
>> > >>> in file app/config/core.php change the value of {debug} and set it
>> to
>> > >>> "2", refresh the page and check if it throws any errors or warnings.
>> >
>> > > On Sun, May 1, 2011 at 7:20 AM, Jo  wrote:
>> >
>> > >>>> Hi,
>> >
>> > >>>> I am new to cakephp. I am installing the cakephp and created model,
>> > >>>> controller and view according to the tutorial. but i am getting
>> this
>> > >>>> error "The requested URL /cakephp1.3.8/posts/index was not found on
>> > >>>> this server." Where in , it exists in the folder. I donno where am
>> i
>> > >>>> getting wrong?
>> >
>> > >>>> Please help me out. It is urgent.
>> >
>> > >>>> Thanks
>> > >>>> Jyothi
>> >
>> > >>>> --
>> > >>>> Our newest site for the community: CakePHP Video Tutorials
>> > >>>>http://tv.cakephp.org
>> > >>>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd
>> > >>>> help others with their CakePHP related questions.
>> >
>> > >>>> To unsubscribe from this group, send email to
>> > >>>> cake-php+unsubscr...@googlegroups.com For more options, visit this
>> > >>>> group athttp://groups.google.com/group/cake-php
>> >
>> > >>>  --
>> > >>> Our newest site for the community: CakePHP Video Tutorials
>> > >>>http://tv.cakephp.org
>> > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd
>> help
>> > >>> others with their CakePHP related questions.
>> >
>> > >>> To unsubscribe from this group, send email to
>> > >>> cake-php+

Re: 404 error

2011-05-01 Thread Ma';moon
What is the URL that you are calling in order to render the page?

Ma'moon

On Mon, May 2, 2011 at 8:00 AM, jyoti bhandari wrote:

> It is already set to 2. :(
>
> On Mon, May 2, 2011 at 4:48 AM, Ma'moon  wrote:
>
>> in file app/config/core.php change the value of {debug} and set it to "2",
>> refresh the page and check if it throws any errors or warnings.
>>
>> On Sun, May 1, 2011 at 7:20 AM, Jo  wrote:
>>
>>> Hi,
>>>
>>> I am new to cakephp. I am installing the cakephp and created model,
>>> controller and view according to the tutorial. but i am getting this
>>> error "The requested URL /cakephp1.3.8/posts/index was not found on
>>> this server." Where in , it exists in the folder. I donno where am i
>>> getting wrong?
>>>
>>> Please help me out. It is urgent.
>>>
>>> Thanks
>>> Jyothi
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php
>>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>
>
> --
> http://picasaweb.google.co.in/jytbhandari/Signature#5495483545646503058
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 404 error

2011-05-01 Thread Ma';moon
in file app/config/core.php change the value of {debug} and set it to "2",
refresh the page and check if it throws any errors or warnings.

On Sun, May 1, 2011 at 7:20 AM, Jo  wrote:

> Hi,
>
> I am new to cakephp. I am installing the cakephp and created model,
> controller and view according to the tutorial. but i am getting this
> error "The requested URL /cakephp1.3.8/posts/index was not found on
> this server." Where in , it exists in the folder. I donno where am i
> getting wrong?
>
> Please help me out. It is urgent.
>
> Thanks
> Jyothi
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How to detect if a model is being loaded or not

2011-04-02 Thread Ma';moon
Thanks a lot :)

On Sat, Apr 2, 2011 at 3:00 PM, cricket  wrote:

> On Sat, Apr 2, 2011 at 12:44 PM, Ma'moon  wrote:
> > Hi,
> > Is there any way to detect if a model is already been loaded or not,
> > something like a method called "$this->isLoaded($modelName)" that you can
> > call from within the controller?
> > Thanks in advance for any help :)
>
> ClassRegistry::isKeySet('ModelName')
>
> http://api.cakephp.org/class/class-registry#method-ClassRegistryisKeySet
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


How to detect if a model is being loaded or not

2011-04-02 Thread Ma';moon
Hi,

Is there any way to detect if a model is already been loaded or not,
something like a method called "$this->isLoaded($modelName)" that you can
call from within the controller?

Thanks in advance for any help :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Performance of CakePHP 2.0

2011-03-23 Thread Ma';moon
1) Have you tried using a bytecode cacher? i think that you should consider
using APC or Xcache if you are not using one of them already!
2) Have you considered using HTML Caching for your site, this will
"seriously" help reducing server processing!

On Wed, Mar 23, 2011 at 1:28 PM, Ziki  wrote:

> My site is not so slow, but if I will have a lot of users this will be
> a problem. Here is image http://dl.dropbox.com/u/905349/loadtimer.png
> of timer for loading the site. Only problem is cake core, and because
> of this I am asking is 2.0 version faster.
>
> On 23 ožu, 14:42, MaxDao  wrote:
> > I have same question about performance, and can't wait till we have
> > more stable version to test it. I have cakephp 1.1 project willing to
> > upgrade, however 1.3 is slower than 1.1
> >
> > On 22 Бер, 15:19, Ziki  wrote:
> >
> > > Hi,
> >
> > > I am developing complex website (business and social network) with
> > > 1.3.6 version and it is pretty slow, maybe it is because my server and
> > > I did all tips and tricks (lazy loader, APC caching, caching queries,
> > > views) but generally it is slow and use more memory especially on the
> > > loading cake files. My question is would 2.0 version will be faster if
> > > I start using it, and does anybody has experienced performance
> > > improving? I think 2.0 should be faster :)
> >
> > > Any comments are welcome.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp Messaging sysytem

2011-02-24 Thread Ma';moon
i just have 2 points to mention for this subject:

1) If you are going to use an RDBMS to store the messages using MySQL then
use `InnoDB` as your table engine instead of `MyISAM`
2) This kind of tables by nature grows faster than the most of the other
tables in terms of records in your system, and hence you will reach a
scalability and performance issues once this table goes for large amount of
data, hence i would recommend considering IMAP for such a task.

i have worked on such an environments before with very high traffic and very
large amount of data and after pulling our hairs off to boost the
performance we saw that IMAP was the best solution ever for this kind of
tasks

Ma'moon

On Wed, Feb 23, 2011 at 8:08 PM, euromark wrote:

> sure
>
> CREATE TABLE IF NOT EXISTS `comm_conversations` (
>  `id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
>  `user_id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
>  `title` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
>  `created` datetime NOT NULL,
>  `last_message_id` int(10) unsigned NOT NULL DEFAULT '0',
>  `allow_add` tinyint(1) unsigned NOT NULL DEFAULT '0',
>  `count` int(10) unsigned NOT NULL DEFAULT '0',
>  PRIMARY KEY (`id`),
>  KEY `user_id` (`user_id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
>
> CREATE TABLE IF NOT EXISTS `comm_conversation_messages` (
>  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>  `conversation_id` char(36) COLLATE utf8_unicode_ci NOT NULL,
>  `user_id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
>  `attachment_id` int(10) unsigned NOT NULL DEFAULT '0',
>  `message` text COLLATE utf8_unicode_ci NOT NULL,
>  `created` datetime NOT NULL,
>  PRIMARY KEY (`id`),
>  KEY `user_id` (`user_id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=109 ;
>
> CREATE TABLE IF NOT EXISTS `comm_conversation_users` (
>  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>  `conversation_id` char(36) COLLATE utf8_unicode_ci NOT NULL,
>  `user_id` char(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
>  `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '0=ok,
> 1=deleted,2=removed',
>  `last_view` int(10) unsigned NOT NULL DEFAULT '0',
>  `created` datetime NOT NULL,
>  PRIMARY KEY (`id`),
>  KEY `user_id` (`user_id`),
>  KEY `conversation_id` (`conversation_id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=110 ;
>
>
>
>
>
> On 23 Feb., 21:31, Josh  wrote:
> > Hey euromark,
> >
> > That looks like exactly what I'm trying to do.  Could you also let us
> know
> > what columns are in each table?  I'm sort of following your logic, but
> not
> > 100% and I think seeing the table columns would help a lot.
> >
> > ~Josh
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: paginating issue

2011-01-20 Thread Ma';moon
Can you post a code sample for what you are trying to accomplish?

On Thu, Jan 20, 2011 at 8:20 AM, OmniproX  wrote:

> Hi all, I wanted to know, if you have ever run into this issue.
>
> I know how to paginate a query from the controller fine.
>
> But how do you paginate a custom array that you created and sent to
> the view?
>
> I used $array = $this->paginate(); and all it did was bring back all
> of the items from the database from that model.
>
> Even while typing that it gave me an idea as to what the issue could
> be...but if you know of a way even if it is view only...please post.
> i would love to see your suggestions :)
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: to Test or not to Test

2011-01-09 Thread Ma';moon
Hemmm, That is true, but i think learning PHPUnit instead of simpleTest has
its own benefits as well, at the end when you learn PHPUnit, simpleTest
"which is being used for Cake1.x user" will be a snap, and i believe that
PHPUnit is going to be the standard automated testing platform adopted by
CakePHP 2.x, above this and that i am only throwing my 5 cints :)

On Sun, Jan 9, 2011 at 6:23 PM, euromark  wrote:

> the problem with the book is that its mainly phpunit specific
> not a good resource for a cake1.x user which wants to start off
> testing :)
>
> On 9 Jan., 11:24, "Ma'moon"  wrote:
> > Here is very good book for unit testing, i suggest you start reading it
> > instead of reading tuts or articles in a separated manner:
> http://www.limespace.de/wp-content/uploads/2009/12/practical-php-test...
> > You can legally use the book and distribute it :)
> >
> >
> >
> >
> >
> >
> >
> > On Sun, Jan 9, 2011 at 5:13 AM, netusco  wrote:
> > > thanks! ok you convinced me at least to give it a try.
> > > I guess what I would like to find is a blog that could explain well
> > > all the parts needed to develop apps correctly, as I just find things
> > > here and there and I have to figure out if I need to implement them or
> > > not. Probably because I never worked for a "boss" in development
> >
> > > On 9 jan, 00:35, nurvzy  wrote:
> > > > Testing is essential for any application you intend on maintaining or
> > > > will be passing between developers.
> >
> > > > In regards to click testing, sure -- test your app yourself, if you
> > > > only do it once you've saved time by not writing the test.  But now
> > > > lets say you then refactor a bit/add a new feature.  Well now you
> need
> > > > to verify all the stuff that was working before still works.  So you
> > > > hand test your app again and now you're officially wasting time.  Had
> > > > you just taken the extra few minutes to script your test you'd always
> > > > be able to run it anytime you needed to reassure yourself (or your
> > > > boss/client) that things are working.  Say you make another change,
> > > > and now you have to go back and test by hand again.  Now you're
> > > > wasting your time and your boss's/client's money.  Your time is your
> > > > own to waste, but you won't be in business long if you're in the
> habit
> > > > of wasting your boss's money.   By not scripting the tests you'd
> > > > otherwise do by hand that's exactly what you're doing -- wasting
> > > > resources.
> >
> > > > That's not to say 100% coverage is the only way, but certainly test
> > > > things that have broken before, are key parts of your application,
> and
> > > > specs written by your employer/client.  At the end of the day, by
> > > > testing your app you'll gain more confidence in your app, the fear of
> > > > refactoring will be gone and you actually have something to show your
> > > > boss/client that it works the way they specified.
> >
> > > > Testing isn't a waste of time, *NOT* testing your application is a
> > > > waste of time.
> >
> > > > Nick
> >
> > > > On Jan 8, 8:01 am, netusco  wrote:
> >
> > > > > thanks, I appreciate the answers and I understand them but seen the
> > > > > amount of work needed on testing... isn't it faster to just test
> your
> > > > > app directly and debug when there's errors on it? I've been doing
> like
> > > > > this so far.. But I wonder if I should change that habit.
> >
> > > > > On 7 jan, 20:06, euromark  wrote:
> >
> > > > > > you are partly wrong
> >
> > > > > > for small apps the amount of time needed for complete code
> coverage
> > > > > > and full web test cases
> > > > > > is far too much compared to the value.
> > > > > > it would be wonderful, but we simply dont have the resources
> >
> > > > > > so test the stuff that is tested the quickest, test the stuff
> that
> > > can
> > > > > > easily break or go wrong
> > > > > > thats it, high coverage with low time costs.
> >
> > > > > > this way you have a tradeoff between those to variables
> > > > > > and it already helps MORE than not using 

Re: to Test or not to Test

2011-01-09 Thread Ma';moon
Here is very good book for unit testing, i suggest you start reading it
instead of reading tuts or articles in a separated manner:
http://www.limespace.de/wp-content/uploads/2009/12/practical-php-testing.pdf
You can legally use the book and distribute it :)

On Sun, Jan 9, 2011 at 5:13 AM, netusco  wrote:

> thanks! ok you convinced me at least to give it a try.
> I guess what I would like to find is a blog that could explain well
> all the parts needed to develop apps correctly, as I just find things
> here and there and I have to figure out if I need to implement them or
> not. Probably because I never worked for a "boss" in development
>
> On 9 jan, 00:35, nurvzy  wrote:
> > Testing is essential for any application you intend on maintaining or
> > will be passing between developers.
> >
> > In regards to click testing, sure -- test your app yourself, if you
> > only do it once you've saved time by not writing the test.  But now
> > lets say you then refactor a bit/add a new feature.  Well now you need
> > to verify all the stuff that was working before still works.  So you
> > hand test your app again and now you're officially wasting time.  Had
> > you just taken the extra few minutes to script your test you'd always
> > be able to run it anytime you needed to reassure yourself (or your
> > boss/client) that things are working.  Say you make another change,
> > and now you have to go back and test by hand again.  Now you're
> > wasting your time and your boss's/client's money.  Your time is your
> > own to waste, but you won't be in business long if you're in the habit
> > of wasting your boss's money.   By not scripting the tests you'd
> > otherwise do by hand that's exactly what you're doing -- wasting
> > resources.
> >
> > That's not to say 100% coverage is the only way, but certainly test
> > things that have broken before, are key parts of your application, and
> > specs written by your employer/client.  At the end of the day, by
> > testing your app you'll gain more confidence in your app, the fear of
> > refactoring will be gone and you actually have something to show your
> > boss/client that it works the way they specified.
> >
> > Testing isn't a waste of time, *NOT* testing your application is a
> > waste of time.
> >
> > Nick
> >
> > On Jan 8, 8:01 am, netusco  wrote:
> >
> > > thanks, I appreciate the answers and I understand them but seen the
> > > amount of work needed on testing... isn't it faster to just test your
> > > app directly and debug when there's errors on it? I've been doing like
> > > this so far.. But I wonder if I should change that habit.
> >
> > > On 7 jan, 20:06, euromark  wrote:
> >
> > > > you are partly wrong
> >
> > > > for small apps the amount of time needed for complete code coverage
> > > > and full web test cases
> > > > is far too much compared to the value.
> > > > it would be wonderful, but we simply dont have the resources
> >
> > > > so test the stuff that is tested the quickest, test the stuff that
> can
> > > > easily break or go wrong
> > > > thats it, high coverage with low time costs.
> >
> > > > this way you have a tradeoff between those to variables
> > > > and it already helps MORE than not using it at all - even if the time
> > > > to write the tests wasn't that big of a deal.
> > > > as soon as you have more time you can work on the coverage task
> again.
> >
> > > > but testing itself is a must!
> >
> > > > On 7 Jan., 15:52, Joshua Muheim  wrote:
> >
> > > > > Dear netusco
> >
> > > > > I know exactly what you mean - most CakePHP tutorials about testing
> > > > > aren't that great; they expect you already have plenty of ideas on
> why
> > > > > testing is good, and they only explain how in theory you can use
> the
> > > > > SimpleTest library to test your CakePHP apps the same way you have
> > > > > already tested a dozen of apps before with other testing
> frameworks.
> >
> > > > > YOU SHOULD REALLY DO TESTING. That's what I really want to entrust
> to
> > > > > you. But I agree with you: the examples from the cook book aren't
> very
> > > > > authentic. Such fine-grained testing you want to do when you are
> e.g.
> > > > > creating a library that absolutely relies on every part of itself
> and
> > > > > that you have written yourself, so you can't rely on the idea that
> > > > > anybody else has already done the biggest parts of testing for you.
> >
> > > > > When using a good framework like CakePHP, you can rely on exactly
> > > > > that: most of the functionalities are tested and have proven to
> work.
> > > > > So you don't really need to test *everything* in your application,
> if
> > > > > you don't want to, but you should take a pragmatic approach to
> testing
> > > > > it in a way you have a good cost/benefit balance.
> >
> > > > > If you really don't want to much testing, then I suggest you use at
> > > > > least the scriptable browser of SimpleTest. This way you can check
> > > > > with very small effort whether the main parts of you

Re: Auth password hash help

2011-01-04 Thread Ma';moon
$this->data['User']['password'] gets hashed automatically from Auth
component, you don't need to hash it cause it will be already hashed, if you
don't want to have such a behavior try renaming your password form field to
be something other than "password", say "passPhrase" or something else

On Sun, Jan 2, 2011 at 2:19 PM, mworkman  wrote:

> I am trying to get the Auth component to work.  I am saving a user
> password using both password() and hashPassword:
> $password = $this->data['User']['password'];
> $password = $this->Auth->password($password);
> $this->data['User']['password'] = $this->Auth->password($password);
> //$this->data = $this->Auth->hashPasswords($this->data);
> $this->User->save($this->data);
>
> This gives 1 value for the password, but when I try to login it
> searches for a different value for the password.  I don't know what is
> wrong.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Short Names Navigation (like Twitter and Facebook)

2010-12-21 Thread Ma';moon
Check out the sluggable behavior
http://bakery.cakephp.org/articles/mariano/2007/03/24/sluggable-behavior

On Wed, Dec 22, 2010 at 1:23 AM, tcornett  wrote:

> I am trying to get an app to work with Twitter-like and Facebook-like short
> names for navigation (like http://twitter.com/) where  is a value
> referenced in the database.
>
> Where should I be looking to do the URL manipulation?  I am having trouble
> getting to the request prior to the normal CakePHP Framework behavior which
> will return 'No Such Controller'.
>
> I can handle the development, just a little confused on where I need to
> look in the process when Cake breaks down the URL request.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-18 Thread Ma';moon
First, why you are not using Auth component? this will make your life a lot
easier!
Second, what are your validation rules?

On Sun, Dec 19, 2010 at 8:12 AM, John Maxim  wrote:

> Modified function code: (NEW)
>
> function register()
>{
>  if (!empty($this->data))
>  {
>$this->data['User']['password'] =
> md5($this->data['User']
> ['password']);
>
>if ($this->User->save($this->data))
>
>{
>  $this->Session->setFlash('Your
> registration information was
> accepted.');
>  $this->Session->write('user',
> $this->data['User']['username']);
>  $this->redirect(array('action' =>
> 'index'), null, true);
>
>}else{
>$this->data['User']['password'] = '';
>$this->Session->setFlash('There was a problem saving
> this information');
>}
>  }
>}
>
> 
> Hi guys, after modifying to suit the above codes, my register page
> does not validate the password field anymore. The previous code is as
> below:
>
> Previous function code: (OLD)
>
>
>function register()
>{
>  if (!empty($this->data))
>  {
>if ($this->User->save($this->data))
>{
>  $this->Session->setFlash('Your
> registration information was
> accepted.');
>}
>  }
>}
>
> *
> Using this, validations are fine. Can anyone explains where went wrong
> with the modified function code ? It's important to hash the password
> and automatically directing to index page after registering
> successfully, can't continue with this tutorial if stuck right
> here
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Hello

2010-12-12 Thread Ma';moon
How about google? its a very good search engine and works really well in
such cases :)

On Fri, Dec 10, 2010 at 10:17 PM, a.g.p.  wrote:

>  Hi, does anybody can tell me how to show a video on a website with php,
> once it has been uploaded into the server?
> Thanks!
> -
> Crea tus propias redes de amigos.
> Sin limitaciones ni restricciones.
> Libérate de publicaciones de desconocidos
> Llego http://www.friend2friend.com.ar
> Te invito a descubrirlo!
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: use APC & Memcached at the same tim

2010-12-06 Thread Ma';moon
I am curious as on why you would need to "cache variables" using APC or any
other caching engine, can you provide a case for this usage?

On Mon, Dec 6, 2010 at 7:58 AM, pang  wrote:

> Ok,now I know opcode is enabled automatically when apc is on.
>
> I guess why cakephp has a apc section is because:  apc also provide
> the ability to cache variables, so if  we need to cache variable by
> apc, it requires code changes.
>
> The question now is :  if I want to separate variable caching, like
> what facebook does:  cache local variables in apc, while caching
> database query by memcached. how could this be done as both apc and
> memcached need to be configured and class "Cache" is the only handler
> for cakephp cache?
>
> If I want to use both apc and memcache, does that mean I have to
> create a extra  Cache handler for apc and assign the default handler
> "Cache" for memcached, or vise versa ??
>
> On Dec 6, 11:55 am, "Ma'moon"  wrote:
> > I am not really sure why we do have an APC section in core.php, APC
> should
> > run automatically and it doesn't really need any code changes to have it
> > running, the other caching engines need to be configured in core.php,
> AFAIK!
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Dec 6, 2010 at 5:51 AM, pang  wrote:
> > > you mean I don't even have to enable apc in core config file ??
> >
> > > On Dec 3, 7:32 pm, Miles J  wrote:
> > > > Install APC and memcache. APC will run automatically and cache your
> > > > opcode.
> >
> > > > Use memcache on the CakePHP side to cache query data.
> >
> > > > On Dec 3, 6:04 am, "Ma'moon"  wrote:
> >
> > > > > All configuration items that you need to edit takes place in
> > > "core.php",
> > > > > right there you will have the ability to enable, disable, and/or
> > > configure
> > > > > your caching engines/levels
> >
> > > > > On Fri, Dec 3, 2010 at 3:07 PM, pang  wrote:
> > > > > > Thank you for your answer. I know that apc and memcache has
> different
> > > > > > usage, I can make them working respectively in Cake.
> >
> > > > > > But I don't know how to configure to make them working together.
> Do
> > > > > > you know how to do it?
> >
> > > > > > On Dec 3, 1:14 pm, "Ma'moon"  wrote:
> > > > > > > APC performs (byte code caching or intermediate code) which
> means
> > > that it
> > > > > > > caches the binary form of your PHP script and once this script
> is
> > > being
> > > > > > > called, the cached version of the script is the one that will
> be
> > > > > > executed,
> > > > > > > this will save a lot of performance and server resources, on
> the
> > > other
> > > > > > hand,
> > > > > > > memcached is being used to cache objects of several forms, like
> > > caching
> > > > > > the
> > > > > > > results of a database query "a model operation in CakePHP's
> case",
> > > an
> > > > > > array,
> > > > > > > or someother forms of objects, you can use both of them for
> your
> > > > > > application
> > > > > > > caching, each for its own task, take a look here to configure
> the
> > > desired
> > > > > > > cache engines that you would like to use in your CakePHP
> > > > > > applicationhttp://book.cakephp.org/view/156/Caching
> >
> > > > > > > On Fri, Dec 3, 2010 at 12:16 PM, pang  wrote:
> > > > > > > > CakePHP offer both APC and Memcached cache engine for cache
> > > purpose,
> > > > > > > > but each of them has different preferred usage,
> > > > > > > > I am wondering is it possible to config Cake to work with
> both of
> > > > > > > > them? and how can It be achieved?
> >
> > > > > > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelp
> > > > > > others
> > > > > > > > with their CakePHP related questions.
> >
> > > > > > > > You received this message because you are subscribed to the
> > > Google
> > > > > > Groups
> > > > > > > > "CakePHP" g

Re: Using or not using PHP framework

2010-12-06 Thread Ma';moon
Just take a look at the name, its simply CAKE :-)

On Mon, Dec 6, 2010 at 1:22 PM, burzum  wrote:

> I disagree that you have to invest 100 hours learning in the begining
> if you already know PHP.
>
> When I started using CakePHP I migrated a project that was already two
> month in development to CakePHP in just two weeks. Sure I did not
> learn everything in this two weeks but it's easy to learn as you go in
> my opinion and it worked out very well.
>
> On 4 Dez., 10:28, Rumkuchen  wrote:
> > invest 100 hours learning overhead at the beginning -> then you are as
> > fast as without cake.
> > invest another 50 hours of hard experience -> then you are 10 times
> > faster.
> > It is hard at the beginning, but there is an enormous return of time
> > intested.
> > see it as an advantage, that the documentation is not 100% clear, some
> > parts could be better and so on and so on.
> > But: all this hurdles will help you understanding the framework.
> >
> > On 4 Dez., 03:55, Raj  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > hmmThanks so much for the great advice!
> >
> > > On Dec 3, 1:59 pm, Joshua Muheim  wrote:
> >
> > > > Funny, I first learned Ruby On Rails, too, and then dove into CakePHP
> > > > (because at my current job they don't know anything about a
> > > > programming language called Ruby... sadly). I first had quite some
> > > > struggles because I was used to the comfort of RoR and really missed
> > > > some stuff in CakePHP, but now I have acclimated quite well and I
> have
> > > > to say that CakePHP is quite cool for the PHP language. :-)
> >
> > > > On Fri, Dec 3, 2010 at 9:45 AM, Stephen <
> step...@ninjacodermonkey.co.uk> wrote:
> >
> > > > >> I have stopped working without a framework in the background years
> > > > >> ago, and I only can recommend it. There's SO much stuff you don't
> even
> > > > >> know about that's handled by a good framework in the background
> (all
> > > > >> sorts of hacking-attempts is taken care of, for example), and with
> a
> > > > >> good plugin system your application can probably use great blocks
> of
> > > > >> code you've developed before or somebody else has already
> developed.
> >
> > > > >> I only know CakePHP in the PHP world, so I'm not up to date what
> else
> > > > >> is on the market there, but CakePHP really seems to be a good
> > > > >> framework to start with. And what can't hurt, too, is to check out
> a
> > > > >> framework in another language from time to time... I can only
> suggest
> > > > >> you check out Ruby on Rails (Ruby), Django (Python) or Seaside
> > > > >> (Smalltalk). You can learn A LOT from such "other worlds". You
> will be
> > > > >> quite embarassed and feel like you have been "naive" before after
> > > > >> having done it. It's clearly an enlighting... Somehow it can be
> > > > >> compared to taking a virtual drug that opens your consciousness.
> LSD
> > > > >> for programmers! ;-)
> >
> > > > > Likewise, and I completely agree.
> >
> > > > > I did dive into CakePHP some years ago and ended up being baffled
> and
> > > > > confused because I didn't know anything about objects never mind
> MVC.
> >
> > > > > I got roped into doing a RoR project in a previous job, then I
> tackled
> > > > > CakePHP again and I never code without a framework anymore
> >
> > > > > Kind Regards
> > > > >  Stephen
> >
> > > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelpothers
> > > > > with their CakePHP related questions.
> >
> > > > > 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
> > > > > cake-php+unsubscr...@googlegroups.comFor
> > > > >  more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: use APC & Memcached at the same tim

2010-12-06 Thread Ma';moon
I am not really sure why we do have an APC section in core.php, APC should
run automatically and it doesn't really need any code changes to have it
running, the other caching engines need to be configured in core.php, AFAIK!

On Mon, Dec 6, 2010 at 5:51 AM, pang  wrote:

> you mean I don't even have to enable apc in core config file ??
>
> On Dec 3, 7:32 pm, Miles J  wrote:
> > Install APC and memcache. APC will run automatically and cache your
> > opcode.
> >
> > Use memcache on the CakePHP side to cache query data.
> >
> > On Dec 3, 6:04 am, "Ma'moon"  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > All configuration items that you need to edit takes place in
> "core.php",
> > > right there you will have the ability to enable, disable, and/or
> configure
> > > your caching engines/levels
> >
> > > On Fri, Dec 3, 2010 at 3:07 PM, pang  wrote:
> > > > Thank you for your answer. I know that apc and memcache has different
> > > > usage, I can make them working respectively in Cake.
> >
> > > > But I don't know how to configure to make them working together. Do
> > > > you know how to do it?
> >
> > > > On Dec 3, 1:14 pm, "Ma'moon"  wrote:
> > > > > APC performs (byte code caching or intermediate code) which means
> that it
> > > > > caches the binary form of your PHP script and once this script is
> being
> > > > > called, the cached version of the script is the one that will be
> > > > executed,
> > > > > this will save a lot of performance and server resources, on the
> other
> > > > hand,
> > > > > memcached is being used to cache objects of several forms, like
> caching
> > > > the
> > > > > results of a database query "a model operation in CakePHP's case",
> an
> > > > array,
> > > > > or someother forms of objects, you can use both of them for your
> > > > application
> > > > > caching, each for its own task, take a look here to configure the
> desired
> > > > > cache engines that you would like to use in your CakePHP
> > > > applicationhttp://book.cakephp.org/view/156/Caching
> >
> > > > > On Fri, Dec 3, 2010 at 12:16 PM, pang  wrote:
> > > > > > CakePHP offer both APC and Memcached cache engine for cache
> purpose,
> > > > > > but each of them has different preferred usage,
> > > > > > I am wondering is it possible to config Cake to work with both of
> > > > > > them? and how can It be achieved?
> >
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > > with their CakePHP related questions.
> >
> > > > > > 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
> > > > > > cake-php+unsubscr...@googlegroups.com
> 
> > > > For more options, visit
> this
> > > > group at
> > > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> others
> > > > with their CakePHP related questions.
> >
> > > > 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
> > > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma';moon
in the same link that you provided, check the comments for more details

On Sun, Dec 5, 2010 at 4:14 PM, Bart  wrote:

> This is what I'm referring to:
> http://book.cakephp.org/view/348/Clearing-the-Cache
>
> (couldn't find it earlier, sorry)
>
>
>
> On Dec 5, 10:03 pm, Bart  wrote:
> > It's not Cache:write() that is not behaving as expected.
> >
> > It's $this->Post->save() that is not behaving as expected.
> > I expect it to delete all cache-files that are related to that
> > particular Post.
> > But it doesn't.
> >
> > On Dec 5, 9:22 pm, "Ma'moon"  wrote:
> >
> > > If the cache file does exist && not expired then CakePHP won't
> overwrite it
> > > until "at least" one of those 2 conditions remains true, otherwise you
> have
> > > to manually delete the cache file and create it, your save operation is
> not
> > > changing any of those 2 conditions (removing the original cache file or
> > > changing its expiry) and hence Cache::write won't behave as you
> expected!
> > > On the other hand, as soon as the target cache file gets expired,
> > > Cache::write() will automatically overwrite the file with the new
> content!
> >
> > > On Sun, Dec 5, 2010 at 2:57 PM, Bart 
> wrote:
> > > > Extra context: writing the cache happens only in the view-action,
> when
> > > > a visitor sees the blog.
> > > > I'm not trying to write during the edit-action, I only save/update to
> > > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > > separate actions.
> >
> > > > I simply expected the cache to be deleted on $this->Post->save();
> > > > Has this changed since 1.2?
> >
> > > Because then the cache-file got deleted automatically on $this->Post-
> >
> > > > >save();
> > > > (AND when it expired, but that's a less relevant here).
> >
> > > > thanks for your reaction!
> > > > I will try it.
> >
> > > > bart
> >
> > > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > > Cache files needs to be explicitly deleted by calling
> Cache::delete() ,
> > > > make
> > > > > sure to call it BEFORE calling Cache::write()
> >
> > > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart 
> wrote:
> > > > > > Yes, definately. The cache-file is already created (because of
> > > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > > The way I write the cache is as follows :
> >
> > > > > > $post = null;
> > > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > > >$post = $this->Post->find('first',
> > > > > > array(  'conditions'=>array('Post.id'=>$id,
> 'Post.published'=>true),
> >
> > > > > >'contain'=>array(
> >
> > > > > >'ChildPost' => array(
> >
> > > > > >'conditions'
> =>
> > > > > > array('published'=>true),
> >
> > > >  'Author','Attachment'
> >
> > > > > >
>  ),'Category','Attachment') )
> > > > );
> > > > > >Cache::write('post_'.$id, $post);
> > > > > > }
> > > > > > $this->set('post',$post);
> >
> > > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > > Are you sure that you are calling Cache::write() ?
> >
> > > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart <
> bart.gloudem...@gmail.com>
> > > > wrote:
> > > > > > > > Hi,
> >
> > > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > > I'm caching queries that retrieve single Posts in my
> controller.
> > > > The
> > > > > > > > cache files are created nicely and I use the default
> > > > Cache::config().
> > > > > > > > Now I expect my cache component to delete the cache file as
> soon as
> > > > I
> > > > > > > > edit and save the p

Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma';moon
cach engines provided by CakePHP caches the results of a model operation, a
suitable use for this case involves caching the results of a heavy DB query,
"view caching" on the other hand is separated subject, view caching is not
done through the cache engines because the format of the cached data in a
view cannot be "json encoded" as it is in the format of an array or an
object, i hope you can read my point

// are engines unsuitable for storing view files. To clear


On Sun, Dec 5, 2010 at 4:14 PM, Bart  wrote:

> This is what I'm referring to:
> http://book.cakephp.org/view/348/Clearing-the-Cache
>
> (couldn't find it earlier, sorry)
>
>
>
> On Dec 5, 10:03 pm, Bart  wrote:
> > It's not Cache:write() that is not behaving as expected.
> >
> > It's $this->Post->save() that is not behaving as expected.
> > I expect it to delete all cache-files that are related to that
> > particular Post.
> > But it doesn't.
> >
> > On Dec 5, 9:22 pm, "Ma'moon"  wrote:
> >
> > > If the cache file does exist && not expired then CakePHP won't
> overwrite it
> > > until "at least" one of those 2 conditions remains true, otherwise you
> have
> > > to manually delete the cache file and create it, your save operation is
> not
> > > changing any of those 2 conditions (removing the original cache file or
> > > changing its expiry) and hence Cache::write won't behave as you
> expected!
> > > On the other hand, as soon as the target cache file gets expired,
> > > Cache::write() will automatically overwrite the file with the new
> content!
> >
> > > On Sun, Dec 5, 2010 at 2:57 PM, Bart 
> wrote:
> > > > Extra context: writing the cache happens only in the view-action,
> when
> > > > a visitor sees the blog.
> > > > I'm not trying to write during the edit-action, I only save/update to
> > > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > > separate actions.
> >
> > > > I simply expected the cache to be deleted on $this->Post->save();
> > > > Has this changed since 1.2?
> >
> > > Because then the cache-file got deleted automatically on $this->Post-
> >
> > > > >save();
> > > > (AND when it expired, but that's a less relevant here).
> >
> > > > thanks for your reaction!
> > > > I will try it.
> >
> > > > bart
> >
> > > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > > Cache files needs to be explicitly deleted by calling
> Cache::delete() ,
> > > > make
> > > > > sure to call it BEFORE calling Cache::write()
> >
> > > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart 
> wrote:
> > > > > > Yes, definately. The cache-file is already created (because of
> > > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > > The way I write the cache is as follows :
> >
> > > > > > $post = null;
> > > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > > >$post = $this->Post->find('first',
> > > > > > array(  'conditions'=>array('Post.id'=>$id,
> 'Post.published'=>true),
> >
> > > > > >'contain'=>array(
> >
> > > > > >'ChildPost' => array(
> >
> > > > > >'conditions'
> =>
> > > > > > array('published'=>true),
> >
> > > >  'Author','Attachment'
> >
> > > > > >
>  ),'Category','Attachment') )
> > > > );
> > > > > >Cache::write('post_'.$id, $post);
> > > > > > }
> > > > > > $this->set('post',$post);
> >
> > > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > > Are you sure that you are calling Cache::write() ?
> >
> > > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart <
> bart.gloudem...@gmail.com>
> > > > wrote:
> > > > > > > > Hi,
> >
> > > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > > I'm 

Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma';moon
If the cache file does exist && not expired then CakePHP won't overwrite it
until "at least" one of those 2 conditions remains true, otherwise you have
to manually delete the cache file and create it, your save operation is not
changing any of those 2 conditions (removing the original cache file or
changing its expiry) and hence Cache::write won't behave as you expected!
On the other hand, as soon as the target cache file gets expired,
Cache::write() will automatically overwrite the file with the new content!

On Sun, Dec 5, 2010 at 2:57 PM, Bart  wrote:

> Extra context: writing the cache happens only in the view-action, when
> a visitor sees the blog.
> I'm not trying to write during the edit-action, I only save/update to
> the model. So the Cache::write() and $this->Post->save() happen in 2
> separate actions.
>
> I simply expected the cache to be deleted on $this->Post->save();
> Has this changed since 1.2?
>
Because then the cache-file got deleted automatically on $this->Post-
> >save();
> (AND when it expired, but that's a less relevant here).
>
> thanks for your reaction!
> I will try it.
>
> bart
>
>
> On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > Cache files needs to be explicitly deleted by calling Cache::delete() ,
> make
> > sure to call it BEFORE calling Cache::write()
> >
> > On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:
> > > Yes, definately. The cache-file is already created (because of
> > > Cache::write() ) and I can see it appear in my filesystem.
> > > The way I write the cache is as follows :
> >
> > > $post = null;
> > > if( ($post = Cache::read('post_'.$id)) === false ){
> > >$post = $this->Post->find('first',
> > > array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
> >
> > >'contain'=>array(
> >
> > >'ChildPost' => array(
> >
> > >'conditions' =>
> > > array('published'=>true),
> >
> > >
>  'Author','Attachment'
> >
> > >),'Category','Attachment') )
> );
> > >Cache::write('post_'.$id, $post);
> > > }
> > > $this->set('post',$post);
> >
> > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > Are you sure that you are calling Cache::write() ?
> >
> > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart 
> wrote:
> > > > > Hi,
> >
> > > > > I'm using CakePHP 1.3.6.
> > > > > I'm caching queries that retrieve single Posts in my controller.
> The
> > > > > cache files are created nicely and I use the default
> Cache::config().
> > > > > Now I expect my cache component to delete the cache file as soon as
> I
> > > > > edit and save the post. But that doesn't happen.
> >
> > > > > I have tried all debug modes (0,1,2)
> > > > > I also tried to use the syntax where the id of the Post is included
> in
> > > > > the data-array or when it is delivered by saying:
> > > > > $this->Post->id = $id;
> > > > > prior to the save action.
> > > > > The cache files that are created have permission code 666. (might
> that
> > > > > be the problem?)
> >
> > > > > Does anyone have an idea what's going wrong?
> > > > > Thanks a lot!
> > > > > Bart
> >
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others
> > > > > with their CakePHP related questions.
> >
> > > > > 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
> > > > > cake-php+unsubscr...@googlegroups.com
> 
> >
> > > 
> 
> >>For
> > > more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You re

Re: Memcache Set up Help

2010-12-05 Thread Ma';moon
Its very obviouse that this is a none CakePHP related issue, anyhow, i
suggest giving google a try on how to install memcached on centos, the whole
thing that you are facing is that memcached is not installed in your server,
make sure to have it installed, make sure that the deamon is running, and
finally make sure that you have selected memcached as you caching engine in
core.php

On Sat, Dec 4, 2010 at 8:59 PM, Dave Maharaj  wrote:

> Its just never there.
>
> /etc/init.d/memcached restart
> -bash: /etc/init.d/memcached: No such file or directory
> Added extension=memcache.so to php.ini even found a tip on google to make a
> memcache.ini tried that and same result.
>
> It goes thru installing. Its there in the server...its in phpinfo it just
> will not run.
>
> I wipped the server completely back to new and tried this is the 6th time
> and same thing.
>
> Completely frustrated with this foolishness.
>
> memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody
> -bash: memcached: command not found
>
> So see if MT ever gets back to me either...
>
> Thanks,
>
> Dave
>
> -Original Message-
> From: Miles J [mailto:mileswjohn...@gmail.com]
> Sent: December-04-10 10:17 PM
> To: CakePHP
> Subject: Re: Memcache Set up Help
>
> Have you tried running:
>
> /etc/init.d/memcached restart
>
> Or startup (i think)
>
> On Dec 4, 2:45 pm, cricket  wrote:
> > On Sat, Dec 4, 2010 at 4:18 PM, Dave Maharaj 
> wrote:
> > > Thanks for your help Cricket and Miles...really appreciated!
> >
> > > So telnet localhost 11211 returns Connection refused.
> >
> > > I am on media temple and follow
> > >http://kb.mediatemple.net/questions/1693/Installing+memcached
> >
> > > I run make test after the install goes thru like the command says which
> says
> > > build successful make bogus test (no idea what that is)
> >
> > > /etc/init.d/memcached status returns
> >
> > > -bash: /etc/init.d/memcached: No such file or directory
> >
> > > I am on Linux CentOs
> >
> > > So its there installed since I see it in phpinfo but not running
> obviously.
> >
> > > When I run  memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody I get
> > > -bash: memcached: command not found
> >
> > > I am looged in as root thru the shell so everything is at admin level.
> Just
> > > lost here. Something not going as planned that’s forsure.
> >
> > > Any other ideas to try guys?
> >
> > Search online for "centos memcached"?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma';moon
Cache files needs to be explicitly deleted by calling Cache::delete() , make
sure to call it BEFORE calling Cache::write()

On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:

> Yes, definately. The cache-file is already created (because of
> Cache::write() ) and I can see it appear in my filesystem.
> The way I write the cache is as follows :
>
> $post = null;
> if( ($post = Cache::read('post_'.$id)) === false ){
>$post = $this->Post->find('first',
> array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
>
>'contain'=>array(
>
>'ChildPost' => array(
>
>'conditions' =>
> array('published'=>true),
>
>'Author','Attachment'
>
>),'Category','Attachment') ) );
>Cache::write('post_'.$id, $post);
> }
> $this->set('post',$post);
>
> On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > Are you sure that you are calling Cache::write() ?
> >
> > On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:
> > > Hi,
> >
> > > I'm using CakePHP 1.3.6.
> > > I'm caching queries that retrieve single Posts in my controller. The
> > > cache files are created nicely and I use the default Cache::config().
> > > Now I expect my cache component to delete the cache file as soon as I
> > > edit and save the post. But that doesn't happen.
> >
> > > I have tried all debug modes (0,1,2)
> > > I also tried to use the syntax where the id of the Post is included in
> > > the data-array or when it is delivered by saying:
> > > $this->Post->id = $id;
> > > prior to the save action.
> > > The cache files that are created have permission code 666. (might that
> > > be the problem?)
> >
> > > Does anyone have an idea what's going wrong?
> > > Thanks a lot!
> > > Bart
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma';moon
Are you sure that you are calling Cache::write() ?

On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:

> Hi,
>
> I'm using CakePHP 1.3.6.
> I'm caching queries that retrieve single Posts in my controller. The
> cache files are created nicely and I use the default Cache::config().
> Now I expect my cache component to delete the cache file as soon as I
> edit and save the post. But that doesn't happen.
>
> I have tried all debug modes (0,1,2)
> I also tried to use the syntax where the id of the Post is included in
> the data-array or when it is delivered by saying:
> $this->Post->id = $id;
> prior to the save action.
> The cache files that are created have permission code 666. (might that
> be the problem?)
>
> Does anyone have an idea what's going wrong?
> Thanks a lot!
> Bart
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: use APC & Memcached at the same tim

2010-12-03 Thread Ma';moon
All configuration items that you need to edit takes place in "core.php",
right there you will have the ability to enable, disable, and/or configure
your caching engines/levels

On Fri, Dec 3, 2010 at 3:07 PM, pang  wrote:

> Thank you for your answer. I know that apc and memcache has different
> usage, I can make them working respectively in Cake.
>
> But I don't know how to configure to make them working together. Do
> you know how to do it?
>
> On Dec 3, 1:14 pm, "Ma'moon"  wrote:
> > APC performs (byte code caching or intermediate code) which means that it
> > caches the binary form of your PHP script and once this script is being
> > called, the cached version of the script is the one that will be
> executed,
> > this will save a lot of performance and server resources, on the other
> hand,
> > memcached is being used to cache objects of several forms, like caching
> the
> > results of a database query "a model operation in CakePHP's case", an
> array,
> > or someother forms of objects, you can use both of them for your
> application
> > caching, each for its own task, take a look here to configure the desired
> > cache engines that you would like to use in your CakePHP
> applicationhttp://book.cakephp.org/view/156/Caching
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Dec 3, 2010 at 12:16 PM, pang  wrote:
> > > CakePHP offer both APC and Memcached cache engine for cache purpose,
> > > but each of them has different preferred usage,
> > > I am wondering is it possible to config Cake to work with both of
> > > them? and how can It be achieved?
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: use APC & Memcached at the same tim

2010-12-03 Thread Ma';moon
APC performs (byte code caching or intermediate code) which means that it
caches the binary form of your PHP script and once this script is being
called, the cached version of the script is the one that will be executed,
this will save a lot of performance and server resources, on the other hand,
memcached is being used to cache objects of several forms, like caching the
results of a database query "a model operation in CakePHP's case", an array,
or someother forms of objects, you can use both of them for your application
caching, each for its own task, take a look here to configure the desired
cache engines that you would like to use in your CakePHP application
http://book.cakephp.org/view/156/Caching

On Fri, Dec 3, 2010 at 12:16 PM, pang  wrote:

> CakePHP offer both APC and Memcached cache engine for cache purpose,
> but each of them has different preferred usage,
> I am wondering is it possible to config Cake to work with both of
> them? and how can It be achieved?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Security Risks on gif image upload?

2010-12-03 Thread Ma';moon
Am sorry, i mean to say "From Users Side" :)
And no, am not using any plugins for that, i have my own implementation for
file upload in CakePHP, basically you would do something like:
exec('convert input_file_path output_file_path');
in order to convert an image, you can also use imagemagick driver if you
have it compiled with your PHP installation
http://php.net/manual/en/book.imagick.php or you may also use GD functions
to perform this task

On Fri, Dec 3, 2010 at 11:26 AM, netusco  wrote:

>
>
> On Dec 3, 8:48 am, "Ma'moon"  wrote:
> > You can easily remove the threat by using an image conversion, i use
> > `convert` to convert my images to a standard image type, the conversion
> > process changes the physical content of the uploaded file and destroys
> all
> > the threat that it might contain while maintaining the valid images if
> they
> > were valid from the first place!, its very important to `convert` the
> images
> > specially the ones uploaded from your side!
> >
>
> Why the ones uploaded from my side? And do you use a cakephp plugin
> for that?
>
>
>
>
> > On Fri, Dec 3, 2010 at 6:15 AM, cricket  wrote:
> > > On Thu, Dec 2, 2010 at 8:25 PM, euromark 
> > > wrote:
> > > > Did anyone try this?
> > > >http://wafful.org/2007/08/04/php-code-in-gif-image-file/
> >
> > > > I am wondering if miles uploader script or any other uploader plugin
> > > > is aware of that risk yet.
> > > > Or how dangerous this actually is for "normal" cake apps.
> >
> > > > Anyone happen to have such a "bad" image at hand?
> > > > Drop me a line and I will report back with details.
> >
> > > > I think  would be a good script to include
> >
> > > I never did look into that further to see if there's something that
> > > can easily be done to catch those. But I've never been too concerned,
> > > either. Notice that the code embedded in the image is triggered
> > > because the file is included inside a PHP script. The only other way
> > > that I know of to use this exploit is to upload an image named
> > > something.gif.php. I always check both the extension and file type. If
> > > there's something I'm missing, though, I'd like to hear more.
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Security Risks on gif image upload?

2010-12-02 Thread Ma';moon
You can easily remove the threat by using an image conversion, i use
`convert` to convert my images to a standard image type, the conversion
process changes the physical content of the uploaded file and destroys all
the threat that it might contain while maintaining the valid images if they
were valid from the first place!, its very important to `convert` the images
specially the ones uploaded from your side!

On Fri, Dec 3, 2010 at 6:15 AM, cricket  wrote:

> On Thu, Dec 2, 2010 at 8:25 PM, euromark 
> wrote:
> > Did anyone try this?
> > http://wafful.org/2007/08/04/php-code-in-gif-image-file/
> >
> > I am wondering if miles uploader script or any other uploader plugin
> > is aware of that risk yet.
> > Or how dangerous this actually is for "normal" cake apps.
> >
> > Anyone happen to have such a "bad" image at hand?
> > Drop me a line and I will report back with details.
> >
> > I think  would be a good script to include
>
> I never did look into that further to see if there's something that
> can easily be done to catch those. But I've never been too concerned,
> either. Notice that the code embedded in the image is triggered
> because the file is included inside a PHP script. The only other way
> that I know of to use this exploit is to upload an image named
> something.gif.php. I always check both the extension and file type. If
> there's something I'm missing, though, I'd like to hear more.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Paginator Question

2010-11-15 Thread Ma';moon
Thanks for the answer cricket, i am already aware of
[$paginator->numbers(array('title' => 'foo')] but this is a static ALT for
the link, i am trying to dynamically fill the "ALT" with something like
"Page Number X From Section Y" where X is the page number for the link and Y
is a dynamic "or static" string, there must be a way to do it, if this is
not possible then i will open a ticket at CakePHP's lighthouse in order to
have such a feature in Cake's paginator.


On Mon, Nov 15, 2010 at 7:02 PM, cricket  wrote:

> On Mon, Nov 15, 2010 at 4:40 PM, Ma'moon  wrote:
> > Hello Bakers,
> >
> > I am using cake's paginator to paginate my views, i am actually using the
> > folowing code to accomplish this task:
> > $paginator->numbers(array('tag' => 'td align="center"', 'separator' =>
> ''));
> >
> > My question is, how do you guys put a dynamic "ALT" for the links being
> > generated by the paginator using [$paginator->numbers]?
>
> echo $paginator->numbers(array('title' => 'foo'));
>
> Not very helpful, eh? I had a look into this a while back to see about
> setting distinct titles but gave up as it didn't seem worth the
> trouble of extending the helper (which appears to be the only
> solution) just for that.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Paginator Question

2010-11-15 Thread Ma';moon
Hello Bakers,

I am using cake's paginator to paginate my views, i am actually using the
folowing code to accomplish this task:
$paginator->numbers(array('tag' => 'td align="center"', 'separator' => ''));

My question is, how do you guys put a dynamic "ALT" for the links being
generated by the paginator using [$paginator->numbers]?

Thanks a lot for any answer

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: 15 minute Blog Tutorial? Really?

2010-10-10 Thread Ma';moon
And also please raise the debug level to 2 (edit app/config/core.php file
and alter the value of 'debug' to 2) and post the errors that you see in
there

On Sun, Oct 10, 2010 at 4:20 PM, Jeff  wrote:

> I'm not trying to be argumentative here ... but we're already beyond
> my tolerance for 'extra stuff' (kabuki dance).  Mod-rewrite (I now
> recall reading about this previously in the docs) IS working fine as I
> do have the cake image in the upper left corner and CSS is applied to
> warnings and things checking out OK on the main index page.
>
> So ... all the 'file shifters' seem to be doing what they're supposed
> to do but that still doesn't explain the framework not recognizing
> files uploaded to the server.
>
> Now what?
>
> On Oct 10, 3:13 pm, "Ma'moon"  wrote:
> > To check if mod-rewrite is enabled check the main page of your site (
> http://example.com) if the default theme of the site went fine (CSS loaded
> > correctly on the page) then that would indicate the mod-rewrite is
> enabled.
> >
> > Cake's folder/file structure is pretty strait forward and most cases you
> > don't need to alter it, most of your work will be jumping between 3
> folders
> > (controllers, models, and views) contained inside the app folder, trust
> me,
> > no need for kabuki dance :-)
> >
> >
> >
> > On Sun, Oct 10, 2010 at 4:04 PM, Jeff  wrote:
> > > How would I check mod-rewrite?
> >
> > > .htaccess DOES exist in the cakephp folder, and in the app folder
> > > below that.
> >
> > > More importantly, WHY do we need all this?  Simple is better and doing
> > > this kabuki dance of directories and filenames seems to be the source
> > > of more heartburn than joy.
> >
> > > On Oct 10, 2:46 pm, "Ma'moon"  wrote:
> > > > Make sure that you have mod-rewrite enabled and also make sure that
> the
> > > > .htaccess files does exist inside cake's folder structure.
> >
> > > > On Sun, Oct 10, 2010 at 3:42 PM, Renato de Freitas Freire <
> >
> > > > renat...@gmail.com> wrote:
> > > > > what is the name of your index view file?
> >
> > > > > i think u have named it index.php.ctp, but its index.ctp only...
> >
> > > > > try to check this...
> >
> > > > > --
> > > > > Renato de Freitas Freire
> > > > > ren...@morfer.org
> >
> > > > > On Sun, Oct 10, 2010 at 4:37 PM, Jeff  wrote:
> >
> > > > >> Not sure why, but I'm the lucky guy that gets to spend WA more
> > > > >> than 15 minutes on a 'simple' demo.  Admittedly I'm a noob, but
> one
> > > > >> would think that something this basic should work.
> >
> > > > >> I dutifully copied and pasted the code from the tutorial examples
> in
> > > > >> to php files and uploaded them to my webserver, then I went to the
> url
> > > > >> as described in the tutorial - and Cake doesn't seem to be the
> least
> > > > >> bit interested in the blog stuff - it just wants a whole new set
> of
> > > > >> files NOT pointing at Posts, but pointing at
> >
> > > > >> Missing Method in PostsController
> >
> > > > >> Error: The action index.php is not defined in controller
> > > > >> PostsController
> >
> > > > >> Error: Create PostsController::index.php() in file:
> app/controllers/
> > > > >> posts_controller.php.
> > > > >>  > > > >> class PostsController extends AppController {
> >
> > > > >>var $name = 'Posts';
> >
> > > > >>function index.php() {
> >
> > > > >>}
> >
> > > > >> }
> > > > >> ?>
> >
> > > > >> Notice: If you want to customize this error message, create
> app/views/
> > > > >> errors/missing_action.ctp.
> >
> > > > >> So that's all well and good - it wants the basic PostsController
> class
> > > > >> to extend AppController ... but here's the contents of my file in
> > > > >> exactly the right place:
> >
> > > > >>  > > > >> class PostsController extends AppController {
> > > > >>var $name = 'Posts';
> > > > >>function

Re: 15 minute Blog Tutorial? Really?

2010-10-10 Thread Ma';moon
How are you accessing your site? please post the URL that you are using to
access the index page

On Sun, Oct 10, 2010 at 4:20 PM, Jeff  wrote:

> I'm not trying to be argumentative here ... but we're already beyond
> my tolerance for 'extra stuff' (kabuki dance).  Mod-rewrite (I now
> recall reading about this previously in the docs) IS working fine as I
> do have the cake image in the upper left corner and CSS is applied to
> warnings and things checking out OK on the main index page.
>
> So ... all the 'file shifters' seem to be doing what they're supposed
> to do but that still doesn't explain the framework not recognizing
> files uploaded to the server.
>
> Now what?
>
> On Oct 10, 3:13 pm, "Ma'moon"  wrote:
> > To check if mod-rewrite is enabled check the main page of your site (
> http://example.com) if the default theme of the site went fine (CSS loaded
> > correctly on the page) then that would indicate the mod-rewrite is
> enabled.
> >
> > Cake's folder/file structure is pretty strait forward and most cases you
> > don't need to alter it, most of your work will be jumping between 3
> folders
> > (controllers, models, and views) contained inside the app folder, trust
> me,
> > no need for kabuki dance :-)
> >
> >
> >
> > On Sun, Oct 10, 2010 at 4:04 PM, Jeff  wrote:
> > > How would I check mod-rewrite?
> >
> > > .htaccess DOES exist in the cakephp folder, and in the app folder
> > > below that.
> >
> > > More importantly, WHY do we need all this?  Simple is better and doing
> > > this kabuki dance of directories and filenames seems to be the source
> > > of more heartburn than joy.
> >
> > > On Oct 10, 2:46 pm, "Ma'moon"  wrote:
> > > > Make sure that you have mod-rewrite enabled and also make sure that
> the
> > > > .htaccess files does exist inside cake's folder structure.
> >
> > > > On Sun, Oct 10, 2010 at 3:42 PM, Renato de Freitas Freire <
> >
> > > > renat...@gmail.com> wrote:
> > > > > what is the name of your index view file?
> >
> > > > > i think u have named it index.php.ctp, but its index.ctp only...
> >
> > > > > try to check this...
> >
> > > > > --
> > > > > Renato de Freitas Freire
> > > > > ren...@morfer.org
> >
> > > > > On Sun, Oct 10, 2010 at 4:37 PM, Jeff  wrote:
> >
> > > > >> Not sure why, but I'm the lucky guy that gets to spend WA more
> > > > >> than 15 minutes on a 'simple' demo.  Admittedly I'm a noob, but
> one
> > > > >> would think that something this basic should work.
> >
> > > > >> I dutifully copied and pasted the code from the tutorial examples
> in
> > > > >> to php files and uploaded them to my webserver, then I went to the
> url
> > > > >> as described in the tutorial - and Cake doesn't seem to be the
> least
> > > > >> bit interested in the blog stuff - it just wants a whole new set
> of
> > > > >> files NOT pointing at Posts, but pointing at
> >
> > > > >> Missing Method in PostsController
> >
> > > > >> Error: The action index.php is not defined in controller
> > > > >> PostsController
> >
> > > > >> Error: Create PostsController::index.php() in file:
> app/controllers/
> > > > >> posts_controller.php.
> > > > >>  > > > >> class PostsController extends AppController {
> >
> > > > >>var $name = 'Posts';
> >
> > > > >>function index.php() {
> >
> > > > >>}
> >
> > > > >> }
> > > > >> ?>
> >
> > > > >> Notice: If you want to customize this error message, create
> app/views/
> > > > >> errors/missing_action.ctp.
> >
> > > > >> So that's all well and good - it wants the basic PostsController
> class
> > > > >> to extend AppController ... but here's the contents of my file in
> > > > >> exactly the right place:
> >
> > > > >>  > > > >> class PostsController extends AppController {
> > > > >>var $name = 'Posts';
> > > > >>function index() {
> > > > >>$this-

Re: 15 minute Blog Tutorial? Really?

2010-10-10 Thread Ma';moon
To check if mod-rewrite is enabled check the main page of your site (
http://example.com) if the default theme of the site went fine (CSS loaded
correctly on the page) then that would indicate the mod-rewrite is enabled.

Cake's folder/file structure is pretty strait forward and most cases you
don't need to alter it, most of your work will be jumping between 3 folders
(controllers, models, and views) contained inside the app folder, trust me,
no need for kabuki dance :-)

On Sun, Oct 10, 2010 at 4:04 PM, Jeff  wrote:

> How would I check mod-rewrite?
>
> .htaccess DOES exist in the cakephp folder, and in the app folder
> below that.
>
> More importantly, WHY do we need all this?  Simple is better and doing
> this kabuki dance of directories and filenames seems to be the source
> of more heartburn than joy.
>
>
> On Oct 10, 2:46 pm, "Ma'moon"  wrote:
> > Make sure that you have mod-rewrite enabled and also make sure that the
> > .htaccess files does exist inside cake's folder structure.
> >
> > On Sun, Oct 10, 2010 at 3:42 PM, Renato de Freitas Freire <
> >
> >
> >
> > renat...@gmail.com> wrote:
> > > what is the name of your index view file?
> >
> > > i think u have named it index.php.ctp, but its index.ctp only...
> >
> > > try to check this...
> >
> > > --
> > > Renato de Freitas Freire
> > > ren...@morfer.org
> >
> > > On Sun, Oct 10, 2010 at 4:37 PM, Jeff  wrote:
> >
> > >> Not sure why, but I'm the lucky guy that gets to spend WA more
> > >> than 15 minutes on a 'simple' demo.  Admittedly I'm a noob, but one
> > >> would think that something this basic should work.
> >
> > >> I dutifully copied and pasted the code from the tutorial examples in
> > >> to php files and uploaded them to my webserver, then I went to the url
> > >> as described in the tutorial - and Cake doesn't seem to be the least
> > >> bit interested in the blog stuff - it just wants a whole new set of
> > >> files NOT pointing at Posts, but pointing at
> >
> > >> Missing Method in PostsController
> >
> > >> Error: The action index.php is not defined in controller
> > >> PostsController
> >
> > >> Error: Create PostsController::index.php() in file: app/controllers/
> > >> posts_controller.php.
> > >>  > >> class PostsController extends AppController {
> >
> > >>var $name = 'Posts';
> >
> > >>function index.php() {
> >
> > >>}
> >
> > >> }
> > >> ?>
> >
> > >> Notice: If you want to customize this error message, create app/views/
> > >> errors/missing_action.ctp.
> >
> > >> So that's all well and good - it wants the basic PostsController class
> > >> to extend AppController ... but here's the contents of my file in
> > >> exactly the right place:
> >
> > >>  > >> class PostsController extends AppController {
> > >>var $name = 'Posts';
> > >>function index() {
> > >>$this->set('posts', $this->Post->find('all'));
> > >>}
> > >>function view($id = null) {
> > >>  $this->Post->id = $id;
> > >>$this->set('post', $this->Post->read());
> > >>}
> > >> }
> > >> ?>
> >
> > >> So now what?  Anyone with help ... please?
> >
> > >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > >> others with their CakePHP related questions.
> >
> > >> 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
> > >> cake-php+unsubscr...@googlegroups.com
> For more options, visit this
> group at
> > >>http://groups.google.com/group/cake-php?hl=en
> >
> > >  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > > others with their CakePHP related questions.
> >
> > > 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 fro

Re: 15 minute Blog Tutorial? Really?

2010-10-10 Thread Ma';moon
Make sure that you have mod-rewrite enabled and also make sure that the
.htaccess files does exist inside cake's folder structure.

On Sun, Oct 10, 2010 at 3:42 PM, Renato de Freitas Freire <
renat...@gmail.com> wrote:

> what is the name of your index view file?
>
> i think u have named it index.php.ctp, but its index.ctp only...
>
> try to check this...
>
> --
> Renato de Freitas Freire
> ren...@morfer.org
>
>
>
> On Sun, Oct 10, 2010 at 4:37 PM, Jeff  wrote:
>
>> Not sure why, but I'm the lucky guy that gets to spend WA more
>> than 15 minutes on a 'simple' demo.  Admittedly I'm a noob, but one
>> would think that something this basic should work.
>>
>> I dutifully copied and pasted the code from the tutorial examples in
>> to php files and uploaded them to my webserver, then I went to the url
>> as described in the tutorial - and Cake doesn't seem to be the least
>> bit interested in the blog stuff - it just wants a whole new set of
>> files NOT pointing at Posts, but pointing at
>>
>> Missing Method in PostsController
>>
>> Error: The action index.php is not defined in controller
>> PostsController
>>
>> Error: Create PostsController::index.php() in file: app/controllers/
>> posts_controller.php.
>> > class PostsController extends AppController {
>>
>>var $name = 'Posts';
>>
>>
>>function index.php() {
>>
>>}
>>
>> }
>> ?>
>>
>> Notice: If you want to customize this error message, create app/views/
>> errors/missing_action.ctp.
>>
>> So that's all well and good - it wants the basic PostsController class
>> to extend AppController ... but here's the contents of my file in
>> exactly the right place:
>>
>> > class PostsController extends AppController {
>>var $name = 'Posts';
>>function index() {
>>$this->set('posts', $this->Post->find('all'));
>>}
>>function view($id = null) {
>>  $this->Post->id = $id;
>>$this->set('post', $this->Post->read());
>>}
>> }
>> ?>
>>
>> So now what?  Anyone with help ... please?
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: want to use database store procedure with cakephp

2010-10-01 Thread Ma';moon
I really think that the core developers should include this feature in
CakePHP 2.0 since this is getting into a big demand all over the frameworks
users, for example Yii is already supporting this feature and am not sure if
other frameworks already supports or not but certainly for Cake this is
going to be a very huge step a head :-)

On Fri, Oct 1, 2010 at 6:11 AM, rakeysh  wrote:

> Hi
> any body has any idea ,how to use store procedure with cakephp
>
>
> thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Why are PHP notices still displayed when debug level is 0?

2010-09-21 Thread Ma';moon
If you are setting debug to 0 in core.php then you must have overwritten the
value somewhere in your controller or model, in order to turn those notices
off you may do it manually in your controller by Configure::write('debug',
0)

On Tue, Sep 21, 2010 at 1:37 PM, euromark wrote:

> there are no notices in production mode...
> you must have debug > 0 SOMEWHERE
> otherwise they would be turned off
>
>
> On 21 Sep., 19:04, Miles J  wrote:
> > You can overwrite it yourself in bootstrap.php.
> >
> > error_reporting(0);
> >
> > But this is a last case. You should really investigate why errors are
> > showing and if debug is really being set.
> >
> > On Sep 21, 9:53 am, Alex Bovey  wrote:
> >
> > > Hi all,
> >
> > > I'm sure a few versions ago, PHP notices were never displayed when in
> > > production mode (debug 0) but now they are being shown.
> >
> > > What's the best way of turning off notices when in production mode?
> >
> > > Thanks all,
> >
> > > Alex
> >
> > > --
> > > Alex Bovey
> > > Web Developer | Alex Bovey Consultancy Ltd
> > > Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: call CakePHP stored Procedure

2010-08-24 Thread Ma';moon
You can simply accomplish that by using the `query` method located in your
model, something like $this->Model->query('CALL sp_name()');
also CakePHP doesn't generate automated `Stored Procedures` but rather is
generated `SQL Queries` to perform DB interaction between system layers and
data storage engines 'of course IF you are using an SQL based storage
engine'.

On Tue, Aug 24, 2010 at 3:45 PM, Cruisine  wrote:

> is there anybody know how to call stored procedure in cake??
> i'm using cake 1.3 and have got so many efforts to call it in cake but
> seems not works otherwise got some error..
> i wish there were somebody known how to call stored procedure and
> implement it from model, controller and shows it data into the view..
> :-)
>  need ur help soon..tq
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: paginator question

2010-07-24 Thread Ma';moon
I found the answer here
http://stackoverflow.com/questions/2927209/cakephp-paginate-with-post-data-without-sessions-serialization-or-post-to-getincase
someone faced such a setuation, and thanks a lot for the hint ADmad
:-)

Ma'moon

On Sat, Jul 24, 2010 at 6:09 PM, Ma'moon  wrote:

> Hey Cake Bakers,
> I have a question regarding the paginaotr helper, i need a way to pass GET
> params to the generated links that the paginator is generating to look
> something like:
> http://localhost/tests/index/page:2/?x=1&y=2&z=3
> Is there anyway to accomplish that in CakePHP? i would really appreciate
> any help from you guys.
>
> Thanks a bunch
> Ma'moon
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


paginator question

2010-07-24 Thread Ma';moon
Hey Cake Bakers,
I have a question regarding the paginaotr helper, i need a way to pass GET
params to the generated links that the paginator is generating to look
something like:
http://localhost/tests/index/page:2/?x=1&y=2&z=3
Is there anyway to accomplish that in CakePHP? i would really appreciate any
help from you guys.

Thanks a bunch
Ma'moon

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: A question to core developers

2010-07-18 Thread Ma';moon
Hello Graham,

Thanks a lot for your kind answer, i was pretty sure that in no way there
are any globals are being passed to extract inside Cake's core, i just
wanted to make sure of that in order to show it to my "paranoid" client!

Thanks again.

Cheers,
Ma'moon
On Mon, Jul 19, 2010 at 2:30 AM, saidbakr  wrote:

> Hi,
> I need an example that demonstrates the security risk in a CakePHP
> application depends on extract!!!
>
> On Jul 19, 1:40 am, Graham Weldon  wrote:
> > Extract is only ever used on settings and the like.
> > While we do a lot to ensure the security and safety of the framework,
> > we do not provide security for developers passing in globals and
> > exposing potential security risks or issues.
> >
> > The core at no point will extract and override a global like $_FILES,
> $_GET etc.
> >
> > Cheers,
> > Graham / Predominant
> >
> > On Mon, Jul 19, 2010 at 12:32 AM, Ma'moon  wrote:
> > > Dear CakePHP core developers,
> > > I have noticed that the "extract" function is being used in so many
> places
> > > all over the core files "more than 100", and as you know, the extract
> > > function is very dangerous to use according to the warning being
> mentioned
> > > in the documentation page @ php.net/extract , kindly, my question is,
> what
> > > do you guys do in order to make sure that there are no super globals
> are
> > > being passed to extract in the core files?? if someone may answer me
> then it
> > > will save me a lot of time to convince some people that CakePHP fits
> for the
> > > job, i'll appreciate any answer.
> >
> > > Thanks a lot
> > > Ma'moon
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


A question to core developers

2010-07-18 Thread Ma';moon
Dear CakePHP core developers,
I have noticed that the "extract" function is being used in so many places
all over the core files "more than 100", and as you know, the extract
function is very dangerous to use according to the warning being mentioned
in the documentation page @ php.net/extract , kindly, my question is, what
do you guys do in order to make sure that there are no super globals are
being passed to extract in the core files?? if someone may answer me then it
will save me a lot of time to convince some people that CakePHP fits for the
job, i'll appreciate any answer.

Thanks a lot
Ma'moon

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP and prepared statements

2010-06-14 Thread Ma';moon
Dear Bakers,
I am in a setuation where i was asked to use "prepared statement" in the SQL
queries that my Cake based application is performing, is there any way that
i can use prepared statement in CakePHP? if there are any links or
references regarding this subject then i will be very thankful if some can
point them out.

Thanks,
Ma'moon

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Updating is creating new record

2010-06-12 Thread Ma';moon
Are you doing it AJAX? and what is the data type of the coolumn
friends_list?

On Sat, Jun 12, 2010 at 4:05 PM, WhyNotSmile wrote:

> Thanks John, but saveField isn't doing the job either.
>
> Sharon
>
>
> On 12 June, 18:07, John Andersen  wrote:
> > Can you just use $this->saveField('friend_list', $friendslist) instead
> > of $this->save()?
> > Enjoy,
> >John
> >
> > On Jun 12, 7:57 pm, WhyNotSmile  wrote:
> >
> > > I'm trying to update a field in a record, using the following code:
> >
> > >$this->id = $user['User']['id'];
> > >$this->set('friends_list', $friendslist);
> > >$this->save();
> >
> > > The record with id $user['User']['id'] exists in the db; I'm just
> > > trying to update the friends_list field.
> >
> > > When I do this, though, it creates a whole new record - I thought that
> > > if id was set, then it updated the record with that id?  If I
> > > explicitly set id, e.g.:
> >
> > > $this->set(array('friends_list => $friendslist, $id => $user['User']
> > > ['id']));
> >
> > > if complains that a record with the primary key $user['User']['id']
> > > already exists.
> >
> > > Does anyone know what I'm doing wrong?  Thanks!
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: email sending

2010-05-09 Thread Ma';moon
@Renato because the email component from CakePHP is a core component and it
fits much better with the framework, plus, whats exactly does phpMailer
gives you while Cake's email component doesn't?

On Sun, May 9, 2010 at 5:16 PM, Renato de Freitas Freire  wrote:

> Im using phpMailer to send emails with cakephp...
> It works really great for me...
>
> Why dont you try?
>
> --
> Renato de Freitas Freire
> ren...@morfer.org
>
>
>
> On Sat, May 8, 2010 at 10:13 AM, John Andersen wrote:
>
>> Or use your Gmail as your mail account in a smtp setup.
>> See http://book.cakephp.org/view/176/Email for understanding of the
>> Email component.
>> Enjoy,
>>   John
>>
>> On May 8, 4:10 pm, "Ma'moon"  wrote:
>> > Yes, you need to install an MTA in order to send emails from your server
>> >
>> [snip]
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: email sending

2010-05-08 Thread Ma';moon
Yes, you need to install an MTA in order to send emails from your server

On Sat, May 8, 2010 at 8:54 AM, MANOJ DHAMAL wrote:

> no i not installed any MTA. Is it neccessary?
>
> On May 8, 5:45 pm, "Ma'moon"  wrote:
> > Do you have any MTA installed in your server?
> >
> > On Sat, May 8, 2010 at 8:36 AM, MANOJ DHAMAL  >wrote:
> >
> >
> >
> > > I have to send email to user when he/she completes registration.
> >
> > > i have used component in controller like
> >
> > > var $components = array('Email');
> >
> > > i am using function call  for sending mail like
> >
> > > $this->sendNewUserMail();
> >
> > > And funcion is as,
> >
> > > function sendNewUserMail(){
> >
> > > $this->Email->to  = 'manoj.dham...@gmail.com';
> > > $this->Email->subject = 'Test';
> > > $this->Email->send('Hello Hi MANOJ!');
> >
> > >}
> >
> > > when i perform registration, it completes successfilly but i didn't
> > > get any message at manoj.dham...@gmail.com
> >
> > > Control reaches successfully at funcion and executes the function but
> > > it not send any mail.
> > > WHY?
> > > Plz give me any solution.
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > 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
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: email sending

2010-05-08 Thread Ma';moon
Do you have any MTA installed in your server?

On Sat, May 8, 2010 at 8:36 AM, MANOJ DHAMAL wrote:

> I have to send email to user when he/she completes registration.
>
> i have used component in controller like
>
> var $components = array('Email');
>
> i am using function call  for sending mail like
>
> $this->sendNewUserMail();
>
> And funcion is as,
>
> function sendNewUserMail(){
>
> $this->Email->to  = 'manoj.dham...@gmail.com';
> $this->Email->subject = 'Test';
> $this->Email->send('Hello Hi MANOJ!');
>
>}
>
> when i perform registration, it completes successfilly but i didn't
> get any message at manoj.dham...@gmail.com
>
> Control reaches successfully at funcion and executes the function but
> it not send any mail.
> WHY?
> Plz give me any solution.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: how to send email in cakephp

2010-05-08 Thread Ma';moon
A small google search will lead you to
http://book.cakephp.org/view/176/Email

On Sat, May 8, 2010 at 7:41 AM, MANOJ DHAMAL wrote:

> How to send email for welcome message when user do login? Which
> components required for it?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: how to pass data from view to controller?

2010-04-24 Thread Ma';moon
You can name the input field with cake's convintions using a dummy DB field
in order to have this input accessable in {$this->data}, once you have
completed execution your process you can simply unset this field {unset(
$this->data['Recipe']['dummy_field']}, or otherwise you can also use the
{$this->params} array to access this field from the POSTed form inouts, i
would prefer using the first approach to access any submitted form data.

On Sat, Apr 24, 2010 at 11:28 AM, Bryan Lim  wrote:

> Hi all,
>
> In the controller, there is a twitter php lib function to update
> twitter status. I need to pass the string from view to controller.
>
> should i use form? but what if i don want the data to be saved to
> database?
>
> thanks!
> bryan
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP & Shindig

2010-03-16 Thread Ma';moon
Hello Cake Bakers :-)
Am planing to build a social application using CakePHP together with apache
project "Shindig", i tried to read about the integration between both
CakePHP and Shindig but couldn't really find any on google nor the cook
book, anyone did this before using CakePHP & Shindig? if anyone was
successfully able to build such an application then it would be so kind of
him/her to share his/her knowledge in this matter!

Thanks in advance :-)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Re: CakePHP 1.3-beta has landed

2010-01-17 Thread Ma';moon
Thank you very much, This is truly an amazing framework in all the terms,
specially the nice community and the developers of the project, again,
Thanks a million times for all the effort and time you spend to create the
greatest PHP framework in the world!

On Sun, Jan 17, 2010 at 12:18 PM, Miles J  wrote:

> This looks absolutely amazing guys. Cannot wait to upgrade my 1.3 :]
>
> On Jan 16, 8:37 pm, mark_story  wrote:
> > Link [7] should behttp://
> cakephp.lighthouseapp.com/projects/42648/changelog-1-3-0-beta
> >
> > On Jan 16, 11:25 pm, mark_story  wrote:
> >
> > > The CakePHP development team is happy to announce the release the
> > > CakePHP 1.3-beta. We've been hard at work implementing new features
> > > and fixing issues in existing features in the 1.3 branch.  Since 1.3-
> > > alpha there have been more than 600 commits and more than 43 tickets
> > > have been closed.  A number of new features have been implemented most
> > > notably, Model virtualFields[1], changes to the plugin and theme assets
> > > [2], improvements to TimeHelpers ability to output i18n friendly
> > > formats, and a refactored test suite harness[3].  When upgrading to
> > > 1.3-beta it is recommended that you replace app/webroot/test.php with
> > > the one in the repository and check out the Migration Guide[4] as well
> > > as the new features guides [5] for changed and new features in 1.3.
> >
> > > In other project news, all the previous stable release points for 1.2
> > > have been retagged and are available in github.  We've brought on two
> > > new team members in the past few months as well, both ADmad, and
> > > jose_zap have joined the CakePHP team and are helping with all aspects
> > > of the project.  Moving forward with 1.3 we are not planning on adding
> > > changes that break backwards compatibility.  Any methods currently
> > > generating errors will be removed in the first Release Candidate. It
> > > is important that you listen to the warnings, as they will become
> > > fatal errors in the future.
> >
> > > If you would like to help with the ongoing development of 1.3, you can
> > > do so in a number of ways. Firstly, filing clear and concise tickets
> > > for any issues helps get the issues resolved quickly. Secondly, you
> > > can also contribute by forking the CakePHP project on github and
> > > implementing fixes, tests cases and features on your forks.  You can
> > > use pull requests or tickets to notify core team members about your
> > > changes.
> >
> > > Finally, we'd like to thank you the community for the their greatly
> > > increased and ongoing support and contributions. Since our move to
> > > github and lighthouse the volume of community contributions has had a
> > > dramatic increase, and we'd like to thank the many contributors for
> > > their help in improving CakePHP.
> >
> > > Download a packaged release [6]
> >
> > > View the changelog [7]
> >
> > > [1]
> http://cakephp.lighthouseapp.com/projects/42648/13-new-features-virtu...
> > > [2]
> http://cakephp.lighthouseapp.com/projects/42648/13-new-features-plugi...
> > > [3]
> http://cakephp.lighthouseapp.com/projects/42648/1-3-new-features-test...
> > > [4]http://cakephp.lighthouseapp.com/projects/42648/13-migration-guide
> > > [5]http://cakephp.lighthouseapp.com/projects/42648/13-new-features
> > > [6]http://github.com/cakephp/cakephp1x/downloads
> > > [7]http://cakephp.lighthouse.com/projects/42648/changelog-1-3-0-beta
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
>


-- 
http://phpirate.net
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Create .ctp file

2009-12-09 Thread Ma';moon
http://www.google.com/search?q=create+views+cakephp

On Wed, Dec 9, 2009 at 5:19 PM, 00Cake  wrote:

> Hi All,
>
> I am starting discovering CakePHP and have try to do the blog tutorial
>
> Here is a trivial question:
>
> How to create a view ? How to create a .ctp file ??
>
> I have not find nothing about that!!
>
> Thanks
>
> Oliver
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://phpirate.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Is Cake Certification still offered?

2009-12-09 Thread Ma';moon
+1

On Wed, Dec 9, 2009 at 4:24 PM, Marcelo Andrade  wrote:

> On Sun, Dec 6, 2009 at 8:55 AM, hash  wrote:
> > Hi guys, I want to know whether Cake Certification is still being
> > offered because I want to apply as a Cake Certified Engineer. I
> > emailed Cake Foundation but got no reply.
>
> On Sun, Dec 6, 2009 at 5:39 PM, Jon Bennett  wrote:
> >> Ive never even heard of a cake certification, care to tell? Or sources
> >> of where you heard about it?
> >
> > http://cakefoundation.org/pages/certification
>
> Very interesting!  I'd like to know more about too.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://phpirate.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: paginator help

2009-12-07 Thread Ma';moon
Put [$paginator->options(array('url' => $this->passedArgs));] before
printing the numbers and the Next, Prev buttons, this should handle the
issue.

On Mon, Dec 7, 2009 at 12:25 PM, Amit Rawat  wrote:

> Hello ,
>
>  I am having a problem with pagination. When i post data the paginator give
> me correct result but when i click on next page the result are not comming
> according to post value. how do i post a value from one page to another?
>
>
>  any idea?
>
> Thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://phpirate.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: paginate loosing args

2009-11-24 Thread Ma';moon
Please send a controller dump and your view code so we can help you
On Tue, Nov 24, 2009 at 3:38 PM, Mario Cesar  wrote:

> *I tried too
> *
>
> On Tue, Nov 24, 2009 at 6:36 PM, Ma'moon  wrote:
>
>> If you are using POST to send the ID of the target article then try
>> sending it using GET
>>
>> On Tue, Nov 24, 2009 at 3:31 PM, Mario Cesar  wrote:
>>
>>> i tried but didn't work
>>>
>>>
>>>
>>> On Tue, Nov 24, 2009 at 6:20 PM, Dave  wrote:
>>>
>>>> in the paginate array in your view file add
>>>>
>>>> 'url'=>$this->passedArgs
>>>>
>>>> On Tue, Nov 24, 2009 at 1:24 PM, Mario Cesar wrote:
>>>>
>>>>> Hi All!!
>>>>>
>>>>> I have a problem with paginate, I'll try explicate:
>>>>>
>>>>> I have a form that method is "post"
>>>>> the result is ok in first page but if I click in other page or some
>>>>> order the paginate returns all rows of my table he is loosing the
>>>>> args and I'm using the passedArgs in View page
>>>>>
>>>>>
>>>>> what can i do?
>>>>>
>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>> others with their CakePHP related questions.
>>>>>
>>>>> 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
>>>>> cake-php+unsubscr...@googlegroups.comFor
>>>>>  more options, visit this group at
>>>>> http://groups.google.com/group/cake-php?hl=en
>>>>>
>>>>
>>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>>> others with their CakePHP related questions.
>>>>
>>>> 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
>>>> cake-php+unsubscr...@googlegroups.comFor
>>>>  more options, visit this group at
>>>> http://groups.google.com/group/cake-php?hl=en
>>>>
>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>
>>
>> --
>> http://phpirate.net
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://phpirate.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: paginate loosing args

2009-11-24 Thread Ma';moon
If you are using POST to send the ID of the target article then try sending
it using GET
On Tue, Nov 24, 2009 at 3:31 PM, Mario Cesar  wrote:

> i tried but didn't work
>
>
>
> On Tue, Nov 24, 2009 at 6:20 PM, Dave  wrote:
>
>> in the paginate array in your view file add
>>
>> 'url'=>$this->passedArgs
>>
>> On Tue, Nov 24, 2009 at 1:24 PM, Mario Cesar  wrote:
>>
>>> Hi All!!
>>>
>>> I have a problem with paginate, I'll try explicate:
>>>
>>> I have a form that method is "post"
>>> the result is ok in first page but if I click in other page or some
>>> order the paginate returns all rows of my table he is loosing the
>>> args and I'm using the passedArgs in View page
>>>
>>>
>>> what can i do?
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> 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
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> 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
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://phpirate.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Increment value using CakePHP model functions

2009-11-21 Thread Ma';moon
ًWhy you're not using *Increment Behavior*
http://bakery.cakephp.org/articles/view/increment-behavior ?!!

On Sat, Nov 21, 2009 at 11:52 AM, Dave  wrote:

> Hehe it is close to on the money.  I do appreciate your help.  The goal of
> this question was to increment a value with 1 query.  You can do this with
> MySQL with a simple query settings field = field + 1.  I was just wondering
> if there was a way to do this within the core as usually your fields are
> escaped in cake functions.  I have figured out my problem.  Thank you
> though.
>
> Dave
>
>
> On Sat, Nov 21, 2009 at 12:39 AM, jburns  wrote:
>
>> You are right.
>>
>> Can I ask if you are using recursion and containable? If so, you can
>> be very specific about what tables, records and fields are returned.
>> I'm still fairly new with Cake but have realised that it is a good
>> thing to implement these in AppModel and then I have complete control
>> over data returned within my models and controller functions. It's a
>> bit more work for me, but well worth it in the performance stakes.
>>
>> With recursion set at -1 you will only get records from the current
>> table (in other words, no associated tables). When you want to bring
>> in associations, increase recursive to 0 or more, then use contain to
>> bring in the associations. You can specify fields from those
>> associations too:
>>
>> $this->Post->contain = array(
>>'Author' => array(
>>'fields' => array ('id', 'first_name', 'last_name')
>>)
>> );
>>
>> In your case, with recursion set at -1 you can call...
>>
>> $this->Post->read(array('title', 'Published'), 1);
>> $this->Post->set(array(
>>'title' => 'New title',
>>'published' => false
>> ));
>> $this->Post->save();
>>
>> ...and this will only bring back the value of 'title' and 'published'
>> in the record with an id of 1 and nothing else. That has to be right
>> on the money, doesn't it?
>>
>>
>> On Nov 20, 6:44 pm, Dave  wrote:
>> > jburns, if you set your debug level to 2 you will see that performs 2
>> > queries AND gets a bunch of data I don't need about the item...
>> >
>> > grigri that is very helpful to know that updateAll doesn't escape your
>> > arguments.
>> >
>> > I don't need to afterSave currently, but it is good to know I can do it
>> the
>> > second way as well.
>> >
>> > Thank you very much.
>> >
>> >
>> >
>> > On Fri, Nov 20, 2009 at 9:45 AM, grigri 
>> wrote:
>> > > It's possible in two ways.
>> >
>> > > First, you've got the `updateAll` function which doesn't escape or
>> > > mess with your arguments:
>> >
>> > > $this->Item->updateAll(
>> > >  array('Item.flags' => 'Item.flags + 1'),
>> > >  array('Item.id' => 666)
>> > > );
>> >
>> > > One possible problem with this is that it will not call `afterSave`,
>> > > trigger behaviour methods, etc... because it's not really a save.
>> > > If you need this to work with the rest, the solution is a bit more
>> > > long-winded:
>> >
>> > > $db =& ConnectionManager::getDataSource($this->Item->useDbConfig);
>> > > $this->Item->set('flags', $db->expression('`Item`.`flags`+1'));
>> > > $this->Item->save();
>> >
>> > > In reality, accessing the datasource and whatnot should be hidden in
>> > > the model, but this shows a bare-bones way of getting it working.
>> >
>> > > hth
>> > > grigri
>> >
>> > > On Nov 20, 12:46 pm, Dave  wrote:
>> > > > Hi everybody,
>> >
>> > > > I have a quick question that bugs me each time I run into it in a
>> > > project,
>> > > > and then I promptly forget about it.  It is an easy fix, but it is
>> such
>> > > > common functionality that I feel there must be some way to do it
>> within
>> > > > built in functions rather then a custom query.
>> >
>> > > > The issue is incrementing a table field without grabbing the
>> previous
>> > > value,
>> > > > using MySQL's default function `tablefield` = `tablefield` + 1 .
>> >
>> > > > example:
>> >
>> > > > $this->Item->query('UPDATE `items` SET `flags` = `flags`+1 WHERE
>> > > > `items`.`id` = ' . $id);
>> >
>> > > > I have tried pretty much every way I can think of with
>> model->saveField
>> > > to
>> > > > accomplish this through cake, but I can't get it to work.
>> >
>> > > > First I set the id with $this->Item->id = $id
>> > > > After that I have tried
>> >
>> > > > $this->Item->saveField('flags','+1');
>> > > > $this->Item->saveField('flags',' +1');
>> > > > $this->Item->saveField('flags', 'flags+1');
>> > > > $this->Item->saveField('flags', '`flags`+1');
>> >
>> > > > So... is there a way to do this with 1 query within cake? I like to
>> have
>> > > as
>> > > > few custom queries as possible within my application.
>> >
>> > > > Thanks for any tips,
>> >
>> > > > who knows, if it isn't built in maybe I will be able to make my
>> first
>> > > > contribution to the Core!
>> >
>> > > > Dave
>> >
>> > > --
>> >
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "CakePHP" group.
>> > > To post to this group, send email to cake

Re: how to create a new database

2009-10-31 Thread Ma';moon
http://book.cakephp.org/view/4/Beginning-With-CakePHP

On Sat, Oct 31, 2009 at 2:39 AM, tassi  wrote:

>
> hii
> m a beginner
> i want help
> plz tell me how to create a new database
> and how to connect it to mysql.
> plz tell
> thnx
> \
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bug report: CakePHP saving twice

2009-10-20 Thread Ma';moon
You may want to open a ticket @ https://trac.cakephp.org/ stating the steps
to reproduce your claims so that the core DEVs may review it and fix it.

On Wed, Oct 21, 2009 at 12:32 AM, Rawna  wrote:

>
> I just found out that CakePHP saving twice when I have warnings (as I
> saw it in debug.log)
> E.g. I have $this->Model->save() in my controller
>
> And I have this in my default.ctp template:
> 
>
> I think CakePHP is going through the controller action again when a
> warning caused by the above is present.
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating layout with multiple view

2009-10-20 Thread Ma';moon
Nope, you can change the layout the way you want, all you have to do is just
specifying the layout that you want in your controller, for instance,
$this->layout = 'admin' then that would call the admin layout inside your
app/views/layouts directory and apply all the renders in that layout, if you
didn't specify a layout then the default layout will be rendered in this
case.

On Tue, Oct 20, 2009 at 12:18 PM, kamiseq  wrote:

>
> I thought that layout can be populated only by view that is releted to
> action that is executed in controller.
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: creating layout with multiple view

2009-10-19 Thread Ma';moon
i don't really understand whats wrong with "elements" in your case?!!, you
may "call" as many elements as you wish from within your layout and .ctp
files! on the other hand you can create a separate layout for each case you
have and use { $this->layout } from your controller to render the proper
layout for the case that your controller action is performing.

On Mon, Oct 19, 2009 at 4:56 PM, kamiseq  wrote:

>
> hi,
> I just started with cakephp so maybe my question is just stupid.
>
> anyway form what I learned cakePHP uses layout with all static content
> that can be mixed with predefined $title_for_layout,
> $scripts_for_layout, $content_for_layout. but that implies that
> $content_for_layout holds continuous block of dynamic content returned
> from view.
>
> but what if my layout is composed from let say 3 separate pieces of
> dynamic code surrounded by static code. then I need to repeat all that
> static code in my view only to put everything into one variable
> $content_for_layout.
>
> is there any chance to put all static code into layout and use more
> than one variable for content that will be filled with dynamic content
> in my view.  OK I can use view as layout and elements for those
> separated parts. OR maybe I try something stupid here.
>
> hope somebody will throw some light into my head :)
> thanks
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Popular posts. Trying to avoid a custom query

2009-10-17 Thread Ma';moon
Why don't you simply add another column to your posts table and name it
num_views or something, and increment this field by 1 every time a post is
being viewed, this will save you the hassle of combining 2 models in your
posts controller plus there will be no DB tables joins while you retrieve
the desired number of views for a certain post, in other hand, if you wanted
to apply the find on the current approach that you use, if you were using a
belongsTo relation "PostView belongsTo Post" then setting the "recursive"
flag for the PostView model to 1 and then doing a simple find process will
do the job for you

2009/10/17 Jesús Ángel 

>
> Hi.
>
> The main model is a Post. A post hasMany Postview.
>
> I need to get the most viewed (popular) posts.
>
> I'm hoping to use Model::find() to build this query (or something like
> it..):
>
> select
>Post.id,
>Post.name,
>Post.slug,
>count(Postview.id) as views
> from
>posts AS Post,
>postviews AS Postview
> where
>Post.id = Postview.post_id
> group by Post.id
> order by views desc
> limit ' . $limit
>
> Could you please help me?
>
> Thanks
>
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Missing Controller

2009-09-22 Thread Ma';moon
The class name should be "ItemsController" controller NOT "ItemController"

On Tue, Sep 22, 2009 at 7:58 AM, Selva manickaraja wrote:

> Hi,
>
> I just got CakePhp up and running. To learn the functionality I created
> sample php code. I followed the instruction in the book that I bought few
> days back called Beginning CakePHP published by APress. Following are the
> steps that I had taken.
>
> 1. Created a table in PostgreSQL called *items*.
> 2. Wrote a script called item.php and placed it in app\models directory to
> define a class called Items.
> 3. Wrote a script called items_controller and placed it in app\controller
> direcrtory to define a class called ItemController.
>
> Finally I tryped the URL http://localhost/ims/items in the browser. I get
> an error message Missing Controller. I tried following all the naming
> convention.
>
> I'm attaching the individual files for your reference. Please check and
> comment as to what had gone wrong.
>
> Thank you.
>
> Warmest Regards,
>
> Selvam
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Select only first 50 characters?

2009-09-21 Thread Ma';moon
Try something like:
SUBSTR(Post.description,1,50) as strPart, this will work :-) "note that the
string starts from 1 instead of 0"

On Mon, Sep 21, 2009 at 9:16 PM, Dave Maharaj :: WidePixels.com <
d...@widepixels.com> wrote:

>
> Changed the quotes.
>
> Now I end up with
>
> Array
> (
>[title] => Greener Plan-it!
>[created] => 2009-07-16 13:28:59
>[id] => 8197d5
>[country_id] => 54
>[state_id] => 7
>[Post] => Array
>(
>[0] => Array
>(
>[SUBSTR(description, 0, 50)] =>
>)
>
>)
>
> )
>
> There is a description to be pulled but nothing shows up.
>
> Ideas?
>
> Thanks
>
> Dave
>
> -Original Message-
> From: Miles J [mailto:mileswjohn...@gmail.com]
> Sent: September-21-09 3:20 PM
> To: CakePHP
> Subject: Re: Select only first 50 characters?
>
>
> Your quotes are wrong:
>
> 'fields' =>array(
> 'Post.title',
> 'Post.created',
> 'SUBSTR(description, 0, 50)',
> 'Post.id'),
>
> On Sep 21, 10:21 am, "Dave Maharaj :: WidePixels.com"
>  wrote:
> > When doing a query how can i pull only a desired number of characters
> > from a field?
> >
> > I have:
> >
> > 'fields' =>array(
> >  'Post.title',
> >  'Post.created',
> >  SUBSTR('description', 0, 50),
> >  'Post.id'),
> >
> > But this is wrong,
> >
> > Ideas?
> >
> > Dave
>
>
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP and scalability

2009-09-21 Thread Ma';moon
i was successfully able to handle tables with more than 200 records
"yes, above 2 million records!" with CakePHP and with a very acceptable
performance and speed, the first thing that you should be thinking of is
sharding the database into smaller chunks "DBs", second thing is enabling
"memcached" to reduce DB access "specially reducing the master DB hits",
thirdly enable APC or whatever bytecode cacher you might be able to use
"this will gain your web server a very good performance boost", and finally
set the debug level for you cake app to "0" to cache the tables "DESC"
operations.
Taking all the above into consideration CakePHP can be a very powerful
framework to handle huge databases!.

On Mon, Sep 21, 2009 at 8:50 PM, Miles J  wrote:

>
> Well how big is your table? I have tables with over 200,000+ rows and
> it works just fine.
> >
>


-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: View HTML caching

2009-09-07 Thread Ma';moon
Hi again, i just found it here
http://bakery.cakephp.org/articles/view/html-cache-helper
thanks again

On Mon, Sep 7, 2009 at 3:48 PM, Ma'moon  wrote:

> Hello Folks,
> is there any way to cache the output of the rendered view in HTML format,
> the scenario suggest to cache the whole page in HTML and then check if the
> HTML version of the requested action has been already cached in HTML format,
> if not then simply perform the usual action operations and then save the
> output in an HTML file, does cake support such a scenario or do i have to do
> it by my self.
>
> Thanks
>
> --
> http://phpirate.net
>



-- 
http://phpirate.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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



  1   2   >