Pablo Viquez Blog

Mi vida y cosas relacionadas

Skip to: Content | Sidebar | Footer

Category: 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 5.3 with improved Type Hinting and type casting

9 July, 2009 (09:58) | PHP, tech | By: Pablo Viquez

From Illia Alshanetsky blog post:
There has been a lot of comments both on this blog and the internals list. There seems to be a fairly large group of core developers who like the idea as well as surpassingly large support base on the user level too (wow, didn’t think that this many people want type [...]

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 [...]

Zend Server, 500 Internal Error Server

14 June, 2009 (15:36) | General, PHP, debug, errors | By: Pablo Viquez

Instalé Zend Server en mi computadora ya que estoy probando y comparando XDebug y Zend Server. (Ver Instalación de XDebug)
La instalación realmente fue sencilla y me quedo funcionando de maravilla. Lo único que noté es que Zend Server no instala a PHP como un módulo sino como CGI.
Esto hace que si creo un archivo de [...]

Como instalar Eclipse PDT y XDebug en Windows

13 June, 2009 (02:09) | PHP, Web Development, debug, training | By: Pablo Viquez

Este tutorial enseña como ejecutar un script PHP paso a paso haciendo su depuración más sencilla y fácil. Tambien muestra paso a paso como instalar Eclipse PDT y configurarlo para usar XDebug.
Este mismo tutorial esta disponible para descargar, haga click aquí
Que necesita:

Eclipse PDT

http://www.eclipse.org/pdt/downloads/

Extensión de XDebug

http://xdebug.org/files/php_xdebug-2.0.4-5.2.8.dll

Para este tutorial, se asume lo siguiente:

Ya tiene instalado Apache y [...]

Comunidad de PHP Costa Rica

11 June, 2009 (18:05) | General, PHP, tech, training | By: Pablo Viquez

Invito a tod@s los que quieran participar de la próxima reunión de la comunidad de PHP en Costa Rica:
Donde? Universidad Latina de Costa Rica
Cuando? Jueves 25 de Junio, apartir de las 6pm
Sala de Video conferencias, 3 piso Edificio de ciencias médicas.
Mas info: http://www.costaricaphp.org/archives/50
El grupo es abierto, tod@s estan invitados, desde estudiantes del lenguaje hasta [...]