[PHPLIB-DEV] ct_split_sql From: Teodor Cimpoesu (teo <email protected>)
Date: 11/16/99

Hi guys,
've just made a cvs export -r HEAD and noticed
some oddities. in /stuff/create_database.pgsql
table fields have a p_ prefix whereas this is not
reflected neither in class implementations nor in CHANGES :(

I was in a desperate need of ct_split_sql.inc to work
(btw. special thanks to Massimiliano Masserelli, his class
really helped :) cause I've just prepared a RC for the project
(an antivirus website) and realized an odity: Postresql `text'
field limit is 8k(I knew that) and when the serialization of
the cart items gets over this limit you get a mess.
e.g.
[phplib.php]
<? include './prepend.php';
page_open(array('sess' => 'Example_Session'));
if (! $sess->is_registered('foo'))
  $sess->register('foo');
  $foo .= $foo.'(a lots of text here...)';
?> Foo is <? echo strlen($foo); ?> long now
<?page_close()?>

Warning: PostgresSQL query failed: ERROR: Tuple is too big: size 8316 in
./db_pgsql.inc on line 52
Database error: Invalid SQL: INSERT INTO active_sessions (sid, name,
valenc, valpos, val, changed) VALUES
('1f4e1283eb7fc87d572fa18b56ee69ae','Foo','base64',
'000000','JHRoaXMtPml...)

PostgreSQL Error: 1 (ERROR: Tuple is too big: size 8316 )
Session halted.

Now the problem is that from this point Postgres becomes *very*
unstable.
PHP starts to sigfault when pg_Exec() (it was a hell to track this down
using
error_log :) and even when in psql frontend `postmaster died
unexpectedly'.
I get
Warning: PostgresSQL query failed: pqReadData() -- read() failed:
errno=32 Broken pipe in ./db_pgsql.inc on line 51

Anyways,other time I got it fixed running a vacuumdb.
I dunno what can be done in this respect cause it's too expensive to
test
`val' size on every request.
My guess is there might be a PHP problem too cause after I restarted
postmaster
all queries run fine using psql but via test page sigfault like hell in
pg_Exec()

Regards,
 
CIMPOESU Teodor, Web Programmer

@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo <email protected> , +(401)-330.47.28

official home page ~ http://www.digiro.net/
Internet web page ~ http://internet.digiro.net/
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.