From: hunkybill@gmail.com
To: pgsql-php@postgresql.org
Subject: Problem with columns of type Text and Drupal/Prado/PHP5
Date: Wed, 02 Aug 2006 12:05:45 -0400
Message-ID: <44D0CD59.8090008@gmail.com> (raw)
Hi,
My software for context:
CentOS 4.3 Linux
PHP 5.1
Prado 2.1
Drupal 4.72
PostgreSQL 8.1.4
I use Prado, an advanced PHP5 framework which maintains a viewstate
(session data) which is essentially a lot of text (possibly containing
some binary data). I also use Drupal for my content management system,
which has support for PostgreSQL, but mainly mysql. Examining the
database storage for PHP sessions, it uses a column marked as TEXT to
store session data. In my case of integrating not only Drupal, but
Prado, I have extra data from Prado being saved into the session table.
With mysql, columns of type TEXT are actually BLOBS. When running Drupal
and Prado with mysql, session management works fine. With Drupal, Prado
and pgsql however, I have a serious problem.
It appears that in the Prado viewstate are some characters (binary??)
that offend the pgsql TEXT column and write errors occur whereby not all
the text is written to the session table, resulting in instability.
There is a point in the text stream where some binary data probably
causes an EOF or something?
Since mysql TEXT columns are really just BLOBS, and they work fine with
the viewstate data, is there a way to just change the column type from
TEXT to something akin to a BLOB column in pgsql so that I can use pgsql
instead of mysql?
I examined the docs and it seems there is no easy way to just define a
column as holding binary data for simple read/write operations. I am
hoping there is a simple solution to swapping a column of type TEXT so
that I can continue to integrate Drupal with Prado. I use Creole and
Propel as my ORM system and have verified that PHP is not the problem,
but it is the actual attempt to write to the pgsql column of type TEXT.
I hope that is clear enough to garner some useful suggestions!!
Thanks
Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: hunkybill@gmail.com
Subject: Re: Problem with columns of type Text and Drupal/Prado/PHP5
In-Reply-To: <44D0CD59.8090008@gmail.com>
References: <44D0CD59.8090008@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox