ID:               31093
 Updated by:       [EMAIL PROTECTED]
 Reported By:      joshqune at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: FreeBSD
 PHP Version:      4.3.8
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The field in mysql needs to be TEXT or BLOB type.



Previous Comments:
------------------------------------------------------------------------

[2004-12-14 19:07:42] joshqune at yahoo dot com

Description:
------------
I have a payed site from www.netfirms.com they use 4.3.6 if understand
that problem is because of earlier version and solved in newer ones, i
will tell them to upgrade it. Nobody could be able understand this they
told me that this may be a bug so i submitted here. Problem is: I upload
a .txt file and access inside and take contents. Up to here it is ok but
by then i cannot insert this content to mysql table as a new row or
updated row. It reads the content and stores in $buffer variable but
when it tries to insert into table it can not, besides if i try to
insert that content by opening by notepad and manually copy-paste into
a textarea it achieves to insert this way. The content is some long
like 3-5kbs file size. I set the coloumn type in mysql to longtext but
not solved. I don't know the problem is because of me or the system.
When i delete the long rows from file it achieves but i can not delete
them.

Reproduce code:
---------------
[EMAIL PROTECTED]($file, "$absolute_path/file.txt") or die("No upload..
$geri");$dosyam="../beyazesya/Del/file.txt";$fp=fopen($dosyam,"r") or
die("Cant open the file");while(!feof($fp)){$buf =
fgets($fp,8192);$buffer=$buffer.$buf;}$buffer=eregi_replace("t","",$buffer);$buffer=trim($buffer);$f_a=$file_name;$model=str_replace(".txt","",$f_a);$resim="$model.$tur";mysql_connect("xxx","yyy","zzz");mysql_select_db("aaa");$bb=mysql_query("SELECT
* FROM beyaz WHERE alan1='$alan1' AND alan2='$alan2' AND alan3='$alan3'
AND
model='$model'");$say_bb=mysql_num_rows($bb);if($say_bb<1){$b=mysql_query("INSERT
INTO beyaz (alan1,alan2,alan3,resim,model,html) VALUES
('$alan1','$alan2','$alan3','$resim','$model','$buffer')") or
die("Could not insert the row");

Expected result:
----------------
If it can insert that long .txt file's content by textarea it must also
insert by opening a file reading inside.

Actual result:
--------------
It cannot insert the .txt file's content to mysql table.


------------------------------------------------------------------------


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

Reply via email to