From: gary at koning dot com
Operating system: win2k
PHP version: 4.3.4
PHP Bug Type: ODBC related
Bug description: using ereg and odbc in a script causes odbc driver error message
Description:
------------
I am converting an application to win2k/mssql from linux/mysql. Using ereg
to validate form field data.
Getting unuasual error message from the win2k odbc driver.
Reproduce code:
---------------
Validation code:
if( !ereg("^([EMAIL PROTECTED],18})$",$stmp) )
Using odbc_do(), almost any simple query returning rows
will result in the driver throwing an error message
like:
"Error converting data type varchar to numeric"
I say almost because sometimes a row of data was returned.
But even then, reloading the script would give the above error.
Expected result:
----------------
Valid data from the odbc driver or a known error message.
Actual result:
--------------
Removing the call to ereg() will cause the query to return proper data.
No further info at this time. (Took me 2 days to track this down). I
beleive an old copy of active perl is installed on this box, if that has
any bearing.
--
Edit bug report at http://bugs.php.net/?id=27465&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27465&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27465&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27465&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27465&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27465&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27465&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27465&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27465&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27465&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27465&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27465&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27465&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27465&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27465&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27465&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27465&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27465&r=float