Delphi per PHP 1.0

Finalmente mi è arrivato Delphi For Php 1.0. Non stavo più nella pelle..! Ma sinceramente mi ha deluso un pò.
Dopo averlo installato ho realizzato un esempio , l’ho eseguito nello stesso ambiente (utilizza un propri server) ed è andata tutto bene. Ovviamente, ho voluto testarlo in locale con Easyphp e sul mio sito, quindi ho dovuto eseguire il tool Deploy per esportare in una cartella le librerie vcl necessarie a far eseguire il programma.
Una volta ottenuta la cartella contenete due file (unit1.php e unit1.xml.php) e la cartella vcl con tutte le librerie, è bastato copiarla sul server locale o remoto.
Delphi for php 1.0
Ma purtroppo non ha funzionato! Ha restituito il seguente errore:

Application raised an exception class Exception with message ‘The Input Filter PHP extension is not setup on this PHP installation, so the contents returned by Input is *not* filtered’

Dopo un pò di smanettamenti ho trovato la soluzione è bastato commentare la linea 226 del system.inc.php .

class InputFilter
{
function process($input)
{
//TODO: Our own input filtering class in native PHP code
//NOTE: Comment this line to don't raise the exception an get the unfiltered input
//                throw new Exception("The Input Filter PHP extension is not setup on this PHP installation, so the contents returned by Input is *not* filtered");
return($input);
}
}

Ovviamente, questo è un hacking, in quanto in questo modo l’input non viene più filtrato, ma in attesa del fix della CodeGear va più che bene ;)

Il problema è dovuto ad un’incompatibilità di una libreria (filter: http://pecl.php.net/package/filter) tra la versione presente in Delphi for php 1.0 (php 5.1) e quella del mio server locale/remoto che installato php 5.2.

Aggiornamento :
Per gli utenti registrati è possibile scaricare l’Update 1 che corregge il problema con PHP 5.2.1( maggiori informazioni )

9 commenti

Rispondi

Attenzione : Per inserire codice html/php o caratteri speciali utilizza Postable. Postable converte i caratteri speciali del tuo commento.
XHTML: Puoi usare questi tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Login with Facebook: