cturbelin / rserve-php

Rserve client php library
Other
44 stars 24 forks source link

Exception message: Unexpected packet Data type (expect DT_SEXP) #10

Open sexygeoff opened 7 years ago

sexygeoff commented 7 years ago

Hi. I'm getting the error above (and below) when retrieving a large result set from a MySQL database. I do not have this error when using RStudio, or when retrieving smaller amounts of data from the the database server.

Fatal error: Uncaught exception 'Sentiweb\Rserve\Exception' with message 'Unexpected packet Data type (expect DT_SEXP)' in ..cturbelin/rserve-php/src/Connection.php:258 Stack trace: #0 /..cturbelin/rserve-php/src/Connection.php(314): Sentiweb\Rserve\Connection->parseResponse('J\x98\xB0l\x01\x00\x00\x00\xD0\x90\xB0l\x01\x00\x00...', NULL) #1 ..marketplace_targets.php(79): Sentiweb\Rserve\Connection->evalString('x <- dbFetch(db...')

I wonder if the problem is similar to this issue which mentions something about large packets: https://github.com/albertosantini/node-rio/issues/31

cturbelin commented 6 years ago

Yes it's probably the case if the result is large. Did you try with a small resultset (like one row ?) ? rserve-php doesnt handle large data yet.