A difficult problem needs help...
| From: | JoShQuNe \(TR\) | Date: | Wed, 15 Dec 2004 01:41:25 +0000 |
| Subject: | A difficult problem needs help... | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-26823@lists.php.net to get a copy of this message | ||
The matter seemed to be bug to me but if know a solution please share with me..
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 (i also tried with blob types)
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:
---------------
$actt=@copy($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.
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250