We are also having problems using Zend_Validate_Alpha and
Zend_Validate_Alnum but only on our production RHEL5 server. Using xampp
locally on windows XP the same code works perfectly. Prior to 1.0RC3 this
worked on production as well. We are running ZF 1.0RC3. Here is the test
code(similar to original post):
$validator = new Zend_Validate_Alnum();
$vars = array('Alnum' => 'foobar1',
'notAlnum' => '[EMAIL PROTECTED]');
foreach ($vars as $var) {
echo $validator->isValid($var) ? $var.":true\n":$var.":false\n";
}
RHEL5 response:
foobar1:false
[EMAIL PROTECTED]:false
WindowsXP response:
foobar1:true
[EMAIL PROTECTED]:false
RHEL 5 System details:
******************************************************
PHP 5.1.6 (cli) (built: Apr 4 2007 11:38:24)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend
Technologies
with Zend Optimizer v3.2.6, Copyright (c) 1998-2007, by Zend
Technologies
yum info:
*******
PCRE
---------------------------------------------------------------
pcre.x86_64 6.6-1.1 installed
PHP
---------------------------------------------------------------
php.x86_64 5.1.6-11.el5 installed
php-bcmath.x86_64 5.1.6-11.el5 installed
php-cli.x86_64 5.1.6-11.el5 installed
php-common.x86_64 5.1.6-11.el5 installed
php-dba.x86_64 5.1.6-11.el5 installed
php-devel.x86_64 5.1.6-11.el5 installed
php-gd.x86_64 5.1.6-11.el5 installed
php-imap.x86_64 5.1.6-11.el5 installed
php-ldap.x86_64 5.1.6-11.el5 installed
php-mbstring.x86_64 5.1.6-11.el5 installed
php-mysql.x86_64 5.1.6-11.el5 installed
php-ncurses.x86_64 5.1.6-11.el5 installed
php-odbc.x86_64 5.1.6-11.el5 installed
php-pdo.x86_64 5.1.6-11.el5 installed
php-pear.noarch 1:1.4.9-4 installed
php-pgsql.x86_64 5.1.6-11.el5 installed
php-snmp.x86_64 5.1.6-11.el5 installed
php-soap.x86_64 5.1.6-11.el5 installed
php-xml.x86_64 5.1.6-11.el5 installed
php-xmlrpc.x86_64 5.1.6-11.el5 installed
WindowsXP System details:
**************************************************
PHP 5.2.1 (cli) (built: Feb 7 2007 23:11:26)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by Zend
Technologies
with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend
Technologies
PCRE:
*************************************************
PCRE Library Version => 6.7 04-Jul-2006
Josh
"Darby Felton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Graham,
>
> I just added the potentially offending data to the unit tests for
> Zend_Validate_Alnum, but I have been unable to reproduce the problem on
> either of the two following platforms:
>
> * PHP 5.1.4, WinXP, PCRE 6.6
>
> * PHP 5.2.1, Ubuntu, PCRE 6.7
>
> Are you on FreeBSD by chance?
>
> Anyone else experiencing such a problem?
>
> On another note, I would highly recommend upgrading your PHP beyond
> 5.2.0, which introduced some problems that have since been addressed in
> later releases.
>
> Best regards,
> Darby
>
> Graham Anderson wrote:
>> I updated against trunk and now...
>>
>> require_once('Zend/Validate/Alnum.php');
>>
>> $validator = new Zend_Validate_Alnum();
>>
>> $vars = array ( 'Alnum' => 'foobar1',
>> 'NotAlnum' => '[EMAIL PROTECTED]' );
>>
>> foreach ( $vars as $var ) {
>> echo $validator->isValid($var) ? $var .':true ' : $var . ':false ';
>> }
>>
>> --
>> result: foobar1:false [EMAIL PROTECTED]:false
>> --
>>
>> php5 -v
>> PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli) (built: May 8 2007 20:00:45)
>> Copyright (c) 1997-2006 The PHP Group
>> Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
>> with Suhosin v0.9.10, (C) Copyright 2006, by Hardened-PHP Project
>>
>