miércoles, 28 de marzo de 2007

Workrave: administrar las horas frente al ordenador | CONSUMER.es EROSKI

Workrave: administrar las horas frente al ordenador


Se trata de una aplicación que obliga a descansar del ordenador durante un tiempo determinado

Workrave es un programa que racionaliza las sesiones de trabajo frente al ordenador, una aplicación muy útil para todos aquellos que tienen que permanecer ocho horas al día frente a una pantalla. Actúa de recordatorio constante y con sus avisos ayuda a prevenir la fatiga visual que causa mirar con fijeza el monitor durante demasiado tiempo, o los problemas en la espalda o en la muñeca generados por vicios posturales o por movimientos repetitivos.



Workrave: administrar las horas frente al ordenador | CONSUMER.es EROSKI

Parse a String to obtain a Date/GregorianCalendar object - Real's Java How-to


import java.text.*;
import java.util.*;

public class dformat {
public static void main (String a[]){
try {
/*
** we specify Locale.US since months are in english
** we want to parse a TimeStamp
*/
SimpleDateFormat sdf = new SimpleDateFormat
("dd-MMM-yyyy HH:mm:ss", Locale.US);
/*
** fix timezone in the SimpleDateFormat
** bug in JDK1.1
*/
sdf.setCalendar(Calendar.getInstance());
/*
** create a Date (no choice, parse returns a Date object)
*/
Date d = sdf.parse("24-Feb-1998 17:39:35");
System.out.println(d.toString());
/*
** create a GregorianCalendar from a Date object
*/
GregorianCalendar gc = new GregorianCalendar();
gc.setTime(d);
System.out.println(gc.getTime().toString());
}
catch (Exception e) {
e.printStackTrace();
}
}
}

Parse a String to obtain a Date/GregorianCalendar object - Real's Java How-to

domingo, 25 de marzo de 2007

OpenID Phishing: Guía para principiantes | Kriptópolis

OpenID is a web-based, distributed authentication protocol set to become a standard way of signing in to websites. OpenID enables you to keep control over your own identity by separating identity 'providers' and 'consumers'. You register your 'identity' or 'account' at a single OpenID provider and then you have instant access to a vast array of service providers that are OpenID consumers. However, with great power comes great responsibility. OpenID is highly susceptible to phishing attacks unless proper counter-measures are taken by the providers. We will demonstrate how to do a very simple phishing attack that already works for most OpenID providers. We will also give some possible (non-)solutions to the problem.

OpenID Phishing: Guía para principiantes | Kriptópolis

sábado, 24 de marzo de 2007

PHP RPMs: PHP: The missing RPMs

PHPRPMs is a collection of RPM packages that add various PHP extensions to the PHP that you have as a part of your RPM-based Linux Distribution (Red Hat Enterprise Linux, CentOS, WhiteBox or Fedora Core). The advantages of this approach are:

  • you don't have to rebuild PHP from the source if you just need one of the less-frequently used or non-GPL extensions;
  • since you don't rebuild PHP, you get to keep your "factory" PHP packages with all distro-specific patches and, what's more important,
  • you can continue to receive the standard updates for the "factory" PHP packages via RHN / up2date / yum


PHP RPMs: PHP: The missing RPMs

viernes, 23 de marzo de 2007

Obtener pleno soporte multimedia con Fedora Core 6 | Fedora-es

Voy a explicar como obtener soporte para poder ver todo tipo de peliculas y escuchar todo tipo de audio con Fedora Core 6 y el software que te viene con gnome por defecto, es decir Rhythmbox y Totem

Vamos a la terminal y entramos como root:
$ su -

Instalamos los repositorios de Livna:
# rpm -ivh http://rpm.livna.org/livna-release-6.rpm

Instalamos los plugins para escuchar mp3:
# yum install gstreamer-plugins-ugly

Borramos el totem que viene:
# yum remove totem totem-mozplugin

Instalamos el totem-xine y las dependencias y el plugin para firefox si queremos:
# yum install totem-xine totem-xine-mozplugin

Instalamos los siguientes paquetes, aunque quizás ya los tengais:
# yum install ffmpeg gstreamer-ffmpeg sox lame faad2 mjpegtools xine-lib-extras-nonfree

si no me he saltado nada ya deberiais tener soporte para todo tipo de videos y mp3 con totem y rhythmbox.

Si teniais alguno de los paquetes instalados desde otros repositorios, borradlos e instaladlos desde livna, o bien instaladlos desde ese repositorio si estan, pero no mezcleis livna con otro repositorio porque son incompatibles y podrian no funcionar.



Obtener pleno soporte multimedia con Fedora Core 6 | Fedora-es

Struts, forward con parámetros

Desde los inicios de los tiempos, struts ha tenido un problema en los forward.
En la deficinición del forward, dentros del struts-config.xml, no se podían indicar parámetros.
El problema se complicaba cuando estos parámetros son dinámicos (que es la mayoría de los casos).

Solución.

A partir de la versión 1.2.7 parece que se ha arregado el problema.
Existe una clase nueva que herada del ActionForward.
Se trata de ActionRedirect.
En el javadoc se puede ver cómo funciona, pero baśicamente:
  • Declaramos el forward en el struts-config.xml, sin parámetros.




  • En la implementación de nuestro Action, obtenemos el ActionForward que hemos declarado anteriormente.
    ForwardConfig forwardConfig = mapping.findForward("elForward");
  • A partir del ActionForward anterior, creamos el ActionRedirect, pasándole los parámetros que necesitemos.
    ActionRedirect redirect = new ActionRedirect(forwardConfig);
    redirect.addParameter("param1","value1");
    redirect.addParameter("param2","2");
    redirect.addParameter("param3","3.0");
    return redirect;


Angel Cervera

jueves, 22 de marzo de 2007

Could not include font definition file | drupal.org

I get this error when trying to download a page as PDF. I installed the module according to the instructions and searched Google for support on this error but didn't come up with anything. I ensured that K_PATH_MAIN and K_PATH_URL are set correctly. Does anyone have advice?


It sounds like the folder tcpdf isn't installed in the correct place. You need to put it under your modules/pdfview folder. Then reset the K_PATH_MAIN and K_PATH_URL. The would most likely look something like this:

K_PATH_MAIN = /home/username/public_html/modules/pdfview/tcpdf/ (the first bit depends on your host)
K_PATH_URL = http://www.yourdomain.com/modules/pdfview/tcpdf/


Could not include font definition file | drupal.org

activar mod_rewrite - Foros del Web

Es interesante estudiar cómo activar módulos del apache para activarle funciones que por defecto vienen desactivadas, como es el caso del famoso mod rewrite. Vamos a ver cómo activar este utilísimo módulo.

En primer lugar dentro del httpd.conf debemos buscar la línea donde está nombrado el módulo mod_rewrite.so y quitarle el # que tiene delante para activarlo.

#LoadModule rewrite_module modules/mod_rewrite.so

Con eso ya tendremos el módulo activo, pero Apache no podrá leer aún los .htaccess, así que para que lea los .htaccess debemos buscar lo siguiente:


Options FollowSymLinks
AllowOverride none
Order deny,allow
Deny from all
Satisfy all


Y dejarlo como sigue:


Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Satisfy all


Tras reiniciar el servidor Apache ya debería tomarnos las reglas indicadas en el .htaccess

activar mod_rewrite - Foros del Web

Servidores virtuales en Apache

El dominio principal o por defecto

En páginas anteriores hemos visto que Apache crea al instalarse la carpeta conf (ruta completa C:\Archivos de programa\Apache Group\Apache\conf), dentro de la cual están los archivos de configuración del servidor, archivos que tendremos que modificar para adecuar a nuestro sistema.

El archivo que nos interesa es httpd.conf.

Por defecto Apache se instala para servir un solo dominio. Estas son algunas de las directivas que debes comprobar en http.conf:

  • ServerRoot "C:/Archivos de programa/Apache Group/Apache2" (o .../Apache si usas la version 1.2). Es la carpeta de instalación del server. Sin barra final.
  • Listen 80 El puerto donde Apache 'escucha'. El puerto 80 es el puerto http por defecto. No lo cambies si no tienes una buena razón para ello.
  • DocumentRoot "C:/Archivos de programa/Apache Group/Apache2/htdocs": la carpeta pública del server. Ahi van los archivos de tu página. Por ejemplo si mueves a htdocs tu página de inicio "index.html", podrás verla tecleando en el navegador localhost/index.html. Verás que esa carpeta está llena de archivos. Puedes borrarlos: son la página de bienvenida que trae Apache y sirven solamente para informarte de que la instalación ha funcionado.
  • Esta directiva establece las reglas que se aplican para servir los documentos almacenados en htdocs. Como en html, es un contenedor. La etiqueta de cierre es

Lo básico a retener de lo anterior es que las páginas que guardes en DocumentRoot (carpeta htdocs) se verán cuando te conectes con ServerName (localhost o el dominio que hayas especificado).

Pero ¿que ocurre si deseas tener varios dominios separados? por ejemplo www.micasa.com y www.mioficina.com ? Si todas las páginas están en la misma carpeta, como sabe Apache que pagina servir bajo que dominio ?

Asumiendo que tengas resuelto el tema de las DNS, es decir, que esos dominios se resuelvan hacia tu IP, puedes utilizar servidores virtuales.

Servidores virtuales con apache

Nada mas fácil que crear servidores virtuales con apache. Vamos a suponer que por ejemplo, has acudido a un servicio como www.dyndns.org y tienes dos subdominios como pepe.dyndns.org y pepita.dyndns.org, ambos apuntando a tu IP. Bien, lo primero que debes considerar es que si creas un solo dominio virtual, la configuración del server por defecto, o dominio principal de la que hablamos hasta ahora no funcionará. Por ello la solución no es tener el dominio por defecto y ademas un server virtual, sino dos servidores virtuales, de los cuales el primero (por orden de aparición) se considerará server por defecto.

Bien, hay dos formas de identificar servidores virtuales en apache. Una es por IP y otra por nombres de dominio. El método mas sencillo y normal es el segundo, y aqui solo nos referiremos a él.

Navega al final de tu archivo http.conf y descomenta esta directiva:

NameVirtualHost *:80.

A continuación escribe una sección como esta:


ServerAdmin micorreo@midireccion.com
ServerName pepe.dyndns.org
DocumentRoot "C:/Archivos de programa/Apache Group/Apache2/htdocs"

Fijate que al abrir la sección escribimos '*:80', exactamente lo mismo que en NameVirtualHost. Esto es importante.
Fíjate también que este es nuestro dominio principal, que es el que tenemos almacenado en htdocs. Vamos ahora al segundo dominio, creamos otra sección parecida:


ServerAdmin mi_otro_correo@mi_otra_direccion.com
ServerName pepita.dyndns.org
DocumentRoot "C:/mis documentos/documentos de pepita"

Suficiente !. Si escribes en tu navegador pepe.dyndns.org veras la pagina guardada en htdocs, y si escribes pepita.dyndns.org verás la página guardada en el DocumentRoot de ese otro server.

Ten en cuenta simplemente que dentro de cada directiva de servidor virtual puedes poner las reglas de visualización que desees, exactamente como lo harías para el dominio por defecto (indexes, indexoptions, etc).




Apuntes sobre servidores: Servidores virtuales

martes, 20 de marzo de 2007

Fallo en office/word que provoca el cierre inesperado de la aplicación

De un tiempo a esta parte cuando utilizo word/office a los pocos minutos me aparece un mensaje de error tal que así:

Microsoft Word for Windows ha detectado un problema y debe cerrarse.

En los datos que contiene el informe de errores leo los siguiente:

AppName: winword.exe AppVer: 9.0.0.2823 ModName: hpzpm310.dll
ModVer: 2.323.0.0 Offset: 00041983

Cuando cerramos esta ventan simplemente word se cierra de golpe, no dejandote trabajar ni nada.

Pues bien, el problema viene relacionado con hpzpm310.dll que es una dll que se me ha instalado con los drivers de mi impresora HP 3740 (instalada en red en otra maquina).

La solución más rápida que he encontrado es borrar la impresora en cuestión (esto me impide imprimir claro) lo que ya me permite trabajar con Word.

HELP FILE

viernes, 16 de marzo de 2007

Acceder a los datos de un action form de struts

// Extract attributes and parameters we will need
JoinForm joinForm = (JoinForm) form;
String email = joinForm.getEmail();


Struts, an open-source MVC implementation

Struts, an open-source MVC implementation

Una buena explicación del funcionamiento de struts

Struts, an open-source MVC implementation

Common Struts Errors

Página que explica errores comunes cuando utilizamos Struts.

Common Struts Errors

Common Struts Errors and Causes

This page contains errors and exceptions commonly encountered during web application development using Struts. Along with the exception or error messages themselves, potential causes of these errors are often listed along with links to additional resources.

To find the error you're looking for, use your browser's Find or Search capability and input a few words that you are seeing in your error message.

Cannot retrieve mapping for action
Exception javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login
Probable Cause No action defined in struts-config.xml to match that specified in the JSP's Login.do".
Related Links

Cannot retrieve definition for form bean null
Exception org.apache.jasper.JasperException: Cannot retrieve definition for form bean null
Probable Cause This exception typically occurs because Struts cannot find the form bean it expects for a specific action according to the mapping in the struts-config.xml file. Most often, this is probably because the name given to the form in the name attribute of the form-bean element does not match the name attribute of the associated action's action element. In other words, the action and form should each have a name attribute that matches exactly, including case. It has been reported that this error has been seen when no name attribute is associated with the action. If there is no name attribute in an action element, no form is associated with the action. Others have reported this error as merely a symptom of something completely unrelated (all too common), but the mismatch of name attributes in the form-bean and action elements in the struts-config.xml file is the usual culprit.

No action instance for path /xxxx could be created
Exception No action instance for path /xxxx could be created
Probable Causes Special Note: Because so many different things can cause this error, it is recommended that you turn your error logging/debugging levels on your web server to a high level of verbosity to see the underlying problems in trying to instantiate the action class you have written and associated with the specified action xxxx through an action mapping in the struts-config.xml file.
Your Action class specified in the struts-config.xml file under the class attribute of the action mapping for action xxxx cannot be found for a variety of reasons, including (but not limited to):
  • Failure to place compiled .class file for the action in the classpath (needs to be under WEB-INF/classes with the appropriate directory structure underneath this that matches the package your Action class belongs to).
  • Package spelling or hierarchy specified in your action class itself (using the package keyword) does not match the spelling or complete package hierachy specified for your action class in the class attribute of the action in struts-config.xml.
Action class specified in the /xxxx action mapping in the struts-config.xml file (class attribute) does not extend (directly or indirectly) from the Action class. In other words, your custom Action class does not extend off the Struts-provided Action class or off of another class that eventually extends the Action class (such as DispatchAction.
Problem in your classpath, such as web server not being able to find ApplicationResources.properties files in the WEB-INF/classes/ directory or specified subdirectory.
Problem in struts-config.xml file with action mapping.
Problem with data-sources.xml file.
Relevant Links

No getter method for property XXXX of bean org.apache.struts.taglib.html.BEAN
Exception javax.servlet.jsp.JspException: No getter method for property username of bean org.apache.struts.taglib.html.BEAN
Probable Causes No getXXXX() method defined for form field with name XXXX
This can happen if the JSP/Struts developer forgets that the name of the get method will have the same spelling as the value supplied in the Struts tag's property attribute, but that case will be different and is based on JavaBean specification rules. For example, my form class should have a getUsername method if my Struts form-related tag has username as the value for its property attribute. Note the difference in case marked with emphasis on the letter "U."
Related Links

java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
Error java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
Probable Causes This error occurs typically when the specified Java .class file cannot be located in the classpath. If this occurs at runtime of a web application (error shows on browser rather than a rendered page), this typically means that specified class is not in the web server's classpath (made up primarily of /WEB-INF/classes and /WEB-INF/lib contents). Note that the NoClassDefFoundError in general typically indicates lack of the specified class in the relevant classpath. In this particular case the missing class would be ActionForm.class
This error is sometimes seen when one or more ActionForm.class instances are actually in the classpath. This most often occurs when ActionForm.class is made available correctly by placing struts.jar in the /WEB-INF/lib directory. When this library has been correctly placed and it is verified that ActionForm.class actually is present in the struts.jar file, the problem is either that more than one copy of ActionForm.class is in the classpath or (more likely) that duplicate versions of class files other than ActionForm are in the same classpath, causing confusion. This is especially true if a class that extends ActionForm is made available twice, such as in an .ear file that encompasses a .war file as well as in the .war file's own classpath (/WEB-INF/classes). This problem can be resolved by guaranteeing that there are no redundant classes, especially those related to Struts (directly from Struts or extensions of Struts), in the web application's view.
Related Links

Exception creating bean of class org.apache.struts.action.ActionForm: {1}
Exception javax.servlet.jsp.JspException: Exception creating bean of class org.apache.struts.action.ActionForm: {1}
Probable Causes Instantiating Struts-provided ActionForm class directly instead of instantiating a class derived off ActionForm. This might occur implicitly if you specify that a form-bean is this Struts ActionForm class rather than specifying a child of this class for the form-bean.
Not associating an ActionForm-descended class with an action can also lead to this error.
Related Links

Cannot find ActionMappings or ActionFormBeans collection
Exception javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
Probable Causes Either the tags for the Struts action servlet or the tags for the .do extension mapping or both not present in the web.xml file. I saw a case where the web.xml file had no elements other than the root element and so this error was occurring.
Typos or spelling errors in the struts-config.xml can lead to this error message. For example, missing a slash ("/") on a closing tag can have this effect.
Another element that must be present in the web.xml file is the load-on-startup element. This can be either an empty tag or can have an integer specified that indicates the priority of executing the associated servlet. The higher the number in the load-on-startup tags, the lower its priority.
Another possibility, related to need to use load-on-startup tag, is that precompiling JSPs using Struts can lead to this message as well.
Related Links

NullPointerException at ... RequestUtils.forwardURL
Exception java.lang.NullPointerException at org.apache.struts.util.RequestUtils.forwardURL(RequestUtils.java:1223)
Probable Causes Missing path attribute in the forward subelement of the action element in struts-config.xml
Related Links

Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
Exception javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
Probable Causes

Trying to use Struts form subelement tags outside of the Struts' form tag. Note that this might be because you are using the Struts html tags after the closing tag.

Note that if you accidentaly make your opening html:form tag a no-body tag (you put a closing / at the end so that it looks something like ), this may be treated by your web server's parser as a no-body tag and everything after that tag you meant to be an opening tag will be outside of the form tag by default.

Note your prefix may be different than html, but most people seem to use that as their prefix for the Struts HTML tags library.

Related Links

Missing message for key xx.xx.xx
Exception javax.servlet.jsp.JspException: Missing message for key xx.xx.xx
Probable Causes The key-value pair with specified key is not in ApplicationResources.properties file
ApplicationResources.properties file not in classpath (not in WEB-INF/classes directory in specified location)
Related Links

Cannot find message resources under key org.apache.struts.action.MESSAGE
Exception Cannot find message resources under key org.apache.struts.action.MESSAGE
Probable Causes Explicitly trying to use message resources that are not available (such as ApplicationResources.properties not available
Implicitly trying to use message resources that are not available (such as using empty html:options tag instead of specifying the options in its body -- this assumes options are specified in ApplicationResources.properties file)
XML parser issues -- too many, too few, incorrect/incompatible versions
Related Links

No input attribute for mapping path /loginAction
Error No input attribute for mapping path /xxxxAction
Probable Cause No input attribute in action mapping in struts-config.xml file for the action with the name specified in the error message. An input attribute is not required if form validation is not performed (either because the validate attribute is set to false or because the validation method in the relevant form class is not implemented. The input attribute specifies the page leading to this action because that page is used to display error messages from the form validation.
Related Links

Strange Output Characters
Error Strange and seemingly random characters in HTML and on screen, but not in original JSP or servlet.
Probable Causes Regular HTML form tags intermixed incorrectly with Struts html:form tags.
Encoding style used does not support characters used in page.
Related Links

"Document contained no data" or no data rendered on page
Error "Document contained no data" in Netscape
No data rendered (completely empty) page in Microsoft Internet Explorer
Probable Cause Employing a descendent of the Action class that does not implement the perform() method while using the Struts 1.0 libraries. Struts 1.1 Action child classes started using execute() rather than perform(), but is backwards compatible and supports the perform() method. However, if you write an Action-descended class for Struts 1.1 with an execute() method and try to run it in Struts 1.0, you will get this "Document contained no data" error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.
Related Links

jueves, 15 de marzo de 2007

Problema en el arranque de mysql

Problema en el arranque de mysql tras instalarlo via yum en Fedora Core 6:

[root@portatil init.d]# mysqld start
bash: mysqld: command not found
[root@portatil init.d]# ./mysqld start
Iniciando base de datos MySQL: Neither host 'portatil' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
[FALLÓ]

Para solucionar este problema y conseguir que mysql arranque sin problema debemos editar el fichero
/etc/hosts
este fichero debe quedar tal que así:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 portatil localhost.localdomain localhost


Tras esto ya se puede arrancar mysql normalmente.


miércoles, 14 de marzo de 2007

Servidor CVS para windows: CVSNT

Todo los que necesitas
Aquí encontraras el más popular de los sistemas de versionado. Una vez más. La Suite CVS entrega todo los que necesitas para arrancar la implementación de CVS en tu corporación, es decir: El eBook "Todo acerca de CVSNT" , Integración con Seguimiento de Defectos (Bugzilla) integration, TortoiseCVS, WinCVS, Workspace Manager para navegar por los repositorios de los servidores CVSNT y crear espacios de trabajo, Release Manager para desplegar sitios web con servidores de aplicaciones y también CVSNT Server con Auditoria

CVSNT

martes, 13 de marzo de 2007

Utilización de contraseñas en formato antiguo en mysql

Client does not support authentication protocol

MySQL 5.0 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. If you upgrade the server from 4.0, attempts to connect to it with an older client may fail with the following message:

shell> mysql
Client does not support authentication protocol requested
by server; consider upgrading MySQL client

To solve this problem, you should use one of the following approaches:

  • Upgrade all client programs to use a 4.1.1 or newer client library.

  • When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

  • Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

    mysql> SET PASSWORD FOR
    -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

    Alternatively, use UPDATE and FLUSH PRIVILEGES:

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
    -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;

    Substitute the password you want to use for “newpwd” in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.

  • Tell the server to use the older password hashing algorithm:

    1. Start mysqld with the --old-passwords option.

    2. Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:

      mysql> SELECT Host, User, Password FROM mysql.user
      -> WHERE LENGTH(Password) > 16;

      For each account record displayed by the query, use the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.

Note: In older versions of PHP, the mysql extension does not support the authentication protocol in MySQL 4.1.1 and higher. This is true regardless of the PHP version being used. If you wish to use the mysql extension with MySQL 4.1 or newer, you may need to follow one of the options discussed above for configuring MySQL to work with old clients. The mysqli extension (stands for "MySQL, Improved"; added in PHP 5) is compatible with the improved password hashing employed in MySQL 4.1 and higher, and no special configuration of MySQL need be done to use this MySQL client library. For more information about the mysqli extension, see http://php.net/mysqli.

It may also be possible to compile the older mysql extension against the new MySQL client library. This is beyond the scope of this Manual; consult the PHP documentation for more information. You also be able to obtain assistance with these issues in our MySQL with PHP forum.

For additional background on password hashing and authentication, see Section 5.8.9, “Password Hashing as of MySQL 4.1”.

http://dev.mysql.com/doc/refman/5.0/en/old-client.html