ID: 32473 User updated by: f-bischof at versanet dot de Reported By: f-bischof at versanet dot de -Status: Open +Status: Closed Bug Type: Apache related Operating System: Win XP Sp2 PHP Version: PHP Version 4.3.11RC2-dev New Comment:
Sorry, i am stupid !!!!!! Changing the value of the odbc.defaultlrl in the php.ini to: odbc.defaultlrl = 300000 ...fixed my problem... Ouch..... Previous Comments: ------------------------------------------------------------------------ [2005-03-29 20:26:14] f-bischof at versanet dot de I have made some additionally tests, to write a workaround for this problem !!! Instead of using base64_decode/encode i have replaced all ' with '' in the $text - string to avoid trouble with the sql-insert command. This showed me, that the bug resists, even with not using base64_encode / decode functions. If i insert a big $text - String in the database, the database (MS-Access) stores this Text completely in the Table. But if i select the Text out of the database i got not the complete text like it is in the Database, its truncated after about 3KB. I think the problem is in the mysql_odbc functions. Here a code snipplet: $connect = odbc_connect("astaBB","",""); $query = "SELECT NachrichtsID,User,Datum,TextN,Email from Nachrichten,Login where NachrichtsID=$NachrichtsID and User='$username'"; # perform the query $result = odbc_exec($connect, $query); # fetch the data from the database while(odbc_fetch_row($result)) { $NachrichtsID=odbc_result($result, 1); $User=odbc_result($result, 2); $Datum=odbc_result($result, 3); $Text=odbc_result($result, 4); $email=odbc_result($result, 5); } $Text will be truncated after about 3KB, but the Table-Field TextN (Access-Memo Field) has the complete 4KB Text stored. ------------------------------------------------------------------------ [2005-03-29 18:11:44] f-bischof at versanet dot de I have tried it with the announced latest stable version, with the same result. Truncated after 2933 Bytes length. http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2005-03-29 00:38:38] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2005-03-28 16:27:02] f-bischof at versanet dot de Description: ------------ I use Apache/1.3.31 (Win32) PHP/4.3.10 mod_ssl/2.8.18 OpenSSL/0.9.7d I host a website: http://pocketwelt.dyndns.org If someone writes a forum-article that is longer then 2933 Bytes and i try to save the input (base64_encoded) in my database, and then reload the article, itīs truncated after 2933 bytes. The rest deleted... If i write the article without base64_encoding, i get so much characters in the databse like i want. The Bug seems only appear if i use base64_encoding. (also tested with PHP 5.05 with the same result...) Reproduce code: --------------- $text=base64_encode($text); Text should be about 4 or 5 KB to see the bug ! Expected result: ---------------- Truncated Text afeter 2933 Bytes ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32473&edit=1