[fw-general] Catching catched exceptions

2008-10-08 Thread Mauricio Cuenca
Hello, I have an application that started small and now its big. The problem is that each database transaction has a try/catch statement. Now I want to capture all those exceptions and send them to the error controller to display friendly error messages to users in the production environment. I

Re: [fw-general] Catching catched exceptions

2008-10-08 Thread Mauricio Cuenca
milar, but the code has many SQL calls like this. I don't want to change each one manually. Marcello Duarte wrote: > > What code is in your catch statement? > > > Mauricio Cuenca wrote: >> >> Hello, >> >> I have an application that started small and

Re: [fw-general] Catching catched exceptions

2008-10-08 Thread Mauricio Cuenca
The error controller should by default be setup to catch > the exception. > > Hope that helps. > > Luke > > Mauricio Cuenca wrote: >> Hello Marcelo, >> >> It's basically something like this: >> >> try { >> $result = $dbconn->q

[fw-general] No default module in Test

2008-10-08 Thread Mauricio Cuenca
I'm trying to setup a test suite for my application based on the "Pastebin" application example. Pastebin tests run smoothly, I copied all the code, made the necessary modifications and I can do assertions without problems. But when I call the dispatch method in any of the testing methods I get t

[fw-general] Unable to test Request Assertions in Zend_Test

2008-10-09 Thread Mauricio Cuenca
I'm trying to build my test environment based in Matthew Weier O'Phinney's Pastebin example but request assertions does not work for me. The Patebin's tests worked right out of the box. When I run mine I get the following error: 1) testHomePageShouldRedirectToSignupPage(IndexControllerTest) Zend_

Re: [fw-general] Unable to test Request Assertions in Zend_Test

2008-10-09 Thread Mauricio Cuenca
It was a bootstrap problem, now it works. Thanks Matthew! Matthew Weier O'Phinney-3 wrote: > > -- Mauricio Cuenca <[EMAIL PROTECTED]> wrote > (on Thursday, 09 October 2008, 01:53 AM -0700): >> I'm trying to build my test environment based in Matthew Weier >>

RE: [fw-general] Zend PDT 2.0 all-in-one available (BETA)

2008-11-13 Thread Mauricio Cuenca
I downloaded this file: http://downloads.zend.com/pdt/all-in-one/pdt-2.0.0.S20081102_debugger-5.2.1 4.v20080602-all-in-one-win32.zip And also getting "Europa", is there anything wrong with the package? rcastley wrote: > > Have you downloaded the correct file? > > Make sure you choose one o

Re: [fw-general] Zend_Mail - to long subject -- Outlook puts '= ' in subject

2008-11-25 Thread Mauricio Cuenca
I have this same problem with ZF 1.6.1. My mail server is Exchange and long subjects work fine using PHP's mail() function, but not using Zend_Mail. It seems that the problem lays in Zend_Mail->_encodeHeader() method. This is the code used to replicate the issue: // Works $subject = '¿Tu sueldo

Re: [fw-general] Zend_Mail - to long subject -- Outlook puts '= ' in subject

2008-11-25 Thread Mauricio Cuenca
that, instead of replacing its contents with encoded characters. Maybe I'm lacking a lot of background in the Mime/Encoding topic, but in terms of usability I think it would be easier if the line is cut. Mauricio Cuenca wrote: > > I have this same problem with ZF 1.6.1. My mail server

[fw-general] .phtml files question

2008-02-07 Thread Mauricio Cuenca
Hello, I am new with ZF and followed the instructions in the website tutorial, I created the directory structure, but now I am using Zend_View to show the HTML files. Based on the tutorial structure, I must have an application/views/scripts/controller/action.phtml file for each action I am handl

Re: [fw-general] .phtml files question

2008-02-07 Thread Mauricio Cuenca
his when not in object context in /var/www/library/Zend/Controller/Front.php on line 634 I can not get this to work Shaun Rowe-2 wrote: > > Mauricio Cuenca wrote: >> Hello, >> >> What do I have to do to not require those files and keep using my >> Zend_View >>

[fw-general] Using include_once

2008-02-07 Thread Mauricio Cuenca
Hello, I am building a new application and I want to place database stuff and configuration in one file. But when I include the files in any of the controller scripts I get an error. I am sure the problem is not related to a file not found or a syntax error, I am doing something like this in Ind

Re: [fw-general] Using include_once

2008-02-07 Thread Mauricio Cuenca
. Using include files with > PHP content as a source for Zend_Config is also covered in the manual - it > actually uses require there I believe since the included file can be a > simple "return array(..my configuration array...);" as regards content. > > Best regards, >

Re: [fw-general] .phtml files question

2008-02-07 Thread Mauricio Cuenca
Thank you so much, now it works. This change also disabled the ErrorController that comes by default. How can I now specify a new error controller? Matthew Weier O'Phinney-3 wrote: > > -- Mauricio Cuenca <[EMAIL PROTECTED]> wrote > (on Thursday, 07 February 2008, 05:20

Re: [fw-general] Using include_once

2008-02-07 Thread Mauricio Cuenca
ch the > controller in question I can probably spot anything obvious too. > > Best regards, > Paddy > > > Mauricio Cuenca wrote: >> >> Hello Paddy, >> >> I use Zend_Config in some parts, but in this case I really need to >> include

Re: [fw-general] Using include_once

2008-02-08 Thread Mauricio Cuenca
Thanks Philip, I'll follow your advice, meanwhile I had to put the include files into the bootstrap file. If I place them in the controller files, they fail. For now, my problem is solved. Philip G wrote: > > On Feb 7, 2008 11:51 AM, till <[EMAIL PROTECTED]> wrote: >> >> If you have no acces

Re: [fw-general] Help with helpers

2008-02-13 Thread Mauricio Cuenca
bstract", "multiple", etc... Is this possible??? Mauricio Cuenca wrote: > > Hello, I am an old PHP (structured programming) programmer starting with > Zend Framework. I am building a new app with ZF but now I need to use > helpers. I kind of know what exactly they do, b

[fw-general] EXECUTE not working with Zend_Db Oracle adapter

2008-02-18 Thread Mauricio Cuenca
Hello, I've tried several times an in several different ways to execute an Oracles package's statement using Zend_Db and I always get an Oracle error. The statement works perfectly when executed from the Oracle client. My code is as follows: require_once 'Zend/Db/Statement/Oracle.php'; $db = Zen

Re: [fw-general] EXECUTE not working with Zend_Db Oracle adapter

2008-02-18 Thread Mauricio Cuenca
We solved the problem temporarily dropping the usage of Zend_Db_Statement and changing the query for the following: "BEGIN pkg_facturacion.confirmar_pago(2744802); END;" If someone has a more stylish solution I would really appreciate it. Mauricio Cuenca wrote: > > Hello,

Re: [fw-general] use helpers in modules

2008-02-18 Thread Mauricio Cuenca
Hellow Matthew, Is it possible to have a common directory of helpers for the whole application, not specific ones for each module??? My application got bigger and I moved some controller to its own module and now the usual path (application/views/helpers) is not recognized. Matthew Weier O'Ph

Re: [fw-general] use helpers in modules

2008-02-18 Thread Mauricio Cuenca
to the directory holding your helpers. Or you > can do it in the bootstrap. > > Simon > > > Mauricio Cuenca wrote: >> >> Hellow Matthew, >> >> Is it possible to have a common directory of helpers for the whole >> application, not specific ones for e

[fw-general] Persistent database connections

2008-02-28 Thread Mauricio Cuenca
Hello List, I am to switch my app to Oracle persistent connections because of performance issues. Can the _connect() method in Zend_DB be overloaded in order to get a persistent connection?? What other method or solution do you recommend? Thanks! -- View this message in context: http://www

[fw-general] Zend_Translator globally available

2008-03-04 Thread Mauricio Cuenca
Hello, I am implementing Zend_Translate in an application, but right now, I have initialize the object in each controller using the init() method. Is it possible to create a Zend_Translate object to be available in all the views? Should I create a instance of it in the bootstrap file? What would

Re: [fw-general] Zend_Translator globally available

2008-03-04 Thread Mauricio Cuenca
y thing that you need to do in the views is: echo $this->translate("Hello world!"); It's really simple. I posted my solution because maybe it can help someone else. Matthew Weier O'Phinney-3 wrote: > > -- Mauricio Cuenca <[EMAIL PROTECTED]> wrote &g

Re: [fw-general] quoteOutOf?

2008-03-27 Thread Mauricio Cuenca
Hello, This post just gets me more confused, because I'm using $db->quote() in almost all my inserts, but when I get the data back, all my carriage returns are converted to \n\r and single quotes become \'. I also used PHP's stripslashes() but has no effect on carriage returns. Is there an effec

Re: [fw-general] Latin fonts in Zend_Pdf

2008-04-02 Thread Mauricio Cuenca
27;ISO-8859-1' so I found it strange to have to put the parameter in the method, but it works. I hope this can help someone else. Mauricio Cuenca wrote: > > Hello, > > I am using the Zend_Pdf class to generate pdf files, but I found that > characteres like "ñ"

[fw-general] Latin fonts in Zend_Pdf

2008-04-02 Thread Mauricio Cuenca
ld modify the script and regenerate the classes * instead of changing this class file by hand. I could not found the tools directory, but my question is: can I easily modify the fonts file so I can use those characters with my PDFs or what other approach should I take? Thanks! ____

[fw-general] Overrinding Zend_Db_Adapter_Oracle::_connect() method

2008-04-15 Thread Mauricio Cuenca
Hello, I need to use a second database for my app and the connection method should be easyconnect which is not supported by Zend Framework. I created the following class (sort of): class My_Db_Adapter_Oracle extends Db_Adapter_Oracle { protected $_config = array( 'dbname' => nu

[fw-general] Trying to start with Zend_Test

2008-10-03 Thread Mauricio Cuenca
Hello, I'm trying to do my first UniTests with the help of Zend_Test, but there are some things that are not so clear to me. I'm trying to create a simple test case, all I have is this: class MyTest extends Zend_Test_PHPUnit_ControllerTestCase { public $bootstrap = '/path/to/bootstrap.php';

Re: [fw-general] Trying to start with Zend_Test

2008-10-03 Thread Mauricio Cuenca
public function setUp() { parent::setUp(); } public function testCallWithoutActionShouldPullFromIndexAction() { $this->dispatch('/signup'); $this->assertController('signup'); $this->assertAction('index'); } } Thanks! M