You are here: I am totally stumped..with this on..LOAD_FILE Mysql+PHP= FSCK!! « PHP Programming Language « IT news, forums, messages
I am totally stumped..with this on..LOAD_FILE Mysql+PHP= FSCK!!

Posted by The Natural Philosopher on 09/04/07 03:42

This is so weird.

What I am trying to do is to upload files and stuff them in a mysql
database.

Everything works except the file content is zero.

using the load_file command from mysql command line as 'root' works and
i can download the inserted file ok.

using the load_file command from mysql as 'web-user' (my default web
user?) didn't work until I gave that user every permission I could find,
and *restarted mysqld*. (why? *shrug*)

using the load_file command from php/Mysql to load the temporary files
fails miserably all the time. Not one success. Everything else is
fine..I get the name and the size coming through,and I've 'echo'ed the
command string that goes to mysql_query() and tried it in the command
line stuff, and that works provided I give it a file that actually exists.


If the file does NOT exist then I get no error, just no data..

So that is a possibility..

Ah. I copied the temporary file to somewhere else (/tmp/foo), and then
handed it to MySQL..THAT WORKED..

So it's something about how the temporary file is - or isn't - being
written to disk maybe.

Is there a way to force a close on the file..maybe that's the problem
Mysql is opening a file that is not flushed to disk maybe?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация