I’ve finally found the solution. Most of it was here:http://www.september28.co.uk/blog/2011/11/24/php-imap-support-in-mac-os-x-lion-without-recompiling-php/ My machine is a late 2011 Macbook Pro with MacOSX 10.7.4, PHP 5.4. installed via these instructions: http://www.hirmet.com/mac-os-x-lion-upgrade-to-php-5-4 Here’s a step-by-step for those with a similar or identical setup: Download the imap source from this url, focus on the one with the most recent date which doesn’t end in “Z”: ftp://ftp.cac.washington.edu/imap/ Unarchive, go into folder, run the following commands:
The above command will throw a bunch of warnings at you, but should complete sucessfully, unlike the command originally suggested in the september28 blog post. Next, do the following:
Once this is done, go into the downloaded php source folder if you made a custom upgrade like I did (as per the second link in the answer) and build the imap.so extension for your system. If you didn’t build a custom version, just download the PHP source for the version you have installed, and use that, it doesn’t matter.
Once done, do the following:
…or if your PHP extension folder is different, put that (you can see the location in phpinfo(); ) Restart apache and you should be ready to go.
|
PHP
Replace short open tags PHP
Pattern Regex to replace short open tags using sublime:
Find: <\?( )*(?!php)(?!=)(?!xml)(?!mso)
Replace: <?php
It will find only ‘<?’ and they will be replaced by ‘<?php’
Como instalar php-mcrypt en mac
Para instalar php-mcrypt en mac:
- brew install mcrypt
- brew install php55-mcrypt
Error ORA-06502 Oracle y PHP
El problema se presentó usando PHP con Zend Framework 1 y Oracle 11G más detalles a continuación.
Oracle stored procedure:
CREATE OR REPLACE PROCEDURE FGONZALES.GRABA_PRUEBA (ls_parametro varchar2 ls_mensaje out varchar2)
Llamando al stored procedure desde PHP:
$param = 'test '; $mensaje = ''; //O nulo $params = array( 'PARAM' => $param, 'MENSAJE' => &$mensaje, ); $sql = 'BEGIN GRABA_PRUEBA( :PARAM, :MENSAJE ); END;'; $stmt = $db->prepare($sql); $stmt->execute($params); $respuesta = $mensaje;
Con los pasos anteriores obtengo el siguiente error por parte de Oracle:
6502 ORA-06502: PL/SQL: error : buffer de cadenas de caracteres demasiado pequeño numerico o de valor.
Para este caso ls_mensaje del stored procedure solo puede guardar un caracter, si pasa de uno aparece el error ORA-06502.
Mi solución fue la siguente:
$mensaje = str_repeat(' ', 4000);
Declarar la variable con un máximo tamaño para VARCHAR2 de Oracle.
JasperPHP
JasperPHP, es una libreria PHP que permite realizar exportación de reportes en PHP a diferentes formatos a través de un solo archivo, así es ya no debes usar una librería para cada archivo formato que debas exportar.
A través de un solo archivo (*.JRXML) puedes exportar tus reportes en diferentes formatos.
Entre estos formatos tenemos PDF, XLS, DOC, DOCX, PPTX, CSV, HTML, ODS, ODT, TXT y RTF. Tambien hay posibilidad de exportarlo a SWF pero esa funcionalidad aún está en progreso.
Si desean ver el código de esta librería pueden ver el repositorio oficial de JasperPHP en GitHub.
https://www.github.com/jasperphp/JasperPHPlibrary#jasperphp