From: [EMAIL PROTECTED] Operating system: RH Linux 7.1 PHP version: 4.2.3 PHP Bug Type: *Directory/Filesystem functions Bug description: File Upload file permissions problem
We just upgraded our PHP from 4.0.6 to 4.2.3. I use phpMyAdmin to manage our MySQL database. Since the upgrade, when I try to upload a data file to be inserted into the database, I get the following error: ~~~~~~~~~~~~~~~~~~~~~~~~~ Error SQL-query : LOAD DATA LOCAL INFILE '/tmp/phpgAIpye' REPLACE INTO TABLE `customers` FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' MySQL said: The file '/tmp/phpgAIpye' must be in the database directory or be readable by all Back ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Has PHP changed its file upload permissions? Mysql server runs as the user 'mysql' and PHP under 'apache'. Apparently the file upload is creating the temporary file with sole access rights (only owner has any access). I need to make it set permissions so that either (1) the 'mysql' owner or the 'apache' group can access these files or (2) that everyone as read access. This only seems to happen with a direct MySQL data file upload. (LOAD DATA INFILE...) Is this possible? -- Edit bug report at http://bugs.php.net/?id=19602&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19602&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19602&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19602&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19602&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19602&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19602&r=support Expected behavior: http://bugs.php.net/fix.php?id=19602&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19602&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19602&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19602&r=globals