[PHP-BUG] Bug #63531 [NEW]: pdo_mysql test fails with unexpected MYSQL_ATTR_SERVER_PUBLIC_KEY constant

2012-11-15 Thread google...@php.net
From: googleguy
Operating system: linux
PHP version:  5.5.0alpha1
Package:  Testing related
Bug Type: Bug
Bug description:pdo_mysql test fails with unexpected 
MYSQL_ATTR_SERVER_PUBLIC_KEY constant

Description:

The ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt fails in 5.5.0
Alpha1 with 
unexpected class constant MYSQL_ATTR_SERVER_PUBLIC_KEY


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63531&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63531&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63531&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63531&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63531&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63531&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63531&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63531&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63531&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63531&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63531&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63531&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63531&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63531&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63531&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63531&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63531&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63531&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63531&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63531&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63531&r=mysqlcfg



[PHP-BUG] Bug #63737 [NEW]: json_decode does not properly decode with options parameter

2012-12-11 Thread google...@php.net
From: google...@php.net
Operating system: 
PHP version:  5.4.9
Package:  JSON related
Bug Type: Bug
Bug description:json_decode does not properly decode with options parameter

Description:

json_decode does not properly decode JSON strings using options parameter.



Test script:
---
json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); //
this won't work

However this will

json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING);

Expected result:

string(20) "12345678901234567890"

Actual result:
--
float(1.2345678901235E+19)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63737&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63737&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63737&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63737&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63737&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63737&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63737&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63737&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63737&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63737&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63737&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63737&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63737&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63737&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63737&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63737&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63737&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63737&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63737&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63737&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63737&r=mysqlcfg



[PHP-BUG] Bug #63916 [NEW]: PDO::PARAM_INT casts to 32bit int internally even on 64bit builds in pdo_sqlie

2013-01-05 Thread google...@php.net
From: googleguy
Operating system: 
PHP version:  5.4.10
Package:  PDO related
Bug Type: Bug
Bug description:PDO::PARAM_INT casts to 32bit int internally even on 64bit 
builds in pdo_sqlie

Description:

Binding a PDO parameter with pdo_sqlite on 64bit builds with PDO::PARAM_INT

forces the param to be cast internally to an int. This means 64bit ints
will be 
cast down to 32bit ints internally even if PHP was compiled against a 64bit
arch.

Test script:
---
$num = 14313234244; // notice this exceeds 32 bits
$conn = new PDO('sqlite::memory:');
$conn->query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT
NULL, PRIMARY KEY(id))');

$stmt = $conn->prepare('insert into users (id, num) values (:id, :num)');
$stmt->bindValue(':id', 1, PDO::PARAM_INT);
$stmt->bindValue(':num', $num, PDO::PARAM_INT);
$stmt->execute();

$stmt = $conn->query('SELECT num FROM users');
$result = $stmt->fetchAll(PDO::FETCH_COLUMN);

printf("Expected: %d Received: %d\n", $num, $result[0]);

Expected result:

// expected to output
Expected: 14313234244 Received: 14313234244

Actual result:
--
// instead we get output of
Expected: 14313234244 Received: 294714180

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63916&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63916&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63916&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63916&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63916&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63916&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63916&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63916&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63916&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63916&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63916&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63916&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63916&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63916&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63916&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63916&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63916&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63916&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63916&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63916&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63916&r=mysqlcfg



[PHP-BUG] Bug #63921 [NEW]: sqlite3::bindvalue and relative PHP functions aren't using sqlite3_*_int64 API

2013-01-06 Thread google...@php.net
From: googleguy
Operating system: 
PHP version:  5.4.10
Package:  SQLite related
Bug Type: Bug
Bug description:sqlite3::bindvalue and relative PHP functions aren't using 
sqlite3_*_int64 API

Description:

The sqlite3::bindvalue and relative PHP functions aren't using
sqlite3_*_int64 
API functions internally or checking for a 64 bit build to do so. As a
result 
using SQLITE3_INTEGER constants in calls to bindValue cause internal cast
to 32 
bit int. This is unexpected behavior and the API calls exist internally
sqlite3. 
This is also related to bug #63916 which I also patched. I'm providing an 
additional patch for ext/sqlite3 in relation for the same bug.

Test script:
---
$num = 14313234244; // notice this exceeds 32 bits
$conn = new sqlite3(':memory:');
$conn->query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT
NULL, PRIMARY KEY(id))');

$stmt = $conn->prepare('insert into users (id, num) values (:id, :num)');
$stmt->bindValue(':id', 1, SQLITE3_INTEGER);
$stmt->bindValue(':num', $num, SQLITE3_INTEGER);
$stmt->execute();

$stmt = $conn->query('SELECT num FROM users');
$result = $stmt->fetchArray();

printf("Expected: %d Received: %d\n", $num, $result[0]);

Expected result:

Expected: 14313234244 Received: 14313234244

Actual result:
--
Expected: 14313234244 Received: 294714180

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63921&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63921&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63921&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63921&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63921&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63921&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63921&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=63921&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=63921&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=63921&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=63921&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63921&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63921&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=63921&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63921&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=63921&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=63921&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=63921&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63921&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63921&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63921&r=mysqlcfg