Edit report at https://bugs.php.net/bug.php?id=44433&edit=1
ID: 44433
Comment by: emeraldd dot chris at gmail dot com
Reported by: hans at velum dot net
Summary: Text with null characters (\0) truncated when bound
to prepared statement
Status: No Feedback
Type: Bug
Package: PDO related
Operating System: Gentoo Linux
PHP Version: 5.2.5
Block user comment: N
Private report: N
New Comment:
It looks like this might actually be a limitation in postgresql. From what I
can tell, the database does not support storing the null character.
http://stackoverflow.com/questions/1347646/postgres-error-on-insert-error-
invalid-byte-sequence-for-encoding-utf8-0x0
The relevant line is just above heading 4.1.2.3
http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html#SQL-SYNTAX-
STRINGS-UESCAPE
Previous Comments:
------------------------------------------------------------------------
[2012-12-28 16:30:51] emeraldd dot chris at gmail dot com
I can confirm that this still exists in php 5.3.19 (also running gentoo). Has
anyone found a solution?
------------------------------------------------------------------------
[2012-10-12 13:01:15] metala at metala dot org
Forgot to add the postgres and pdo_pgsql versions.
pdo_pgsql
PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 9.1.5
Module version => 1.0.2
Revision => $Id$
Package: postgresql-9.1
State: installed
Automatically installed: no
Version: 9.1.5-2
------------------------------------------------------------------------
[2012-10-12 12:57:21] metala at metala dot org
I have experienced the same issue with PHP 5.4.4-7 using Debian wheezy/sid.
Actually It made me drop the idea to store objects in database and I used the
conventional way to solve the problem. So it was frustrating....
------------------------------------------------------------------------
[2009-05-03 01:00:11] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-04-25 14:56:32] [email protected]
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=44433
--
Edit this bug report at https://bugs.php.net/bug.php?id=44433&edit=1