Pages

Friday, December 6, 2013

HTTP Basic Auth with PHP in CGI-mode

phpinfo();
Server APICGI/FastCGI

https://github.com/symfony/symfony/issues/1813

add  to .htaccess file ( in root dir )following :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>

in php script: 

list($SERVER['PHPAUTH_USER'], $SERVER['PHPAUTH_PW']) = explode(':' , base64_decode(substr($SERVER['HTTPAUTHORIZATION'], 6)));

Friday, September 6, 2013

Attaching Converter with InputDate programmatically

Thank Timo !
http://www.serkey.com/oracle-attaching-converter-with-inputdate-programmatically-bfuyfa.html
https://forums.oracle.com/message/10061981
http://docs.oracle.com/html/E18745_01/apidocs/oracle/adf/view/faces/convert/DateTimeConverter.html
snippet code
RichInputDate rid = new RichInputDate();
DateTimeConverter converter = (DateTimeConverter)FacesContext.getCurrentInstance().getApplication().createConverter("javax.faces.DateTime");
converter.setPattern("MM-DD-yyyyy");
rid.setConverter(converter);
binding_pflContents.getChildren().add(rid);