Re: PHP output buffering

2009-02-19 Thread Marcelius
And what does this have to do with cakephp? :-) On 19 feb, 10:06, Double donovan.dso...@gmail.com wrote: I'm trying to execute an asp page from php and get the executed web page (html) to parse. When I run fopen, it just returns the actual script. Any ideas?

Re: PHP Speedy Helper Problems

2009-02-05 Thread Marcelius
I've found the problem: I've used v0.4.6, and you have probably v0.5.2. I'll update the artice since there are many changes made between these two versions. The last time I updated an article, it got unpublished again for some reason, so please be patient :-) On 5 feb, 03:20, Kyle Decot

Re: Top 10 Framework

2009-02-03 Thread Marcelius
http://www.ibuildings.com/blog/archives/1543-My-framework-is-better-than-all-other-frameworks.html On 2 feb, 01:11, yusuf widi wmo...@gmail.com wrote: Hi guyz... i got this somewhere on the net... http://www.phpframeworks.com/top-10-php-frameworks/ Why they put cake php on the fifth place?

Re: named params and prefix routing

2009-01-07 Thread Marcelius
/calendar_entries/entries/future:1 Anything new about this problem here? TIA, Phil Marcelius schrieb: I'm usually not the guy who bumbs postings but this problem still exists... So my question is: is this behavior by design or am I doing something wrong? On 12 dec, 07:53

l10n broken in cake1.2 after update

2009-01-05 Thread Marcelius
Hi! I've the cake folder from 1.2 beta to 1.2 final, but all translations with the __() function don't work anymore. (And they did work in 1.2beta) I've cleared the tmp folder, renewed session but no result. Any ideas? --~--~-~--~~~---~--~~ You received this

Re: l10n broken in cake1.2 after update

2009-01-05 Thread Marcelius
I 'fixed' this by adding this to the core.php: Configure::write('localePaths', array(APP . 'locale')); Strange On 5 jan, 14:59, Marcelius mraaijmak...@gmail.com wrote: Hi! I've the cake folder from 1.2 beta to 1.2 final, but all translations with the __() function don't work anymore

Re: named params and prefix routing

2008-12-16 Thread Marcelius
I'm usually not the guy who bumbs postings but this problem still exists... So my question is: is this behavior by design or am I doing something wrong? On 12 dec, 07:53, Marcelius mraaijmak...@gmail.com wrote: Thanks for the anwser but that didn't work here. The be more clear: If I do

named params and prefix routing

2008-12-11 Thread Marcelius
Hello! I have this route like the manual says for prefix routing: Router::connect('/owner/:controller/:action/*', array ('prefix'='owner', 'owner'=true)); This works fine until I want to create a url with some named params in it: Router::url(array(controller=invoices, action=edit, 5,

Re: named params and prefix routing

2008-12-11 Thread Marcelius
, 4:39 am, Marcelius mraaijmak...@gmail.com wrote: Hello! I have this route like the manual says for prefix routing: Router::connect('/owner/:controller/:action/*', array ('prefix'='owner', 'owner'=true)); This works fine until I want to create a url with some named params

Re: Creating PDF with cakePHP and TCPDF

2008-11-13 Thread Marcelius
Have you tried to check if tcpdf generated errors? Sometimes if you send headers, and (php)errors occure, you might not always see some output. So echo something in your controller and then php should at leas tell you 'headers allready sent' error. Before that, (php)errors will show Also, in the

Re: Jquery or Scriptalicious?

2008-10-31 Thread Marcelius
@Anupom: Any arguments? Anupom schreef: I think PHP helper for writing Javascript is a very bad idea. On Fri, Oct 31, 2008 at 3:23 PM, martinp [EMAIL PROTECTED] wrote: Despite the fact that CakePHP comes with a Scriptaculous-powered AJAX Helper, I find JQuery so much easier to use that

Re: CakePHP performance issue.

2008-10-23 Thread Marcelius
Growing average time starting from 1000ms? That's a lot :-) If i try request one page without database queries (and debug = 0), on our dev server (local network) the response time is about 400ms. Our live server is located somewhere else in the country with load balancing enabled and usually

Re: CakePHP performance issue.

2008-10-23 Thread Marcelius
: 1186 - 5 200: 2374 - 148650 Noone will not wait 50 seconds untill page load. If I look at system, CPU is loaded (much more vs native-php, but not enough to 100% :), but not overloaded until 25 Threads. On Oct 23, 1:55 pm, Marcelius [EMAIL PROTECTED] wrote: Growing average time starting

Re: CakePHP performance issue.

2008-10-22 Thread Marcelius
I was wandering if your stress test setup is correct and relevant? 100 threads and ramp up of 5 seconds, that's 20 requests per second. You have 2 pages / requests to test, which would actually generate 40 requests per second. That would initially explain that 5ms response time because

Re: flood control?

2008-09-25 Thread Marcelius
You can't make sessions count down. Instead of setting 30sec in your session,store mktime() for the current time. Next time a user hits the send button you check the current time with the time you allready had stored in your session. Note that if a user deletes the browsers cookie, session get

Re: soap on cake 1.2

2008-09-08 Thread Marcelius
Hi Don't know the exact problems you have but here's a piece of my soap implementation. Please note that this is done with php5's sope extension, not nusoap. In my site: domain.com/soapcontroller/wsdl renderes a wsdl file like so: public function wsdl(){

Re: soap on cake 1.2

2008-09-08 Thread Marcelius
generation of wsdl files but I found it a bit buggy (read: crashed alot) Also remember to disable the soap wsdl cache in PHP :-) On 8 sep, 12:42, . [EMAIL PROTECTED] wrote: Marcelius, how do you generate the wsdl files? do you use jool.nl's wsdl component, or does php's soap extension generate

Re: exception handling in phpcake

2008-06-23 Thread Marcelius
If you are talking about Exception classes (with try..catch) there are none because cake is php4 PHP errors are handled by the debugger class On 23 jun, 06:36, SajjadRaza [EMAIL PROTECTED] wrote: what is the built in mechanism of excetion handling in cakephp can we use the custom exception in

Set response header of ajax call

2008-06-23 Thread Marcelius
Hi! I have a controller with the RequestHandler component attached, and a method called by ajax. Now I want to return pure JSON and to do that I need to set the response header content-type to application/json. The problem is that the RequestHandler automaticly sets this response header so by

Re: Missing database table

2008-06-20 Thread Marcelius
If you turn debug mode to 1, cache is refreshed so any changes in the database will be recognized :-) On 20 jun, 11:06, leo [EMAIL PROTECTED] wrote: On 20 Juny, 10:33, Siebren Bakker [EMAIL PROTECTED] wrote: I ran into a similar problem, and found an interesting solution that took care of

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread Marcelius
Hey Foreach form create a new instance of corresponding model where data should be saved: $foo = new MyModel(); foreach($posteddata){ $foo-create($myPostedData); if ($foo-validates()){ //great... } else { $errors = $foo-validationErrors; ] All your other questions are well documented btw :-)

Re: Infinite redirect when logout with AuthComponent

2008-06-16 Thread Marcelius
the same kind of problem. I think it happens when you have a component that extends Component the problem goes away when you have you components extend Object any one would comment on this ? TIA thomas On Jun 10, 4:41 pm, Marcelius [EMAIL PROTECTED] wrote: Hi Just upgraded

Infinite redirect when logout with AuthComponent

2008-06-10 Thread Marcelius
Hi Just upgraded to CakePHP RC1 and after some minor fixes I found that I couldn't properly logout anymore. It caused the browser to continously redirect to the originating url. I found that the problem lies in the components used by my users controller: In UsersController: public function

Re: FindAll and multi-record form convention over configuration right?

2008-05-24 Thread Marcelius
For my project I did create 2 convert functions: One dat converts the array returned from findAll methods to {Model}.{n}.{Field}, and one visa versa. I've made this on 1.2.6311 and don't know what changes have been regarding this but still works for me... I too had some problems with the

Re: Form posting with type=get

2008-05-18 Thread Marcelius
the same result by just sending a GET request, but my way was just a little more predictable - and works well I think (check outhttp://www.bcfw.co.ukto see it in action). Steve On May 17, 7:39 pm, Marcelius [EMAIL PROTECTED] wrote: It is for a search engine :-) Build completly from scratch

Re: how to disable validation before saving model

2008-05-18 Thread Marcelius
Hi Depending on your current Cake version, here's the link for cake 1.2 (checkout the second parameter): http://api.cakephp.org/1.2/class_model.html#ebe42ae387be89985b5a35dd428f5c81 Marcel On 18 mei, 14:34, robert123 [EMAIL PROTECTED] wrote: This seem like a very basic question, but I did not

Re: Form posting with type=get

2008-05-17 Thread Marcelius
expand my knwoledge :) On May 16, 7:14 pm, Marcelius [EMAIL PROTECTED] wrote: I agree to. But it just doesn't make any sense to me that input names are stripped to the column names of a table only when using GET. What is the reason that cake handles get different from post? I

Re: Form posting with type=get

2008-05-16 Thread Marcelius
:52 am, Marcelius [EMAIL PROTECTED] wrote: Hi! The situation: //in some view I have: ?php echo $form-create(array(controller=search, action=index)); echo $form-input(Region.region_name); echo $form-end(); ? Straight forward, nothing to it... Now I want to post data via GET

Reverse routing and index action

2008-05-15 Thread Marcelius
Hi Is it possible to make the reverse routing work so that it doesn't add an index action to the url? For example: //In routes.php: Router::connect('/contact/:action/*', array('controller' = 'contacts')); //in some other file: $url = Helper::url(array(controller=contacts)); $url now contains

Re: Reverse routing and index action

2008-05-15 Thread Marcelius
Wy is it so damn simple :-p Thanks! Amit Badkas schreef: On Thu, May 15, 2008 at 12:18 PM, Marcelius [EMAIL PROTECTED] wrote: Hi Is it possible to make the reverse routing work so that it doesn't add an index action to the url? For example: //In routes.php: Router::connect

Form posting with type=get

2008-05-15 Thread Marcelius
Hi! The situation: //in some view I have: ?php echo $form-create(array(controller=search, action=index)); echo $form-input(Region.region_name); echo $form-end(); ? Straight forward, nothing to it... Now I want to post data via GET. Cake doesn't have to worry about handling the 'posted' data

Re: Class diagram (MVC)

2008-05-15 Thread Marcelius
Just curious, If you've created some app with cake, you could think of a mvc diagram yourself I think :-) Just think of how you work with it... You create a controller that extends from some other class, you can reference a model from that controller (which also extends from some other class),

Re: Setting up Cake as an Intranet framework?

2008-05-11 Thread Marcelius
You could store the specific models and controllers in a subfolder like so: app __controllers sales finance __models sales finance Cake will find controllers automaticly, but I thought this doesn't on views like this On 11 mei, 00:32, Dave [EMAIL PROTECTED] wrote: Hi All,

Custom View class in a Controller

2008-04-25 Thread Marcelius
Hello Can someone please tell me how to get the Controller::view property to work properly? I set the view to a custom view class in a controller (in the plugins folder). Whatever I tried, I didn't got Cake to load my view in a 'normal' expected way with any naming convention what so ever. What

A custom test reporter

2008-04-22 Thread Marcelius
Will there be an option in the future or CakePHP to somehow attach an additional custom test reporter to the testmanager? Searching through the code I didn't find anything usefull so I ended up hacking the test_manager to add my reporter in the CakeTestsGetReporter method. :)

Re: A custom test reporter

2008-04-22 Thread Marcelius
it is implemented now in the testmanager with setting defines and checking if a define is a specific value doesn't allow much room for extending. Just my thoughts On 22 apr, 12:09, Marcelius [EMAIL PROTECTED] wrote: Will there be an option in the future or CakePHP to somehow attach an additional

Model name and alias: The difference?

2008-04-15 Thread Marcelius
Hello! Simple question: When should I read from the Model::name attribute, and when from Model::alias? What do the mean and what is exactly the difference? Any conventions on that? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you

Re: Loading many Model in a Cakephp controller

2008-04-11 Thread Marcelius
Question: When would one deside to use ClassRegistry::init instead of App:Import and new() ? Wouldn't that be more memory efficient? On 11 apr, 01:59, Dardo Sordi Bogado [EMAIL PROTECTED] wrote: I was wondering if it is possible to load models inside a controller in the similar way as

Re: Loading many Model in a Cakephp controller

2008-04-11 Thread Marcelius
Thanks, got the point :-) On 11 apr, 13:08, Dardo Sordi Bogado [EMAIL PROTECTED] wrote: Question: When would one deside to use ClassRegistry::init instead of App:Import and new() ? Wouldn't that be more memory efficient? ClassRegistry::init() would store a reference, so it can be reused

Re: Howto secure a form / posted data from tampering?

2008-04-09 Thread Marcelius
when posting So it now works like this: Post the form -- if (blackHoleCallback defined) -- invoke callback (error=auth) AND save model or: Post the form -- if (no blackHoleCallback defined) -- do not save model On 8 apr, 17:49, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: Marcelius

Re: Howto secure a form / posted data from tampering?

2008-04-08 Thread Marcelius
Thanks for your anwsers! @Bert: Think that method is pretty straight forward, havn't checked it yet but I'm sure that will work without any problems @grigri: Seems like it doesn't do it's job like it should in my situation, do I need to configure something? I think it has something to do with