That would be a php.ini setting and I have no clue which [context] to look for 
my friend.




From: tamouse mailing lists [] 
Sent: Thursday, July 26, 2012 4:11 PM
To: Brad
Subject: RE: [PHP-DB] No data?


I am sure the file is created. You need to look to see if MySQL can *read* the 
file. It *must* be world readable. Please look at permissions on *file* not 

On Jul 26, 2012 3:03 PM, "Brad" <> wrote:

That is created via php. It would not create that filename of /tmp/thy152k 
(which becomes an actual file) unless it had the permissions.

An extensive hack could prove those but I am confident it is self explanatory.





From: tamouse mailing lists [] 
Sent: Thursday, July 26, 2012 1:13 PM
To: Brad
Subject: RE: [PHP-DB] No data?


That shows that the /tmp directory is world rwx. What about the actual temp 

On Jul 26, 2012 5:05 AM, "Brad" <> wrote:

My brain went there in a hurry, hours ago my friend

now you should see why I am so confused
No error, but no data either. :(

Brad Sumrall
212 444-2996 <tel:212%20444-2996> 

-----Original Message-----
From: tamouse mailing lists []
Sent: Thursday, July 26, 2012 5:52 AM
To: Brad
Subject: Re: [PHP-DB] No data?

In reading over LOAD DATA ... in the mysql reference. it makes particular note 
of the fact that the file it's reading must be completely world readable, 
including all paths to the file. In checking just now, I notice that a file 
uploaded by php and placed in /tmp is only readable by the server user (aka, 
www-data on some systems).

   "For security reasons, when reading text files located on the server, the 
files must either reside in the database directory or be readable by all."

This tiny script shows what happens:

<html><head><title>file upload example</title> <meta http-equiv="Content-Type" 
content="text/html; charset=UTF-8" /> </head> <body> <h1>file upload 

  <?php var_dump($_FILES); ?>

   if (count($_FILES)>0) {
     $lscmd = 'ls -l '.$_FILES['userfile']['tmp_name'];
     echo '<h2>ls -l tmp_name</h2>'.PHP_EOL;
     echo '<pre>'.`$lscmd`.'</pre>'.PHP_EOL;

<form enctype="multipart/form-data" method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" /> </form>


When a file is submitted, this is the output:

file upload example

  array(1) {
  array(5) {
    string(15) "testfile.txt"
    string(10) "text/plain"
    string(14) "/tmp/phphxGoQm"

ls -l tmp_name

-rw------- 1 www-data www-data 4244 Jul 26 04:41 /tmp/phphxGoQm

Send this file: <form stuff shows up here>

Reply via email to