Pablo Viquez Blog

Mi vida y cosas relacionadas

Skip to: Content | Sidebar | Footer

Tag: PHP

Zend_Log, FirePHP and Zend_Application. How to

25 November, 2009 (16:23) | PHP, debug, tech | By: Pablo Viquez

I wanted to enable logging of exceptions to my PHP log file and also display them using FireBug.
On a standard setup of Zend Framework, the Zend error handler plugin (Zend_Controller_Plugin_ErrorHandler) enable by default and it was designed for:

Errors due to missing controllers or actions
Errors occurring within action controllers

I wanted to keep using the error handler [...]

Export Excel Spreadsheets using Zend Framework

24 August, 2009 (14:04) | PHP, Web Development, tech | By: Pablo Viquez

Last week, I had to allow the user to export a given report into an MS Excel file format.
The application uses Zend Framework 1.9.1 and so far ZF does not support for “Office” formats, so after searching for a nice implementation, I found a PEAR module called Spreadsheet Excel Writter, which looked pretty good, it [...]

Proxima reunión

5 August, 2009 (16:54) | General, PHP, costa rica php | By: Pablo Viquez

Ya se anunció la próxima reunión del grupo de PHP. (Ver anuncio)
Esta es la información del evento:
Donde: Auditorio Universidad Latina de Costa Rica
Cuando: Martes 11 de Agosto, 7:00pm

El tema de Unit Testing e Integración Continua la verdad está muy bueno, recomendado.

How to use json_encode with ISO-8859-1 data – Part2

31 July, 2009 (12:04) | PHP, Web Development, iso 8859-1, utf-8 | By: Pablo Viquez

To continue with the previous post.
Problem: Function json_encode does not support ISO-8859-1 encoded data.
One solution that I did, in order to preserve the character set was to encode the
data before using the json_encode function to use just A-Z, a-z and 0-9 characters,
instead of sending text with accents or symbols.
One encoding that fits perfectly in this [...]

How to use json_encode with ISO-8859-1 data – Part1

17 July, 2009 (13:51) | PHP, Web Development, debug, iso 8859-1, utf-8 | By: Pablo Viquez

Download the demo files
While I was looking at some AJAX calls, I started to have a problem, for some reason, when I tried to query a JSON service I did using JQuery, the result was null for some fields.
Going a little deeper, I notice that the records from the DB were OK, and the JavaScript [...]

php set_include_path() function returns false

14 June, 2009 (19:22) | PHP, Web Development, debug, errors | By: Pablo Viquez

After a while struggling with the php function set_include_path() on windows, became to my attention that using the windows registry to set php configuration values they are set using the php_admin_value which forbids overriding it  on run time.
So for example, if you set the include_path on the windows registry and then you call the set_include_path [...]

Feliz cumpleaños a PHP!

8 June, 2009 (11:10) | PHP | By: Pablo Viquez

Hoy se cumplen 14 años desde que Rasmus Lerdorf sacó la primera versión de PHP.

APC en PHP

23 April, 2009 (15:08) | General | By: Pablo Viquez

APC Rocks! Implemente unas clases para internalización y localización usando Zend Framework y el core que basicamente cargaba y parseaba los diccionarios en XML le hice cache con APC para poder tener una unica instancia por servidor del mismo “objeto” y funciono muy bien.
Espero poner la arquitectura que se uso pronto por aqui.

Encoding, UTF-8, ISO 8859-1 y PHP

4 September, 2008 (17:01) | PHP, Web Development | By: Pablo Viquez

Hace unos dias tuve un problema tratando de desplegar tildes en una aplicación, el problema surgió cuando quise hacer que toda la aplicación fuera UTF-8.
Es decir, que la DB hablara UTF-8 y las paginas desplegaran UTF-8:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
 
Ahora, cuando hice el despliegue en la página, en vez de ver caracteres con tildes [...]