#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

2006-09-26 Thread ritch at bugsoftware dot co dot uk
 ID:   38805
 Comment by:   ritch at bugsoftware dot co dot uk
 Reported By:  gkrajci at arescorporation dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows NT PBMA-WB2 5.2 build 37
 PHP Version:  5.1.6
 Assigned To:  wez
 New Comment:

I'm also suffering this problem after changing my database connection
type to PDO.

I'm running PHP 5.1.2 on Windows server 2003 with MSSQL 2005.

In the old mssql ext. you had to specificaly tell the configure it in
php.ini to bring back larger text fields:

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textlimit = 2147483647

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textsize = 2147483647

I have not found the same for the new PDO extension - so I'm assuming
this has some thing to do with the problem. (My text fields are also
truncated to 4096)

Help with this issue would be greatley appreciated.


Previous Comments:


[2006-09-14 11:47:26] gkrajci at arescorporation dot com

Microsoft SQL Server connections

PHP.INI
---
extension=php_pdo.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll

PDO
PDO support enabled 
PDO drivers  mssql, mysql  

pdo_mssql
PDO Driver for MSSQL DB-lib enabled 
Flavour  MSSQL_70  

pdo_mysql
PDO Driver for MySQL, client library version 5.0.22



[2006-09-13 15:45:31] [EMAIL PROTECTED]

I assume you're using ODBC?



[2006-09-13 15:40:37] [EMAIL PROTECTED]

what PDO driver are you using?



[2006-09-13 13:06:35] gkrajci at arescorporation dot com

Description:

When using PDO to retrieve text from a SQL Server text data type field
the text is truncated when I display it on a Web page

PDO Transcript length = 4096 (truncated)
PEAR Transcript length = 6139(full text)

Using SQL Server 2000

Reproduce code:
---
$sql = SELECT title AS VideoTitle, transcript_text AS TranscriptText
FROM video WHERE video_id = 324;

$dbh = new PDO($pdo_dsn, $db_user, $db_password);
$transcript_q = $dbh-query($sql);
$transcript_rs = $transcript_q-fetch();

$pear_dsn = $db_type://$db_user:[EMAIL PROTECTED]/$db_name;
require_once( 'DB.php' );
$db = DB::connect( $pear_dsn, true );
if ( DB::isError($db) ) die( $db-getMessage() );

$res = $db-query($sql);
$row = $res-fetchRow();

Expected result:

The text in TranscriptText to be the text and the same length.

Actual result:
--
See Description for this bug report.





-- 
Edit this bug report at http://bugs.php.net/?id=38805edit=1


#33299 [Com]: php:function no longer handles returned dom objects

2005-06-14 Thread Ritch at Bugsoftware dot co dot uk
 ID:   33299
 Comment by:   Ritch at Bugsoftware dot co dot uk
 Reported By:  clicknmix at gmail dot com
 Status:   Feedback
 Bug Type: XSLT related
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

Ok,

I've spent all day recompiling php and eventualy got the script running
(clicknmix's fom above). The only way to do it was to go back a php
version... to 5.0.3 Everything else stayed the same including the
configure command used to compile PHP and the libxml/libxslt versions;

libxml 2.6.19
libxslt 1.1.11

I'm running FC3 and clicknmix is running centos so it is a problem
across linux platforms.

I've sent my phpinfo results for both builds to clicknmix so  he can
post them @;

http://home.protocol80.co.uk/php5/phpinfo.5.0.3.php.html
http://home.protocol80.co.uk/php5/phpinfo.5.0.4.php.html

This implies that there is something that has changed between these two
versions that upsets this feature. At least in certain circumstances.

Cheers,
Ritch.


Previous Comments:


[2005-06-14 08:59:34] [EMAIL PROTECTED]

You changed 3 components at once, bad for pointing the error 
at something...

As it works for me (with your combination, but on OSX, not 
Linux), would it be possible for you to use the old libxml/
libxslt configuration and test that with php 5.0.4. Or use 
thenew libxml/libxslt configuration with php 5.0.1? I have 
no idea, what's going wrong here, but as I use that 
functionality from a day-to-day basis, I can tell you, it 
works for me (and I never heard of that problem before from 
others using my software)



[2005-06-13 19:17:08] clicknmix at gmail dot com

The above comment didnt make it very clear, but Ritch is running on the
same platform as me:
Linux running Apache2 with PHP 5.0.4
libxml2: 2.6.16
libxslt: 1.1.11.

The scripts do work on a previous platform: 
Linux running Apache1 with PHP 5.0.1
libxml2: 2.6.8
libxslt: 1.0.19

Additional it's might be worth mentioning using the php:function to
simply return a value works fine. It's only when returning an object it
errors.



[2005-06-13 10:30:39] Ritch at Bugsoftware dot co dot uk

I have exactley the problem described. Linux/Apache2/PHP5.0.4 with
libxml 2.6.16  libxslt 1.1.11.



[2005-06-11 10:25:10] [EMAIL PROTECTED]

Works for me just fine. 

Which libxml2/libxslt versions are you using?

chregu



[2005-06-10 16:13:06] clicknmix at gmail dot com

Description:

When using a function with XSLTProcessor-registerPHPFunctions() to
return a dom object, it no longer handles it as XML, and produces an
error.

Reproduce code:
---
Function is:
function myxml ($Value=default)
{
$dom = new domdocument();
$dom-loadXML(rootthis is from an external DomDocument -
$Value/root);
return $dom;
}

and XSLT call is:
xsl:value-of select=php:function('myxml','Hello World')/root /

Full scripts at:
http://home.protocol80.co.uk/php5/collection.phps
http://home.protocol80.co.uk/php5/collection.xml
http://home.protocol80.co.uk/php5/collection.xml

Expected result:

In previous versions you could access the tree of the returned XML and
print the output. (As if you were including a flat XML file)

Actual result:
--
Warning: XSLTProcessor::transformToXml() [function.transformToXml]: A
PHP Object can not be converted to a XPath-string in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: Invalid type in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: runtime error: file
/controlpanel/hosts/design/htdocs/test/collection.xsl element value-of
in /controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: xsltValueOf: text copy failed in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22





-- 
Edit this bug report at http://bugs.php.net/?id=33299edit=1


#33299 [Com]: php:function no longer handles returned dom objects

2005-06-13 Thread Ritch at Bugsoftware dot co dot uk
 ID:   33299
 Comment by:   Ritch at Bugsoftware dot co dot uk
 Reported By:  clicknmix at gmail dot com
 Status:   Feedback
 Bug Type: XSLT related
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

I have exactley the problem described. Linux/Apache2/PHP5.0.4 with
libxml 2.6.16  libxslt 1.1.11.


Previous Comments:


[2005-06-11 10:25:10] [EMAIL PROTECTED]

Works for me just fine. 

Which libxml2/libxslt versions are you using?

chregu



[2005-06-10 16:13:06] clicknmix at gmail dot com

Description:

When using a function with XSLTProcessor-registerPHPFunctions() to
return a dom object, it no longer handles it as XML, and produces an
error.

Reproduce code:
---
Function is:
function myxml ($Value=default)
{
$dom = new domdocument();
$dom-loadXML(rootthis is from an external DomDocument -
$Value/root);
return $dom;
}

and XSLT call is:
xsl:value-of select=php:function('myxml','Hello World')/root /

Full scripts at:
http://home.protocol80.co.uk/php5/collection.phps
http://home.protocol80.co.uk/php5/collection.xml
http://home.protocol80.co.uk/php5/collection.xml

Expected result:

In previous versions you could access the tree of the returned XML and
print the output. (As if you were including a flat XML file)

Actual result:
--
Warning: XSLTProcessor::transformToXml() [function.transformToXml]: A
PHP Object can not be converted to a XPath-string in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: Invalid type in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: runtime error: file
/controlpanel/hosts/design/htdocs/test/collection.xsl element value-of
in /controlpanel/hosts/design/htdocs/test/collection.php on line 22

Warning: xsltValueOf: text copy failed in
/controlpanel/hosts/design/htdocs/test/collection.php on line 22





-- 
Edit this bug report at http://bugs.php.net/?id=33299edit=1