Re: SSL and https

2010-02-18 Thread jperras
http://github.com/plank/secured -jperras. On Feb 17, 12:54 am, Jeremy Burns jeremybu...@me.com wrote: Any takers on this please? Jeremy Burns jeremybu...@me.com On 12 Feb 2010, at 05:00, Jeremy Burns wrote: I am using the security component from app_controller. In some controllers I

Re: Data validation doesn't work when on live server

2010-02-18 Thread jperras
://gaarai.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/ 3) Write your own custom validation rules for any built-in rules that use multibyte flags in the regular expressions. There aren't really any other options. -jperras On Feb 17, 3:43 pm, Atti moltoespeci...@googlemail.com wrote

Re: Last retrieved data accessible in model?..

2009-11-08 Thread jperras
by implementing a Model::afterFind() in your app_model which caches the results. -jperras. On Nov 7, 4:06 am, jayarjo jaya...@gmail.com wrote: I wonder whether data retrieved by last query (as a result of Model- find() for example) is accessible in some internal Model variable? I'm trying

Re: Help Getting Model name

2009-11-08 Thread jperras
Look up what `array_keys()` does. -jperras. On Nov 8, 12:26 pm, Dave make.cake.b...@gmail.com wrote: Is there a simple way to get the model name from something like this? This is the data that's sent to cake. data[Contact][email] t...@something.com data[Account][email] te...@fake.com

Re: CakePHP + Python's scipy/numpy/matolab/etc?

2009-11-04 Thread jperras
http://stackoverflow.com/questions/166944/calling-python-in-php http://www.csh.rit.edu/~jon/projects/pip/ It's not the simplest thing, but it's doable. -j. On Nov 2, 1:43 am, Josh joshs.silver...@gmail.com wrote: Hello, I've got a question about mixing languages in a project: I am using

Re: caching Media View

2009-10-31 Thread jperras
Setting the 'cache' option will send the Cache-Control: max- age=time, Expires=converted time and Pragma: cache headers. It does not change the response HTTP 1.1 code to 304, nor does it set the If-Modified-Since header. -j. On Oct 31, 2:17 am, tol daviddevr...@gmail.com wrote: Can someone

Re: Before render being called twice?

2009-10-23 Thread jperras
It's called once for rendering the layout, and a second time for rendering the view that gets inserted into $content_for_layout. -jperras. On Oct 21, 9:09 am, Amit Rawat rawatami...@gmail.com wrote: Hello friends,  I am having a problem my before render function in app controller is being

Re: How to add a random number while including a css file ?

2009-10-07 Thread jperras
Uncomment the configure directive of Asset.timestamp in app/config/ core.php. If set to true, it will add a timestamp querystring parameter to your CSS and Javascript files when in production mode (debug = 0). -j. On Oct 7, 6:05 am, Abhishek abhishek...@gmail.com wrote: Hi, I was facing some

Re: Possible bug relative to use of memcache

2009-10-07 Thread jperras
Memcache being used as a cache configuration and Sessions have pretty much nothing in common, unless you've set your session save handler (in app/core.php) to be cache-based, which is usually not a good idea unless you know what you're doing. -j. On Oct 6, 5:19 pm, marco.rizze...@gmail.com

Re: textmate snippets not working

2009-09-03 Thread jperras
This is the official textmate bundle: http://thechaw.com/cakephp_tmbundle (the one you link to is a fork of the official one on github). The one currently in the textmate subversion repository was unofficial, and was for a much earlier version of CakePHP. -jperras. On Sep 3, 12:39 am

Re: CakePHP + PHP5.3 = ?

2009-08-31 Thread jperras
project which is a complete rewrite of the CakePHP framework from the ground up, and will *only* support PHP 5.3 and up. I hope this clears up some of the confusion. -jperras. On Aug 30, 2:45 pm, Miles J mileswjohn...@gmail.com wrote: Yeah im pretty positive it wont be interchangeable. It uses

Re: CakePHP + PHP5.3 = ?

2009-08-31 Thread jperras
project which is a complete rewrite of the CakePHP framework from the ground up, and will *only* support PHP 5.3 and up. I hope this clears up some of the confusion. -jperras. On Aug 30, 2:45 pm, Miles J mileswjohn...@gmail.com wrote: Yeah im pretty positive it wont be interchangeable. It uses

Re: CakePHP + PHP5.3 = ?

2009-08-31 Thread jperras
Coffee, and very understanding girlfriends/boyfriends/husbands/ wives ;-). On Aug 31, 12:08 pm, d mil...@gmail.com wrote: how do you guys find the time? seriously. you people are awesome. On Aug 31, 7:19 am, jperras joel.per...@gmail.com wrote: Alright guys, it seems like you're all a bit

Re: javascript - link in element doesnt work

2009-07-23 Thread jperras
meant for use in custom helpers that need to insert scripts into the header. -jperras. On Jul 23, 2:46 am, Yannis ikasso...@gmail.com wrote: Thanks guys, The thing is that scripts_for_layouts is in an element that I include in the layout. And this is for the simple reason that the head elements

Re: Model validation on unit testing

2009-07-23 Thread jperras
Look up the difference between the 'required' rule and the 'notempty' rule. http://book.cakephp.org/view/129/required -jperras. On Jun 7, 9:14 am, williamn wnotowida...@gmail.com wrote: Hi all, I have a simple model like below class Department extends AppModel {         var $name

Re: Official forum for CakePHP

2009-07-10 Thread jperras
You can do all of this already. Use http://bin.cakephp.org (or any other online bin of your choice), and paste the link here. With the Google Groups, you don't need categorization. Google is pretty damn good at searching indexing the groups. A forum would only duplicate functionality, and

Re: Automated Functional Testing

2009-07-10 Thread jperras
Selenium is quite well suited for functional testing, and has a huge amount of features, and doesn't require you to write tests in XML (*shudder*) or in Groovy (dying language). You can even get distributed testing up running quickly enough, which offsets the test time allows you to test as

Re: Automated Functional Testing

2009-07-10 Thread jperras
Also, while the information you provide is great, it can be done without the blatant spam for your Software Testing Training. If people want to attend a training, they can find one easily enough. On Jul 9, 8:05 am, Software Testing Training qacampu...@gmail.com wrote: Automated Functional

Re: marketplace app, prevent users from buying their own stuff

2009-07-10 Thread jperras
And how are you going to prevent people from registering with a different username/id just buying their products from that account? On Jul 8, 11:47 pm, Jacob Everist jacob.ever...@gmail.com wrote: I have question on the best way of applying rules to types of actions on certain models with

Re: A Search Behavior

2009-07-10 Thread jperras
It's already implemented being used on the cookbook as a plugin: http://thechaw.com/cakebook/source/plugins/searchable It uses Lucene the adapter from ZendFramework, and works well enough. -j. On Jul 10, 11:29 pm, Stinkbug justink...@gmail.com wrote: I've done a little searching around on

Re: Form Validation: Opposite of EqualTo (NotEqualTo, Does Not Equal)

2009-07-04 Thread jperras
http://book.cakephp.org/view/139/comparison -j. On Jul 2, 5:13 pm, hoyos andrew.hatte...@gmail.com wrote: Hey, Simple question, is there a built-in form validation function to validate that a field DOES NOT EQUAL a certain value? For example: 'password' = array( 'rule' =

Re: Component in view

2009-07-02 Thread jperras
You don't. Get the data you need from your component in the controller, and set it to the view using Controller::set, (e.g. $this- set('mydata', $this-MyAwesomeComponent-getAwesomeValue()); ) -j. On Jul 2, 9:04 am, Ragnis ragnis.ar...@gmail.com wrote: How can i use my component inside views?

Re: Connecting to web services

2009-06-26 Thread jperras
Use a custom datasource HttpSocket. On Jun 26, 12:09 am, Turgs timb@gmail.com wrote: Hello Within a few different controllers, I need to connect to a web service using a URL similar to: http://api.example.com/?command=Subscriber.Adddata...@test.com What's the appropriate cake way to

Re: cakephp project scaling, load balancing problem by using xampp linux on centos

2009-06-25 Thread jperras
Would it be possible to use database session storage in your application instead? There are two configuration changes that need to be made in your app/core.php file, and one table that needs to be created in your database. The rest should happen automagically. I've found that with load-balanced

Re: New Behavior not 'attaching' on live server...

2009-06-25 Thread jperras
Try naming it 'datetime.php' instead of 'Datetime.php'. Some operating systems are more case sensitive than others, and PHP itself has a few odd casing rules for method names object instances. Also, lowercase filenames are the convention. -J. On Jun 24, 12:35 pm, SCM willys.c...@gmail.com

Re: Change the content-type

2009-06-23 Thread jperras
controller as Miles J suggested: $this-header('Content-Type: text/xml'); I got an XML object in my responseXML. Are we missing something?  Or the requesthandler is not working as wished? Lapinski jperras wrote: Use the RequestHandlerComponent::respondAs method. This should set

Re: Change the content-type

2009-06-16 Thread jperras
wrote: But it doesn't work. Even if you use the Request Handler to output as XML, it is not XML. On Jun 15, 7:50 am, jperras joel.per...@gmail.com wrote: You should be using the RequestHandler Component for content-type setting/detection of your views and actions. http://api.cakephp.org

Re: Change the content-type

2009-06-15 Thread jperras
You should be using the RequestHandler Component for content-type setting/detection of your views and actions. http://api.cakephp.org/class/request-handler-component -j. On Jun 14, 5:56 pm, Peter peterdun...@gmail.com wrote: thanks, that's what i neededalthough i moved it to the top of

Re: Persistent model to true - Fatal error

2009-06-07 Thread jperras
. On Jun 2, 3:57 pm, jperras joel.per...@gmail.com wrote: Are you using the ClassRegistry or manually importing classes (specifically Models) using App::import anywhere ? What version of CakePHP are you running? -j. pauloamgomes wrote: Hi all, when i activate persistent model

On Tickets The Core Team: Why some tickets get tagged as 'wontfix' or 'invalid'

2009-06-03 Thread jperras
(for context, please read the comments for ticket #5145: https://trac.cakephp.org/ticket/5145 . I chose continue this discussion in the google group because it is a more appropriate venue for this type of discourse). First, let me state that neither myself or *anyone* on the CakePHP core team

Re: Persistent model to true - Fatal error

2009-06-02 Thread jperras
Are you using the ClassRegistry or manually importing classes (specifically Models) using App::import anywhere ? What version of CakePHP are you running? -j. pauloamgomes wrote: Hi all, when i activate persistent model to true in my application, it breaks my models, I'm getting the

Re: is try catch necessary in CAKEPHP!

2009-06-02 Thread jperras
CakePHP is PHP. You can use whatever language constructs that PHP provides you, including try/catch blocks for operations that could throw exceptions. -j. sharmaji wrote: Hi, Is there any use of try and catch block in cake php? if yes, please suggest me how can i implement that? currently i

Re: Determine which database driver is being used

2009-05-29 Thread jperras
Determine which database driver is being used http://api.cakephp.org/class/model#method-ModelgetDataSource As for your custom query, it really depends. Cake does a lot for you, but sometimes it makes sense to drop down to the bare metal and write a custom query. -j. On May 28, 12:46 pm,

Re: Determine which database driver is being used

2009-05-29 Thread jperras
Determine which database driver is being used http://api.cakephp.org/class/model#method-ModelgetDataSource As for your custom query, it really depends. Cake does a lot for you, but sometimes it makes sense to drop down to the bare metal and write a custom query. -j. On May 28, 12:46 pm,

Re: Security question

2009-05-21 Thread jperras
If you're not modifying form fields with javascript, AJAX form submissions should have no impact on the use of the Security component and it's ability to prevent CSRF attacks. -j. On May 20, 11:22 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am trying to break my

Re: api.cakephp.org still broken

2009-05-17 Thread jperras
for filing those tickets, but next time you can keep the attitude to yourself. -jperras. http://nerderati.com/open-source-is-not-a-democracy On May 17, 6:31 am, Mr-Yellow meisteryel...@gmail.com wrote: Just remove the overflow attribute from the CSS and the window will no longer have a hidden

Re: Release: 1.2.3.8166

2009-05-04 Thread jperras
On May 4, 6:20 pm, Brett Wilton bdwil...@gmail.com wrote: Thanks gwoo and all the dev. To find out about the 1.3 features and to keep up with progress on 1.3 is thehttp://thechaw.com/cakephp/wiki/1.3wiki the best place to follow this ? yep. That and the aggregate timeline of the master