[PHP-BUG] Req #62743 [NEW]: Empty, but set session cookies cause warning and cause sessions to not save
From: brianlmoon
Operating system: Linux
PHP version: 5.3.15
Package: Session related
Bug Type: Feature/Change Request
Bug description:Empty, but set session cookies cause warning and cause sessions
to not save
Description:
If a session cookie is not set, a new session id will be created and all
works fine. However, if for some reason the session cookie is set, but an
empty string, session_start() throws a warning and custom session handlers
are called with an empty session id. In addition, no session cookies are
set.
Test script:
---
The test script involves setting empty cookies and such. This is the user
land workaround I am using for now.
if(isset($_COOKIE[ini_get("session.name")]) &&
empty($_COOKIE[ini_get("session.name")])){
// The cookie is empty. This is bad.
unset($_COOKIE[ini_get("session.name")]);
}
session_start();
Expected result:
An empty session cookie should be treated the same as an unset session
cookie.
Actual result:
--
Empty session cookies are treated as session ids, but warned and cause
sessions to not be saved.
--
Edit bug report at https://bugs.php.net/bug.php?id=62743&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62743&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62743&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62743&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62743&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62743&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62743&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62743&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62743&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62743&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62743&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62743&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62743&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62743&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62743&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62743&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62743&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62743&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62743&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62743&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62743&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62743&r=mysqlcfg
[PHP-BUG] Bug #52302 [NEW]: mysqli_fetch_all does not work with MYSQLI_USE_RESULT
From: Operating system: Linux PHP version: 5.3.2 Package: MySQLi related Bug Type: Bug Bug description:mysqli_fetch_all does not work with MYSQLI_USE_RESULT Description: When using MYSQLI_USE_RESULT as the second parameter to mysqli_query, fetch_all returns null. Test script: --- query($sql, MYSQLI_USE_RESULT); $rows = $res->fetch_all(); var_dump($rows); ?> Expected result: An array of the table data. Actual result: -- NULL -- Edit bug report at http://bugs.php.net/bug.php?id=52302&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52302&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52302&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52302&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52302&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52302&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52302&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52302&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52302&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52302&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52302&r=support Expected behavior: http://bugs.php.net/fix.php?id=52302&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52302&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52302&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52302&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52302&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52302&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52302&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52302&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52302&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52302&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52302&r=mysqlcfg
[PHP-BUG] Bug #55531 [NEW]: Vertical tabs ignored by XMLWriter
From: brianlmoon
Operating system: Linux
PHP version: 5.3.8
Package: XML related
Bug Type: Bug
Bug description:Vertical tabs ignored by XMLWriter
Description:
When text contains vertical tabs, XMLWriter silently ignores them and
generates invalid XML. This is not an issue where the text is invalid
UTF-8. It is valid UTF-8 data. Vertical tabs are simply not allowed in XML
by rule. I would expect XMLWriter to encode it as it would any other
character not allowed in XML. I suspect that
Test script:
---
openMemory();
$xml->startDocument('1.0', 'UTF-8');
$xml->writeElement("test", "This data contains a \vvertical tab");
$xml->endElement();
$data = $xml->outputMemory(true);
$sxml = simplexml_load_string($data);
?>
Expected result:
Either an error or valid XML.
Actual result:
--
Invalid XML is silently created. For example, SimpleXML::addchild() throws
a warning: SimpleXMLElement::asXML(): xmlEscapeEntities : char out of range
when a vertical tab is present and the node is not added.
--
Edit bug report at https://bugs.php.net/bug.php?id=55531&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55531&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55531&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=55531&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55531&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=55531&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55531&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=55531&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=55531&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=55531&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=55531&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=55531&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=55531&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=55531&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55531&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=55531&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=55531&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=55531&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=55531&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=55531&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=55531&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=55531&r=mysqlcfg
