Re: Cookbook: database query in controller???

2014-07-07 Thread mulianto
Hi,

When starting up you will put all query in the controller.

Imagine if the actual query is show in specific controller method more than 
twice.

You will just copy paste right, no problem.

But id it show in 10 place and you wont remember it any more later on as 
project grow.

Then you need to update the query param or something related to the query, you 
like to update it in one place, your model file, or look in each method who use 
the same query.

This is happend in my experience. 

Hope not happen to you . 

Regards,

Mulianto
Blog : Http://muliantophang.blogspot.net


Sent from my iPhone

On 7 Jul 2014, at 14:04, Stephen S  wrote:

> I think you're referring to conventions, and I agree it's best to keep things 
> DRY and place methods to fetch results in the model or app model rather than 
> writing directly in the controller in most instances.
> 
> Personally I would say this is more to do with the MVC pattern rather than 
> CakePHP directly and people will have their own preferences on how to handle 
> this.
> 
> 
> On 6 July 2014 12:09, Jeremy Burns : Class Outfit 
>  wrote:
>> It is using the model. It’s calling the ‘find’ method of the Post model with 
>> the ‘all’ parameter. The Post model is then using the core Model functions 
>> to do the database extraction.
>> 
>> On 6 Jul 2014, at 11:59, Sam Clauw  wrote:
>> 
>>> I've a question about the MVC in CakePHP. Normally, the model should take 
>>> responsability for all the database queries.
>>> 
>>> However, in the cookbook documentation, it seems this isn't respected. See 
>>> the following link: 
>>> http://book.cakephp.org/2.0/en/getting-started.html#create-a-posts-controller
>>> 
>>> As you can see, the index action of PostsController contains 
>>> "$this->Post->find('all')". Shouldn't this and this code for example:
>>> 
>>>> $this->set('areas', $this->Attraction->Area->find('list', array(
>>>> 'conditions' => array(
>>>> 'Area.deleted' => null
>>>> ),
>>>> 'order' => array(
>>>> 'Area.sequence ASC',
>>>> 'Area.name ASC'
>>>> )
>>>> )));
>>> 
>>> 
>>> not be in the Model part instead of in the controller part???
>>> 
>>> -- 
>>> 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.
> 
> 
> 
> -- 
> Kind Regards
>  Stephen Speakman
> -- 
> 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: Localhost vs Remote

2013-08-11 Thread mulianto
Hi,

Try set debug enabled to 1 / 2 see what happend.

Regards,
Mulianto
Http://muliantophang.blogspot.com



Sent from my iPhone

On 11 Agt 2013, at 21:19, "Advantage+"  wrote:

> I have just uploaded my new site and it will not allow me to log in. 
> Localhost version works fine, dropped remote db, all files. Uploaded to 
> remote server, copied database and login failure, invalid user / password and 
> do not understand why?
>  
> Not even sure where to look since it works fine local and it’s a copy on the 
> server so just looking for any ideas why this would be happening now.
>  
> Thanks,
>  
> Dave
>  
> -- 
> 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/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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Directory Protection

2013-05-23 Thread mulianto
Hi

You can protect the image view via the web server hot link protection by make  
sure the request is come from your own application, which simply checking the 
http referrer of the requet.

Let the web server do the static image serving, and cake for serving the app 
logic. 

Hope helps

Mulianto
Sent from my iPhone

On 23 Mei 2013, at 10:08, "Advantage+"  wrote:

> I have an" img/uploads" folder which has users profile images and such.
>  
> How do you go about protecting the folder so there is no access except when 
> Cake gets the images?
> So anyone can't just browse thru the directory?
>  
> Google search turned up MediaView so put the uploads outside of webroot, but 
> " As of 2.3 MediaView is deprecated and you can use CakeResponse::file() to 
> send a file as response:"
>  
> Should it be set to use CakeResponse::file($path, $options = array())
> Allows you to set a file for display or download
>  
> If so is there a simple example out there showing exactly how this would get 
> the files and server it up?
>  
> $image = CakeResponse::file('where/file/is/here.jpg, $options = array())
> $this->Controller->set('image', $image);
>  
> Thanks,
> Dave
>  
> -- 
> 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: Mongo php process slowness

2013-01-10 Thread mulianto
hi 

have you try insert the record in 1 call like batch/bulk insert. i don't know 
if mongo can do this.



Sent from my iPhone

On 10 Jan 2013, at 16:16, Raju Bishnoi  wrote:

> Hi,
> 
> I run the below php code with Mongo & MongoClient to insert 100k records.
> Mongo took 70-75 second to complete and MongoClient took 440-450 second.
> 
> $start = microtime(true);
> 
> $objBaseMongoRecord = new BaseMongoRecord();
> 
> $objBaseMongoRecord->
> setCollectionName("mongotest");
> 
> $i = 0;
> while ($i < 100) {
> 
> $data = array(
> "name" => array(
> "firstname" => "raju" . $i,
> "lastname" => "bishnoi" . $i),
> "address" => array(
> "street" => "raju" . $i,
> "city" => "city" . $i,
> "state" => "state" . $i,
> "country" => "country" . $i,
> "zipcode" => "1" . $i),
> "officephone" => "25412541",
> "homephone" => "625412541",
> "status" => "A",
> "date" => date('Y-m-d:H-i-s'),
> "time" => time());
> 
> $objBaseMongoRecord->ensureIndex(array("time" => 1));
> $objBaseMongoRecord->insert($data);
> $i++;
> }
> 
> $duration = microtime(true) - $start;
> // print in the format 1.2345 for better reading
> printf("took %0.4d seconds", $duration);
> 
> Can anyone tell me why MongoClient tooks more time and how to make it fast.
> 
> Thanks
> Raju
> -- 
> 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: SQL query rather than CakePHP style query

2012-08-31 Thread Phang Mulianto
hi,

the bottom line is you should not trust any parameter generated from
outside your app by user.

You should do input validation, which is sanitize class.

so let say the $id will not contain '; delete * from user' , if your id
expected is int, make sure it only contains int

hope helps

On Fri, Aug 31, 2012 at 4:36 PM, Mariano C. wrote:

> My method is something like
>
> public function getSomething($id)
>$sql = "SELECT ... WHERE id =".$id;
>return $this->Model->query($sql);
> }
>
> How should I use your tips?
>
> Il giorno venerdì 31 agosto 2012 05:11:34 UTC+2, Dr. Tarique Sani ha
> scritto:
>
>> Using prepared statements via the fetchAll method with Sanitize::clean
>> is the way to go
>>
>  --
> 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-US.
>
>
>

-- 
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-US.




Re: pagination not work after change to Nginx

2012-07-24 Thread Phang Mulianto
hello..

anybody can help me..

On Tue, Jul 24, 2012 at 5:13 PM, Phang Mulianto  wrote:

> Hi all,
>
> i have an apps build using cakephp1.1 .
>
> i use the pagination component which come with 1.1
>
> The app run using lighttpd, and its ok.
>
> now i switch to nginx , and the pagination breaks, also the sorting
> facilites.
>
> the error is, the link not point to my webroot adress, example:
>
> http://www.mywebsite.com/product/page/2   <=== using lighttpd
>
> product/page/2   <=== using nginx
>
> so the url is not there, and the application point to no server...  it
> should ok if the link is /product/page/2  , but the link generate for the
> page is product/page/2
>
> any one know how to handle this , coz i need to use nginx.
>
> thanks in advanced
>
> Mulianto
>
>

-- 
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


pagination not work after change to Nginx

2012-07-24 Thread Phang Mulianto
Hi all,

i have an apps build using cakephp1.1 .

i use the pagination component which come with 1.1

The app run using lighttpd, and its ok.

now i switch to nginx , and the pagination breaks, also the sorting
facilites.

the error is, the link not point to my webroot adress, example:

http://www.mywebsite.com/product/page/2   <=== using lighttpd

product/page/2   <=== using nginx

so the url is not there, and the application point to no server...  it
should ok if the link is /product/page/2  , but the link generate for the
page is product/page/2

any one know how to handle this , coz i need to use nginx.

thanks in advanced

Mulianto

-- 
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


running cake with nginx

2012-05-27 Thread Phang Mulianto
Hi,

i try run cake with nginx web server, follow the guide in the cake
doc...cake can running and served by php-fcgi .

the problem is my css / img / js / all static file not php file, cannot
load.

is there any configuration for access the other static file ?

i already try any google result doc, but still error 404 for the css / img
files..

any help and pointer appreciated.

Rgds,

Mulianto

-- 
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: Many database requests -> Cake is to slow

2012-05-08 Thread Phang Mulianto
hi,

what is your speed expectation ? do you have any minimum and maximum time
limit ?

why not try to do the save only once...like firing all the insert in 1 shot
to the db.

or just create raw insert command and run the execute..



On Tue, May 8, 2012 at 12:27 AM, John Hardy  wrote:

> While code optimization should be done, i would be more interested in your
> network, database setup/tuning and your hardware specs.
>
> Test your algorithm outside of the cake framework to compare speeds
>  On May 7, 2012 7:48 AM, "supp...@deep-coding.net" <
> supp...@deep-coding.net> wrote:
>
>> Hey,
>>
>> I have a problem, I have to handle many database requests, but it
>> tooks to much time.
>> The user can upload a xml file, then I am running a foreach, to create
>> an array from the data of the xml file.
>> Then I am saving this data with the save() method, but it tooks to
>> much time.
>> For testing I have uploaded a file with 1,200 datasets and it tooks 24
>> seconds to read all datasets, create the arrays and save it into the
>> database.
>> I don't know what I can do to rush it up.
>> Can anyone help me please?
>>
>> Thanks Alex
>>
>> --
>> 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: Cake optimization

2012-01-02 Thread Phang Mulianto
you rite adsix. .agree . see where the problem caused and fix it..and if
you already optimize everything before need the debug kit it will safe you
too...

for the os level well, every kernel of linux can be optimized, some came
with default server usage setting, with of course different workload
interpretation from the os default setup..that if you have the control of
the os.

caching is the most efective way. .. beside code optimization
On Jan 3, 2012 2:09 PM, "AD7six"  wrote:

>
>
> On Jan 3, 6:55 am, Dee Johnson  wrote:
> > I would like to have somewhere ~1 sec load time
> >
> > I actually figured out the problem though.  When using persistModel =
> true
> > it actually caused ALOT of unexpected speed results.  I removed it and
> all
> > calls are around 1 - 3 seconds.
> >
> > Also, automagic form elements wont load with it for some reason.
> >
> > see this articlehttp://
> stackoverflow.com/questions/2148416/cakephp-controllerpersistm...
> >
> > Thanks for the javascript caching suggestion.  I will try that as well.
>  I
> > am maintaining a tool that I created where the sole purpose is modifying
> /
> > inputting data primarily which is why containable worked or me alot.  Any
> > other suggestions similar to containable?
> >
> > What modifications would you recommend on the OS layer?
>
> You are wasting your time unless you can identify something that is
> the cause for some/all of the delay you are seeing.
>
> E.g. let's say your db queries are taking 0.1s. if you implement a
> better caching mechanism you might be able to bring that down to 0.01s
> - which means your pages still take 7.99s.
>
> Therefore: look for and identify something that is actually slow
>
> * you can do that on a high level using debug kit
> * xdebug profiling would be 'best' it'll give you a lot of information
> and allow you to drill down to specific problems or let you see you're
> calling fast functions 1000s of times adding up to delays
> * you can do it yourself quite easily simply using $line = time() . '
> ' . __FILE__ . ':' . __LINE__; `echo "$line" >> my.log`; or something
> very similar (note complete absence of anything cakephp-specific in
> that).
>
> Also check your application and webserver logs - if they are full of
> errors (a common cause for slow apps in 1.3 and before is an
> unwritable tmp dir) sort that out first.
>
> AD
>
> --
> 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: Cake optimization

2011-12-31 Thread Phang Mulianto
you should also consider to optimize your web server and os layer,
javascript caching in your app and also the image caching in user
browser...it will make a difference for the effort...

what's your expect in load time results?
On Dec 31, 2011 4:45 AM, "Dee Johnson"  wrote:

> Hi guys.
>
> I have a optimization question.
>
> I have already used $persistModel = true, optimized by queries with
> containable and made sure all tables had indices.
>
> I still would like a speed increase as pages are taking at the min 1.5 sec
> and at the max 8 seconds (on random occasions).  I tried to use file
> caching for the pages that dont serve frequently changing or updating data
> but it didnt seem to give much of a boost.
>
> Any other suggestions to try?  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: vtiger CRM with Cakephp

2011-10-18 Thread Phang Mulianto
what integration you expect..if code like the crm style , then hard and
maybe not cakephp way.

but if you add your apps url to the app, it can be just add some of your
entry link to your cake app, and from the cake app, just directly play with
the database of the crm.



On Tue, Oct 18, 2011 at 2:10 PM, rchavik  wrote:

> On Monday, October 17, 2011 9:54:09 PM UTC+7, zuha wrote:
>>
>> We have developed an open source CRM for CakePHP and could use a new
>> contributor.   (It's desktop & mobile ready, and very simple, and includes a
>> number of other functionalities as well).   Let me know if you're
>> interested.
>
>
> Can you share link to the repo?
>
> --
> 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 & AJAX auto-refresh div in specified time interval - is it possible?

2011-10-14 Thread Phang Mulianto
the ajax framework used by Ruby on Rails is prototype +scriptocolous, which
is the same format used by the cake ajax helper.. i used it from cake 1.1.

dunno if it change in current cake version..just call it and even not need
to mess with the ajax howto..it just work..
On Oct 14, 2011 12:39 PM, "huoxito"  wrote:

> yeah CakePHP is simply a PHP framework but it already offers some built in
> Ajax functionality.
>
> And I've been studying Ruby on Rails a lot lately and I find it really
> great the way the framework works with Ajax. I haven't written any Ajax
> functionality with CakePHP in a while but next time I do it I will try to
> get it as close as possible to the way Rails does it.
>
> --
> 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: uploading large file fails

2011-10-02 Thread Phang Mulianto
for that size better using ftp. .better way to uploading..
 On Oct 1, 2011 1:14 AM, "Miles J"  wrote:
> Why are you even uploading a 58MB file?
>
> On Sep 29, 1:21 pm, aortizhi  wrote:
>> i already have changed to post_max_size=800M and upload_max_filesize =
>> 800M, and still don't work, am i doing something wrong?
>> On Sep 29, 3:06 pm, Ryan Schmidt  wrote:
>>
>>
>>
>>
>>
>>
>>
>> > On Sep 29, 2011, at 15:01, aortizhi wrote:
>>
>> > > When i select a file that
>> > > is not that big, it uploads ok, but when i am trying to upload a file
>> > > that is at least 58 MB it fails uploading and the file won't be the
>> > > same at server side.
>>
>> >http://php.net/upload-max-filesize
>>
>> > The default max is 2MB in PHP 5.3.8.
>
> --
> 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: Is there a time out for shells?

2011-07-14 Thread Phang Mulianto
if run a php, which is i assume,in php.ini there is default time limit to
run a php script..

try check it out..
 On Jul 14, 2011 6:29 PM, "24z"  wrote:
> I've written a shell that does db maintenance. It's supposed to run
> through some 5.000 records. However, I've noticed, that it stops after
> some 200 records. No errors. No warnings. It just stops. 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: Private Messaging system (PMS)

2011-07-14 Thread Phang Mulianto
maybe you should try to query in google for the PMS in cake php...the result
will be better :)

On Thu, Jul 14, 2011 at 1:07 PM, JPM  wrote:

> HI,
>
> Can I get any component for PMS in cakephp?
>
> Thanks & Regards
> Jay
>
> --
> 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 config ajax to work

2011-07-14 Thread Phang Mulianto
Cake use with ajax is simplify your code writing..

you just spit it up with $html->ajax(url, response, anything)

You don't need to write the ajax command all the way...to many typing for
doing ajax manually.. and if you need to learn it, just use php code
alone..don't make things complicated...


On Thu, Jul 14, 2011 at 7:29 PM, taqman filler  wrote:

> in code I use variable to receive  data from ajax file correct or not
> I made a mistake here
>
> 2011/7/14 Jens Dittrich 
> >
> > The concept is easy. Create a request Object fill it with data and send
> it to the server, then wait. Maybe you get an answer maybe you won't. Write
> handlers for all possible outcomes like success, failure, server messages
> and no answer at all and handle the eventually received information.
> > If you want to see what is going on then use Firebug for Firefox or
> Chrome developer tools in chrome. There is also some tooling available in
> IE9.
> > However, the concept of AJAX has nothing to do with CakePHP, it is always
> the same.
> >
> > --
> > 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: barcode reader integration in web application

2011-07-03 Thread Phang Mulianto
agree with anthony..
usually barcode reader device works like a keyboard replacement for faster
data entry,and scan standart barcode.
in any application,the output will be just plaintext. in notepad, in any
texteditor,text field in any apps, text fileds in web form..
the hardware manufacture makes life easier for integrating those
devices...this will be the same with rfid reader i think.
 On Jul 3, 2011 1:07 PM, "Anthony"  wrote:
> If you're reading 2d (UPC style) barcodes you don't really need to do
> anything.
>
> The barcode readers just connect to ps2/usb ports and "type" in the
> serial number.
>
> I'm pretty sure the same really applies to 3d barcodes you just have
> to deal with the special codes that segment the data. As you just
> going to receive a nice long string of data with codes that signify
> the start and end of data, etc.
>
> On Jul 2, 11:13 am, renjith raj  wrote:
>> We have a customer in need for a new on-line library managing
>> application. Taking all things into consideration, web application
>> seems the way to go. However, they also use bar code readers for
>> issuing and returning books. This bar code reader is connected to a
>> user machine and we need to access it from our server
>>
>> How to read those bar codes into web application? Any ideas, how to do
>> it? Java applet, flash, ActiveX or something different?
>>
>> Scanners are Datalogic Forumula 732e and Metrologic Scanpal. Web
>> application will be PHP running on Apache web server
>>
>> Thanks and Regards
>> Renjith Raj
>
> --
> 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 + Apache Load Balancer

2011-06-24 Thread Phang Mulianto
the proxy setup is something missing, not the cake.

try pen load balancer, i have try it with success.

On Fri, Jun 24, 2011 at 10:31 PM, John Hardy  wrote:

>
> Have you ensured that you setup your proxy to pass the
> "HTTP_X_FORWARDED_FOR" header with the clients IP address
>
> You can dump the _SERVER var to check if that value is being passed in the
> header.
>
> Also, I would suggest using HAPROXY as a software based proxy, it's built
> specifically for such use-cases and, I can attest that it works perfectly
> with
> a cakephp install as I am using it now to load balance 15 web nodes and 3
> databases.
>
> On Jun 24, 2011, at 7:26 AM, Felipe Carballo wrote:
>
> > Hello guys!
> >
> > I'm having trouble to setting up a CakePHP app on a balanced
> > environment: sessions seems to be lost between requests. I'm already
> > using database to save sessions.
> >
> > Below is my balancer config:
> >
> > 
> >  DocumentRoot /var/www/html
> >  DirectoryIndex index.htm index.html index.php
> >  ServerName www3.dominio.com
> >  Options -Indexes +FollowSymLinks
> >
> >  ProxyPass /server-status !
> >  ProxyPass /balancer-manager !
> >  ProxyPass / balancer://WebCluster/ stickysession=BALANCEID
> > nofailover=Off
> >  ProxyPassReverse / balancer://WebCluster/
> >
> >  
> >BalancerMember http://web1.dominio.com loadfactor=10
> > route=web1.dominio.com
> >BalancerMember http://web2.dominio.com loadfactor=10
> > route=web2.dominio.com
> >ProxySet lbmethod=byrequests
> >  
> >
> >  
> >SetHandler balancer-manager
> >Order deny,allow
> >Allow from 192.168.0.0/20
> >  
> >
> > 
> >
> > There is something I'm missing?
> >
> > I appreciate if anyone can help me. =)
> >
> > --
> > 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: What editor?

2011-06-19 Thread Phang Mulianto
just use notepad...  wtf..



On Mon, Jun 20, 2011 at 1:29 PM, CRUSH  wrote:

> Komodo is the best I've used so far.
>
> --
> 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 secure database info in database.php

2011-06-13 Thread Phang Mulianto
I think if you have a running application, especially you build, you should
better have a private environment, not shared environment, especially shared
hosting.
Except you have the shared hosting infrastructure managed by yourself, that
much better.

maybe some say it's costly to have a private environment than a shared
environment, but the cost vs security is never equal.

The solution is, go with VPS , and learn how to manage your VPS yourself.

or use a secured shared hosting environment.

just my 2 cents...



On Mon, Jun 13, 2011 at 4:57 PM, dtemes  wrote:

> It's a good practice to restrict the permissions of the file, so that
> only the users who need access to it can read or write it, for
> instance your apache user.
>
> Even if regular users can not access what is behind your web server
> it's not enough, seems that other responses assume you are the only
> one that can log in into a shell, cd to your config folder and see
> what is there, but it might not be the case. In a shared environment
> having incorrect permissions in the config files can be a big security
> hole.
>
> Regards
>
>
>
> On 11 jun, 21:25, monish001  wrote:
> > Hi
> >
> > I am making my first app using cakephp.
> >
> > Cakephp uses database.php to store database info. Do we need to take
> > some steps to secure database info in database.php?
> >
> > Regards
> > Monish
>
> --
> 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 send email per 5 min in cakephp 1.3

2011-06-07 Thread Phang Mulianto
you can create the sending email page, with parameter if you likke,

and for the timer, scheduled with cron and call your cake file path using
curl/wget, just like a web browser request.

you can call it from the local machine or from other machine using curl or
wget.



On Tue, Jun 7, 2011 at 9:15 PM, sandeep sachan wrote:

>
>
> hello, everyone
>
>
> I am new in cakephp ..i am trying to send email to multi  users  ..
> but this email send per 1 min every user can you help me ..???
> ///
>
> --
> 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: Future of CakePHP

2011-06-07 Thread Phang Mulianto
some stay some go..it's natural in this world of opensource  . . .

do we move forward as the user ??

On Tue, Jun 7, 2011 at 9:24 AM, Miles J  wrote:

> Well put :P
>
> On Jun 6, 6:20 pm, "Larry E. Masters"  wrote:
> > Thats old old news, CakePHP isn't going anywhere.
> >
> >
> >
> > Miles,
> >
> > Sure it is :) we are moving forward!
> >
> > --
> > 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: Pagination Limits

2011-05-30 Thread Phang Mulianto
do you try use

$this->Model->findAll('criteria','fields','order','yourlimit','page');

this will limit the result queried from the database.

paginate only limit the view in the view layer and it depends on the total
record returned by your query.

hope helps

rgds,

Mulianto

On Mon, May 30, 2011 at 5:13 PM, majna  wrote:

> Urghhh. Then use paginate callback (found in Controller::paginate()).
>
> Add this in your model:
>
> public function paginateCount($conditions = array(), $recursive = 0,
> $extra = array()) {
>if (isset($extra['myHardLimit'])) {
>return $extra['myHardLimit'];
>}
>
>$parameters = compact('conditions');
>if ($recursive != $this->recursive) {
>$parameters['recursive'] = $recursive;
>}
>return $this->find('count', array_merge($parameters, $extra));
> }
>
> Use in controller:
> $this->paginate(array('myHardLimit'=>300,
> 'condition'=>'Post.published'=>1));
>
> I think this should work...
>
> On May 30, 8:50 am, Okalany Daniel  wrote:
> > Thanks. Its not what i was looking for though. I'm looking for a way to
> > limit all the records returned by a pagination. Not to limit the records
> per
> > page.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, May 27, 2011 at 8:08 PM, majna  wrote:
> > >http://book.cakephp.org/view/1232/Controller-Setup
> >
> > > On May 27, 3:20 pm, Okalany Daniel  wrote:
> > > > How would i set the limit in the model? I couldn't find it.
> >
> > > > 2011/5/26 Alejandro Gómez Fernández 
> >
> > > > >
> >
> > > > > --
> > > > > 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
> >
> > > > --
> > > > OKALANY DANIEL,
> > > > P.O BOX 26150,
> > > > Kampala.,
> > > > Uganda.http://okasoft.net
> > > > --
> >
> > > --
> > > 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
> >
> > --
> > OKALANY DANIEL,
> > P.O BOX 26150,
> > Kampala.,
> > Uganda.http://okasoft.net
> > --
>
> --
> 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: acl for dummies?

2011-05-29 Thread Phang Mulianto
why not try use phpgacl..there is plugin component for cake..
On May 29, 2011 3:21 AM, "dreamingmind"  wrote:
> Michael,
>
> Non-expert reply:
> After fiddling with ACL for a while I'll say, yes it can do all you
> want. The aco entries can represent anything you want them to,
> controllers, actions, individual db records, tabes, urls... Aros can
> likewise represent anything you choose, users, controllers, actions,
> ip adresses...
>
> The permission table will hook up the allowable combinations. And
> since both aros and acos are in a tree structure you can set up any
> grouping or nesting that serves your needs.
>
> It is worth noting that there are two ways to identify an aro or aco
> node, by alias or by table and id. Ponder the value of these two ways
> of identifying a requestor or controlled item.
>
> As to the specifics of implementing your system... I can't be too
> specific because I'm stilling trying to sort this out. It seems you
> can always resort to a kind of brute force approach. At the critical
> point in your logic you test: does this aro have permission to access
> this aco?
>
> This is the area where I find the tutorials a bit vague. They assume
> that there is always going to be a standard pattern for testing. User
> to action or user to crud function on a table. Possibly because my
> thinking is too fuzzy to build my apps cleanly or possibly because
> this ideal situation is not realistic, I have found it a bit confusing
> decide what testing mode to use and where to have the checks made.
>
> You are probably going to need to build some before and after save
> code to make sure proper permissions are set up as things grow. A
> simple case from tutorials: when a user registers, the save code could
> make the new user aro record and an aco entry and give them permission
> to access their own db record.
>
> In your case, the work product of a company employee on a project
> might need to be listed as a child aco in a collection that was
> accessible to managers of that company.
>
> Regards,
> Don
>
> On May 28, 3:54 pm, mivogtGermanyLU  wrote:
>> Hi there,
>>
>> after spending some hours of reading the chapert about acl/aro/acro in
the
>> cake books and the cake homepage I am still or even more confused about
the
>> topic.
>> I understood the meaning of a tree containing the rights but I am
absolute
>> not sure about if it matches my needs or even on how to realize it in my
>> app.
>>
>> So any helping comment is welcome. Linked full tutorials would be great,
>> too.
>>
>> My app consists of a set of MVC stuff to register services grated by
users
>> to be manged from users to be done by users for users with some hierachy
in
>> background.
>> So there needs to be a superadmin to setup the users in all levels
>> I need granters to grant projects
>> I need some to set up the jobs getters and workers
>> etc
>>
>> and in the meaning of some safety the i.e. workers shokld not be able to
>> change or delete granted jobs etc
>>
>> so basically I need to limit the actions/views allowed to a specific
logged
>> in users (after login using auth component)
>> secondly I need to limit the datasets shown to a user based on his role
and
>> the linked models content
>>
>> i.e.
>> 2 company are granting services to be done for customers with no need to
>> know each other or  the others customers
>> if a company grants a service for a customer a service-company is named
to
>> fullfill it. So the C sets up the job to be done and the company to do
the
>> job
>> The servicecompany will have staffs getting some kind of tickes with jobs
to
>> be done and the staff will need to fill a timereport linked to a granted
job
>> (containing the job_id dthe granterid, the service_id datwe,time etc)
with
>> the limitation he wont be able to see jobs done for the customer by
others
>> ...
>>
>> to me it looks a bit difficult to split it up into roles only
>> maybe I need some kind of data-limiting functions, too. Any chance to get
it
>> done by the acl or will I need to add some conditions in my find() inside
>> the controllers?
>>
>> Thanks in advance
>>
>> Michael
>
> --
> 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: switch Mobile/default theme

2011-05-27 Thread Phang Mulianto
you can change your layout right, for themes, i assume you use css file.

why not set the css file to in the script you state before...


On Fri, May 27, 2011 at 2:35 PM, m16u31  wrote:

> hi, im sorry buy my english isnt good,
> I have a problem I created an aplication, and it has a mobile and
> standar version.
>
> in footer's page , i have two links .. mobile version, standar version
>
> and the user can switch any time the version.
>
>
> in my app_controller i have this ,. to detect if device is mobile
>
>  if ($this->RequestHandler->isMobile()) {
>// if device is mobile, change layout to mobile
>$this->layout = 'mobile';
> }
>
>
> the question is ...
>
> how can I switch the themes?whith the footer's links??
>
> 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: Do you think this project is possible with CakePHP?

2011-05-19 Thread Phang Mulianto
absolutely possible to do with cake.

the question is not what cake can do..but what you can do with cake.

:)



On Wed, May 18, 2011 at 8:06 PM, Kyko  wrote:

> Hi Dorell,
>
> Of course this project is possible using CakePHP.
>
> Good luck! =)
>
>
> 2011/5/17 Dorell James 
>
>> Hi Everyone,
>>
>> I'm really new to cake and was wondering after studying it if this
>> (project) below is possible (i guess, pretty much believe it's
>> possible). :-)
>>
>> Project is divided with sub-projects or modules.
>>
>>   MAIN PROJECT
>>  SUB-PROJECTS/MODULES
>>  - Inventory Management Software
>>  - TAR (Technical Action Requests) Solutions = import excel
>> file i think and then when action is confirm it inserts records to the
>> db (data are pulled from the excel file), export documents into excel/
>> word format.
>>   - Document Creator = This is a sub project that will be
>> able to generate a ms.word doc out from a predefined template that we
>> will be making. Some parts of the document created is changeable. I
>> think this is a solution for our prone to error documents we created
>> are too long and thus we came up into our mind that we can make a web-
>> app that could put in data and use that data combined with template
>> and generate a doc file.
>>  - Ajax capabilities = This will be my first
>> time developing a project using cakephp and since I'm a newbie with
>> cake, i would like to ask if it's easy to integrate with ajax
>> capabilities and etc.. So sorry about this question.
>>
>> Thanks much to all of you guys.
>>
>> Best Regards,
>> Dorell
>>
>> --
>> 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: Cake mail vs PHPMailer

2011-04-27 Thread Phang Mulianto
do you had tried swift mailer ?



On Wed, Apr 27, 2011 at 1:03 PM, Jeremy Burns
wrote:

> A generic question really. I've seen a few articles that recommend
> using PHPMailer for generating emails in preference to the Cake email
> component, especially for bulk emails. Is there any substance to this
> suggestion? What might the advantages be?
>
> --
> 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: thumbnail generator

2011-04-08 Thread Phang Mulianto
Is it better generaste image on the fly or when uploading we resixze
to some thumbnail size and save the image to be loaded later..

How about the performance issue if the site in full load..any experience so far?

On 4/8/11, euromark  wrote:
> actually you can use any generator - because you can generate any size
> you want
> from 1 up to 100
> its just a matter of "GD or Imagick?"
>
> there are many cake thumbnail helpers available
> the first google result would be
> http://www.studiocanaria.com/articles/cakephp_thumbnail_helper
>
> the principle is always the same
> upload in original size, dont do anything with it.
> generate thumbnails on demand, that means in the view where it is
> rendered.
> you usually store the images as some kind of hash value and if this
> hash already exists
> use this image otherwise generate it.
> pretty easy
>
> if you have trouble with quality, you forgot to "resharpen" the image.
> never forget that if you reduce the image size dramatically.
> using phpthumb as library (which i recommend!) you can easily add a
> sharpen filter which will improve the quality by 200 to 300% - at
> least.
>
>
> On 8 Apr., 16:54, Rishab Jain  wrote:
>> Hi,
>>
>> I tried so many thumbnail generators available over internet. But none
>> of them proved to be of a good quality.
>>
>> I need a thumbnail generator which I can use to generate 2 separate
>> copies the image uploaded of 2 different sizes.
>>
>> Has someone used any generator in cakephp?
>>
>> regards,
>> Rishab
>
> --
> 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: Chat in Cakephp

2011-03-29 Thread Phang Mulianto
maybe you can use other opensource chat system, and plug it in your cake
app...

or you build a new one with your knowledge.

i choose build it from zero myself, so i can also practice my coding
experience.

tq


On Tue, Mar 29, 2011 at 2:12 PM, Shashank wrote:

> Hi,
> I want to implement chat in my cakephp. I did a search over the net
> and found only one "Ajax Chat Plugin", but i have two issues in it:
> 1. How to implement it. I am getting problems in that.
> 2. Is this is the only plugin available for chat in cakephp??
>
> 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: Lock a page that is being edited by another user

2011-03-15 Thread Phang Mulianto
i aggre with using ajax to checking the edited record.

and display notification if the current data is edited by some other users.
and when saved, the change is displayed both, so user can choose to use
which version that the document updated.. or merge it altogether

On Tue, Mar 15, 2011 at 11:55 AM, Ryan Schmidt
wrote:

> On Mar 14, 2011, at 14:38, cricket wrote:
> > On Mon, Mar 14, 2011 at 11:29 AM, Sarpidon wrote:
> >>
> >
> >> What I did was to create a hidden input with the current timestamp
> >> (when the edit page is generated)
> >>
> >> Upon save I check if the record has a greater timestamp than the one
> >> from the hidden input and if so i redirect back with a flash message
> >> saying "This post has already been updated by user XXX 3 minutes ago".
>
> That sounds ok. Or you could store with each record a randomly-generated
> "edit id" when the record is saved. You'd put this edit id into the form,
> and if the edit id sent from the form doesn't match what's in the database,
> the record has been edited by someone else in the meantime. Not sure how or
> if this is better than using the timestamp as you suggest, but it is the
> strategy that FileMaker Pro employs, or at least used to employ in the early
> 2000's when I was working with it.
>
>
> >> I think this is a better approach as it does not lock the page rather
> >> than check whether the record has been updated while you were editing
> >> the page. The problem with this is that all the changes are lost. So I
> >> am thinking of creating custom validation function that will handle
> >> the data.
> >
> > I think this would frustrate me to no end as an end user. I'd much
> > rather find the file locked for editing than to discover that my
> > changes have been discarded because someone else happened to hit save
> > while I was still writing.
>
> It is the strategy employed by systems like Trac, and it seems to work ok.
> Yes sometimes I'm frustrated that someone else has edited the record. In
> these cases, I have to copy out my modifications (usually just a new
> comment), reload the page, paste, save.
>
> The problem with "locking" the record is that there isn't any such
> operation on the web. I could easily start editing a page, then decide not
> to, and close the window, or navigate somewhere else. If you use a 15-minute
> timer as suggested earlier in this thread, then you still have the original
> problem of overwriting someone else's edits if your edits take longer than
> 15 minutes to make (or if you open an edit page, forget about it, and come
> back to it more than 15 minutes later -- something I do *all* the time).
>
> An AJAX approach could work better, if thought through carefully, but is
> also more work to code, so I haven't tried to do that yet.
>
>
>
> --
> 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: PHP framework

2011-02-08 Thread Phang Mulianto
hell yeah..go for it..

On Tue, Feb 8, 2011 at 10:37 PM, Tilen Majerle wrote:

> of course u can :D
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2011/2/8 Ryan Schmidt 
>
>
>> On Feb 8, 2011, at 02:17, appi wrote:
>>
>> > i want to develop large scale web application ,which is basically
>> > contains following features
>> >
>> > Online Registration process
>> > User Accounts
>> > Huge Data
>> > Payment Gateway and other security features
>> >
>> > can i go for cakephp framework to build this application
>>
>> Sure, have fun!
>>
>>
>>
>> --
>> 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: Using or not using PHP framework

2010-12-01 Thread Phang Mulianto
if you try with cake, you won't look back again cause once you got the tools
in you control..you rockkk !!!

anyway, if you want to switch back from cake to traditional way of doing
things in php, the format is still php and your code can be used, but you
need some MVC clean up if not using cake, except if you do mvc in your other
coding standart . . .



On Wed, Dec 1, 2010 at 10:34 PM, Tilen Majerle wrote:

> Your programming will be more clean and easily for editing if u use
> framework
>
> yes, in cakephp are .ctp files for views, which means "cake template"
>
> in finally...i will say that cakephp will really help u if u work on a
> large project...
> --
> Tilen Majerle
> http://majerle.eu
>
>
>
> 2010/12/1 Raj 
>
> What changes will my web application finally have if I use a cakephp
>> framework rather than not using it?
>> Can I later on change my application without the framework? Does the
>> file types & formats of my application application remain the same
>> whther or not I chose to use framework?
>>
>> I think the file type does gets changed..normally its .php but with
>> cakephp its something else
>>
>> 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: Is there a way to speed up cake for a high traffic website ( Cake + Postgres )

2010-04-14 Thread Phang Mulianto
you can optimize your cake so it not always query to sql everytime user
access the same data.
you can do it with memcache, cake cache component with time caching method,
so if your data is not always changing, like in 1 hour you got 1 update, you
can cache it in your memcache, and in the app caching, make it query against
db in 1 hour ...

it a lot of optimization in my apps... cause user need the same data
anyway..and 500 user query the same data in 1 minute is a lot of resource..
but with cahce, you retreive it once from db, use it all the time, and
update it in the time set up for it..



On Tue, Apr 13, 2010 at 2:07 AM, altermod  wrote:

> I think I just need to turn off transactions since I'm using Postgresql. I
> get 2 transaction queries Begin / Rollback on pages where I make no db
> queries. This is definitely not necessary.
>
>  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

To unsubscribe, reply using "remove me" as the subject.


Re: how to create table in database from cakephp

2008-10-10 Thread Phang Mulianto
oh .. you want to create table in your apps..
well , are you already try use $this->model->query

http://komikz.blogsite.org


On Fri, Oct 10, 2008 at 3:49 PM, gunung pangrango <[EMAIL PROTECTED]>wrote:

> Hello everyone??
>
>
> i'm newbie in cakephp and now i'm develop web application with cakephp and
> mysql...
> in my application user can add table or add field table from user
> interface...such us phpmyadmin user can define table name , field name ,
> field type and more...
>
> and now i want to know how to create that application using cakephp and
> mysql...
>
> thanks for ur help...
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Site powered by CakePHP

2008-10-09 Thread Phang Mulianto
nice simple project . . .

what version you are using ?


-
any spare time ?
http://komikz.blogsite.org
-

On Thu, Oct 9, 2008 at 5:58 AM, Gabriel Kolbe <[EMAIL PROTECTED]> wrote:

>
> Looks good, how do you join the project? By registering in the site?
>
> On Wed, Oct 8, 2008 at 8:58 PM, dezpo <[EMAIL PROTECTED]> wrote:
> >
> > Hello bakers,
> > Just wanted to show you what I have did in the past 2 months using
> > cakephp. This is my new site about car fans. If you have time please
> > try to test it or even join this project. Thank you.
> >
> > www.autolive.org
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Saving with hasMany in 1.2

2007-08-29 Thread Phang Mulianto

i think you miss something...
in the model... you should add more param in the has many and belongs
to so the update and delete is automaticaly done by cake..

here is my example code model :

* @packagecake
* @subpackagecake.app.config
* @sinceCakePHP(tm) v 0.2.9
* @version$Revision: 4409 $
* @modifiedby$LastChangedBy: phpnut $
* @lastmodified$Date: 2007-02-02 07:20:59 -0600 (Fri, 02 Feb 2007) $
* @license
http://www.opensource.org/licenses/mit-license.php The MIT License
*/
class Mutation extends AppModel {
   var $name = 'Mutation';

   var $hasMany = array('Transaction' =>
 array('className' => 'Transaction',
   'conditions'=> '',
   'order' => '',
   'limit' => '10',
   'foreignKey'=> 'mutation_id',
   'dependent' => true,
   'exclusive' => false,
   'finderQuery'   => ''
 )
  );

}

?>

http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm)
Project
* @packagecake
* @subpackagecake.app.config
* @sinceCakePHP(tm) v 0.2.9
* @version$Revision: 4409 $
* @modifiedby$LastChangedBy: phpnut $
* @lastmodified$Date: 2007-02-02 07:20:59 -0600 (Fri, 02 Feb 2007) $
* @license
http://www.opensource.org/licenses/mit-license.php The MIT License
*/
class Transaction extends AppModel {
   var $name = 'Transaction';

  var $belongsTo = array('Mutation' =>
   array('className'  => 'Mutation',
 'conditions' => '',
 'order'  => '',
 'foreignKey' => 'mutation_id'
   )
 );

}

?>

you need to add the foreignkey array variable...

hope this help..i also tryin to figure it out on my own...hope helps..


On 8/30/07, LS <[EMAIL PROTECTED]> wrote:
>
> Hello, everyone!
>
> I would like a little help from you guys, if I may...
>
> I have 3 tables, wich are linked to each other with a "middle"
> controller...
>
> Transaction - TransactionCenter - Center
>
> These are the models:
>
> class Transaction extends AppModel {
>var $name = 'Transaction';
>var $belongsTo = array('Company', 'Person');
>var $hasMany = array('TransactionCenter');
> }
>
> class TransactionCenter extends AppModel {
>var $name = 'TransactionCenter';
> var $belongsTo = array('Transaction', 'Center');
> }
>
> class Center extends AppModel {
> var $name = 'Center';
> var $hasMany = 'Transaction';
> var $belongsTo = 'Account';
> }
>
> When the controller asks the model to save (with $this->Transaction-
> >save($this->data)), it saves successfully, but only the Transaction
> model. Not the TransactionCenter.
>
> When I as a print_r($this->data), before saving, here's what I get:
>
> Array
> (
> [Transaction] => Array
> (
> [id] => 1
> [description] => Sistema Construtora
> [doc] =>
> [value] => 2200.00
> [due_date] => 2007-08-01
> [person_id] => 1
> )
>
> [TransactionCenter] => Array
> (
> [0] => Array
> (
> [transaction_id] => 1
> [amount] => 1500.00
> [porcentage] =>
> [center_id] => 1
> )
>
> [1] => Array
> (
> [transaction_id] => 1
> [amount] => 250.00
> [porcentage] =>
> [center_id] => 2
> )
>
> [2] => Array
> (
> [transaction_id] => 1
> [amount] => 155.55
> [porcentage] =>
> [center_id] => 3
> )
>
> [3] => Array
> (
> [transaction_id] => 1
> [amount] => 555.22
> [porcentage] =>
> [center_id] => 4
> )
>
> )
>
> )
>
> Can anyone give me a hand? I've been bumping into the wall with this
> for quite some time...
>
> I already have data in Transaction and TransactionCenter tables. I
> added some custom data directly into the database to have a test for
> my layout and such. I am now trying to make the edit action to work to
> later make the add action.
>
> The CREATE TABLE statements:
>
> CREATE TABLE  `transactions` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `created` datetime NOT NULL,
>   `modified` datetime NOT NULL,
>   `company_id` int(10) unsigned NOT NULL,
>   `person_id` int(10) unsigned NOT NULL,
>   `center_id` int(10) unsigned NOT NULL,