PostgreSQL – AppServ 2.5.10 y PHP 5.2.6

Para todos los usuario que instalan su ambiente de desarrollo web usando APPSERV, les comento que con la versión 2.5.10 se genera un problema al tratar de habilitar PostgreSQL.

Generalmente para habilitar el uso de postrgres con PHP, solo basta con quitar el comentario en el archivo PHP.ini(ubicado en C:\Windows) en la línea:

;extension=php_pgsql.dll

a

extension=php_pgsql.dll

verificamos que el archivo php_pgsql.dll se encuentre en la carpeta php5/ext.

Si se verifica con phpinfo(), debería aparecer que postgresql ha sido activado, este no es el caso con AppServ 2.5.10 bajo Windows. Esto se debe a que a partir de la version 5.2.6 de PHP, la extensión php_pgsql.dll requiere el uso de la librería libpq.dll para poder funcionar.

La libreria libpq.dll  se encuentra en:

PostgreSQL/num_version/bin/libpq.dll

Para poder configurar la carga dinámica de esta librería de tal forma que funcione con php_pgsql.dll, se debe agregar al fichero de configuración Apache httpd.conf.

Otra forma de hacer que funcione es reemplazando la versión de php_pgsql.dll con la versión anterior, que viene empaquetada en PHP 5.2.5 para Windows.

Desde el siguiente enlace se podrá descargar solo el archivo DLL

http://sourceforge.net/tracker/?func=detail&aid=2314529&group_id=53691&atid=471256
Luego de reemplazar php_pgsql.dll con la version descargada desde el enlace superior, reinicie el servicio APACHE.

.

Advertisements

Javascript MVC

Are you considering using JavaScript MVC for your large-scale projects? Here’s a very useful JMVC cheat sheet you can print. check it out.

Read the rest of this entry

Basic Zend_Form by Example with Netbeans

In this post I’m going to show you how to create a simple contact form from scratch in Netbeans in this complete example that shows it  in action.

Read the rest of this entry

First Design of 2011


Today I felt creative so I opened photohop and illustrator and came up with this, a strong some like grunge design..using a pic of my girlfriend, I created the outlines with Illustrator and made the finishing touches with Photoshop

Enhanced by Zemanta

Basic authentication with Zend_Auth

for one of my projects I had to create a basic login form with DB validation. this is what I came up with


$autenticar=Zend_Auth::getInstance();
$autenticar_adaptador=new Zend_Auth_Adapter_Table();
$autenticar_adaptador->setTableName('user_credentials_table)
                     ->setIdentityColumn('username')
                     ->setCredentialColumn('password')

$correo=$request->getParam('user_email');
$clave=$request->getParam('user_pass');

$autenticar_adaptador->setIdentity($correo);
$autenticar_adaptador->setCredential(md5($clave));

$valid_user=$autenticar->autenticate($autenticar_adaptador);

if($valid_user->isValid()){
$user_data=$autenticar_adaptador->getResultRowObject(array('name','user_name'),'password');
$autenticar->getStorage()->write($user_data);
$this->_redirect('protected_page');
}else{
$this->_redirect('login_form');
}

Read the rest of this entry

The Freelancer’s IPhone

Now days, freelancer can never be disconnected, we’ve got to keep up with social networks, email, clients emergencies, at the same time get some work done, all of this while away from the computer.

As a freelancer I came to realize that there’s no better tool to help me in doing all of this than the IPhone, this portable gadget has become one of the most important tools for productivity and efficiency I have ever used.

In this post I’ll share my favorites IPhone apps that helped me turn it into a very important tool for my freelance work.

Read the rest of this entry

2011 – New Look

First thing to be done in 2011, design a template for my blog, lets get creative as 2010 says its final goodbye, open up Photoshop and start sketching the new look,have a brainstorming fest, throw a few ideas around to see which one sticks. Maybe a minimalistic look or try a little bit grunge, something more tech, or perhaps a sureal look..mmm…lets push the boundaries of my creativity to see what I come up with..

2011 Time to let your creativity fly really high.

#Zend Framework and PHP Certifications

There are so many things to do and learn.There’s much to be done, my social site(pretty big project,.lots of fun coding)..since this year is ending I need a new years resolution, this being said..My new year resolution is to get the #Zendframework and #PHP Certification..I should start by passing the PHP 5.3 exam and then go for the Zendframework one. I’ve been looking at some training materials, it’s not complicated but there’s a lot to be learn..Let’s start working on it…
Here’s the link for those who are interested on getting those certifications.

PHP Certifications

Registration form- #zf (finished)

so far so good, the registration form is finished, worked a little bit with #validators and #decorators, pretty cool..had some problems getting the errors and customizing the errors messages, did another intensive search on google and found the solution, it was pretty simple..
this is part of my source code:

$u_email= new Zend_Form_Element_Text(‘email’);
$u_email->setRequired(true)
->setAttrib(‘size’, ‘25’)
->addValidator(‘NotEmpty’,true,array(‘messages’ => array(‘isEmpty’ => ‘custom message’)))’

as we can see one way of doing this is to pass a third parameter into addValidator,this third parameter is an array containing the new message and the property to which it will be applied.
with a simple call to getMessages() we can get the messages of the form in case a field is flag as invalid.

Main Project

i’m continuing my work on a social site developed entirely with #ZF, it’s my first big project with this framework, the final goal is to join every social network, twitter,facebook,flicker,etc. into one single site from which the user can interact with all of their friends…

its a simple idea, i’m sure thousands or probably millions of people had thought about this..it’s easier said than done.. going on to my third week of development..so far so good..