Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-10-13 Thread bytte
Thanks man. Appreciate your answer so long after the thread was started. Ryan Lange wrote: This is an old thread, but I noticed that no one actually hit upon the *real* problem. On Mon, Feb 16, 2009 at 7:28 AM, bytte thomas.bytteb...@gmail.com wrote: Bug in my code or bug in Zend

[fw-general] Keep me logged in + Password reset for login forms

2009-05-20 Thread bytte
I've created a basic login system using Zend_Auth and Zend_Acl and now I'm wondering what's the best way to expand my login form with these two extra functionalities: - keep me logged in on this computer feature - password reset if visitor has forgotten password These two things seem pretty

Re: [fw-general] Calling exter nal autoload function – how to?

2009-04-12 Thread bytte
($filename)) { return include_once $filename; } return false; } require_once Zend/Loader.php; spl_autoload_register('My_DOMPDF_Autoload'); Zend_Loader::registerAutoload(); Matthew Weier O'Phinney-3 wrote: -- bytte thomas.bytteb...@gmail.com wrote (on Friday

[fw-general] Calling externa l autoload function – how to?

2009-04-10 Thread bytte
I'm using DOMPDF in a project of mine and I was wondering how I can call DOMPDF's autoload function so it can function together with the one from Zend Framework. Here's what DOMPDF says: /** * DOMPDF autoload function * * If you have an existing autoload function, add a call to this function

Re: [fw-general] Calling exter nal autoload function – how to?

2009-04-10 Thread bytte
: spl_autoload_register('DOMPDF_autoload'); Make sure that loader is registered late in the stack because it does a require_once, meaning it will throw a fatal if it fails and will prevent the other autoloaders from trying to load the class. -- Mon On Fri, Apr 10, 2009 at 9:22 PM, bytte thomas.bytteb

Re: [fw-general] Calling exter nal autoload function – how to?

2009-04-10 Thread bytte
/zf-test/library/dompdf-0.5.1/dompdf_config.inc.php on line 194 What am I doing wrong? Matthew Weier O'Phinney-3 wrote: -- bytte thomas.bytteb...@gmail.com wrote (on Friday, 10 April 2009, 09:28 AM -0700): Thanks. But I'm confused. Early on in my bootstrap I have this code

Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-17 Thread bytte
It would be great if you could share me some more details. Maybe point me in the right direction on how to share those PluginLoader objects between each element? Too bad I'm on a tight schedule (should be finished by the end of the week). If I don't hear back from the list I'll most likely take

Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-16 Thread bytte
Hi guys Thanks to your help I managed to load the page in only 15 queries whereas before I needed more than 1000 queries. That's great. However my page load problem hasn't been solved. I've installed xdebug and it lists this information: ( ! ) Fatal error: Maximum execution time of 30 seconds

Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-09 Thread bytte
less load on the mysql server. ChristophDorn wrote: bytte wrote: Hey that was interesting. I have the indexes defined and I see though Firebug that there's currently 381 queries being performed at 0.14949 seconds. I guess that means they're not the culprit? 381 DB queries is a lot

[fw-general] Zend_Cache simple practice question

2009-03-05 Thread bytte
I'm working on an application that mostly reads data from the database and occasionally writes data to the database. I'm considering implementing Zend_Cache to cache database queries but was struggling with the question how long the queries should be cached. That's why I thought it may be best

Re: [fw-general] Zend_Cache simple practice question

2009-03-05 Thread bytte
So you wouldn't recommend it? Giorgio Sironi wrote: 2009/3/5 bytte thomas.bytteb...@gmail.com That's why I thought it may be best to store all select() queries in the cache forever. Then whenever there's an update to a database table delete the cached queries that belong to that table

Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-04 Thread bytte
Hey that was interesting. I have the indexes defined and I see though Firebug that there's currently 381 queries being performed at 0.14949 seconds. I guess that means they're not the culprit? Are there any other tools to help me find out what code makes the script run so slow? Any help would be

Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-04 Thread bytte
I'm not. I'll look into that. keith Pope-4 wrote: Are you using the meta-data cache? -- View this message in context: http://www.nabble.com/Best-coding-practice--Form-takes-too-long-to-load-now.-tp22309252p22331385.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Best coding practice? Form takes too long to load now.

2009-03-04 Thread bytte
I have a form class that creates form elements based on database information. The problem is that the form takes more than 20 seconds to load on my localhost. On the web server it's even worse: the form doesn't load at all because of limited memory resources. I was hoping you guys could give me

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-03-02 Thread bytte
Thanks Thomas. I downloaded the trunk code today and now the script finds out that a file was submitted with a size bigger than what's allowed in php.ini. So that's great now. However, I found out the upload script is now only working about 50% of the times I tried it. I'll dive into my code

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-25 Thread bytte
Is anyone else having similar problems? I've spend a few hours on this issue already and couldn't come up with a decent solution. -- View this message in context: http://www.nabble.com/User-uploads-file-bigger-than-what%27s-allowed-in-php.ini%2C-can-it-be-caught--tp21936346p22206576.html Sent

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-18 Thread bytte
to the $_FILES array. Normally there should be an error (3 or 4) but it seems that in your case there is no file submitted in this case. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: bytte thomas.bytteb

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-17 Thread bytte
It's really weird. Since I'm using the code from the svn trunk it doesn't output the MAX_FILE_SIZE in the html code no more. It does show it in the first form on the same page. All my error messages display fine. But still no error message when the user uploads a file bigger than what's allowed

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-16 Thread bytte
Bug in my code or bug in Zend Framework? bytte wrote: I'm now using setMaxFileSize(). Here's the (reduced for readability) code in my controller to retrieve and validate the form input. I have two forms on the same page so that's why I do the array_key_exists thing to check which form

[fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-10 Thread bytte
I'm using Zend_File via Zend_Form_Element_File to let my web application's users upload files. I use the following Validators: $file1-setRequired(true) -addValidator('NotEmpty',true) -addValidator('Count',false,array('min' = 1, 'max' = 1)) -addValidator('MimeType', true,

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-10 Thread bytte
- From: bytte thomas.bytteb...@gmail.com To: fw-general@lists.zend.com Sent: Tuesday, February 10, 2009 4:43 PM Subject: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught? I'm using Zend_File via Zend_Form_Element_File to let my web application's

Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught?

2009-02-10 Thread bytte
Framework http://www.thomasweidner.com - Original Message - From: bytte thomas.bytteb...@gmail.com To: fw-general@lists.zend.com Sent: Tuesday, February 10, 2009 10:51 PM Subject: Re: [fw-general] User uploads file bigger than what's allowed in php.ini, can it be caught? Thanks

[fw-general] partialLoop() best practice

2009-02-05 Thread bytte
I use a partialLoop() to loop through query results in the view. So far so good. But for every item returned in the loop, I need to do another database query that returns another set of results that require a new partialLoop(). In the end I have a partialLoop() inside a partialLoop() inside a

[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?

2009-01-19 Thread bytte
I was wondering if someone found/uses a better way of dealing with this problem yet? -- View this message in context: http://www.nabble.com/Restricting-display-of-links-to-non-authorized-pages-in-view-scripts--how-to--tp20273593p21545475.html Sent from the Zend Framework mailing list archive at

[fw-general] Re[fw-general] ndering pdf's with DomPDF and ZF

2009-01-09 Thread bytte
I'm using DOMPDF to create PDF files from the html that Zend Framework outputs. Here's my code: public function downloadAction() { $this-_helper-layout-setLayout('prints'); require_once(dompdf-0.5.1/dompdf_config.inc.php); spl_autoload_register('DOMPDF_autoload');

[fw-general] Fatal error while trying to insert to db.

2008-12-09 Thread bytte
); $this-insert($data); return $this-getLastInsertId(); } (...) } However I get this error: Fatal error: Call to a member function describeTable() on a non-object in /Users/bytte/Sites/speelokee-test/library/Zend/Db/Table/Abstract.php on line 696 Do you know

Re: [fw-general] How to: relative paths inside javascript files

2008-11-11 Thread bytte
Of course, thank you! Jason Webster wrote: I'd simply assign your baseUrl to a javascript variable. You could add this to the 'head' tag in your layout: script type=text/javascriptvar baseUrl = ?php echo $this-baseUrl() ?/script -- View this message in context:

[fw-general] Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?

2008-10-31 Thread bytte
I managed to set up authentication through Zend_Auth and access control through Zend_Acl. This works without any problem. However, I'd like to take things one step further. My view scripts sometimes display links to pages that are not accessible by the logged in user, because that user does not

[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?

2008-10-31 Thread bytte
Thanks Martin, That's what I did so far, but I'm not happy with all those 'if/else' clauses in my view script. I was hoping for a better way. Chris Martin wrote: You could make a view helper. -- View this message in context:

[fw-general] Re: Re[fw-general] stricting display of links to non-authorized pages in view scripts- how to?

2008-10-31 Thread bytte
Thanks nwhiting, but links and such are view information, right? So don't they belong in the view? Think of an image linking to an edit page... nwhiting wrote: Pass the edit link based on the Acl level to the view instead of trying to do it in the view :) -- View this message in

[fw-general] Zend_Form validation messages are shown before submit

2008-10-30 Thread bytte
I managed to create a quite complex form. I had to play around with decorators and I guess this is where it went wrong. The form displays nice but on page load the validation messages are shown even though the user hasn't submitted anything yet! The form is not even filled in yet. What's worse is

Re: [fw-general] Zend_Form validation messages are shown before submit

2008-10-30 Thread bytte
Thanks a lot. Saved me a headache! bytte wrote: I managed to create a quite complex form. I had to play around with decorators and I guess this is where it went wrong. The form displays nice but on page load the validation messages are shown even though the user hasn't submitted anything

[fw-general] Image upload, validation and manipulation

2008-10-28 Thread bytte
I'm about to start implementing image uploads in my Zend Framework project. I've tried to work with image uploads a few months ago and it appeared to be not that straightforward at that time. The ZF documentation wasn't sufficient either. I was wondering if anyone here has links to good

[fw-general] Populating, validating form elements with array notation

2008-10-28 Thread bytte
I'm using Zend_Form to build a form with array notation like this: (...) input name=text[] type=text input name=text[] type=text (...) The reason for this array notation is that I want to be able to dynamically add input elements to the dom through javascript. I can read the input values through

Re: [fw-general] Image upload, validation and manipulation

2008-10-28 Thread bytte
Thanks! Additionally: if anyone is in the know of any good tutorials on the net that could come in handy on this topic, feel free to post them here. -- View this message in context: http://www.nabble.com/Image-upload%2C-validation-and-manipulation-tp20211804p20219873.html Sent from the Zend