Re: [PHP-DB] Re: Error Loading File -- Sort of Fixed
Ok, if anyone else is having the same trouble with PHP 4.2.1, David Robley's suggestion (Thank you David!) works. I am not to proud to have missed the obvious :) If you are having trouble loading files (LOAD INFILE...) with PHP into MySQL, just do a chmod($file, 0777), and it works. Not sure why this version of PHP doesn't give full permissions in the /tmp directory, but. Thanks all. David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Whoops :), Yes, this is using phpMyAdmin, trying to use the Insert data from a textfile into table function, which uploads a file and the attempts to LOAD DATA INFILE. Like I said below, it worked on PHP 4.1.2, then when upgraded to PHP 4.2.1, it gave the error : The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I ran through the phpMyAdmin scripts and watched it up until it tried to load the file, and it wouldn't read it. The /tmp directory is drwxrwxrwx and the files in it are -rw--, but I don't know how to get those changed in PHP. Anyway, on a different server, I could have sworn I got the same problem but the uploaded files in the /tmp directory were -rwxrwxrwx. Any ideas? Thanks David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am getting this error with a new install of PHP4.2.1 and Zend Optimizer 1.3.1: The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I just updated PHP and the Zend Optimizer, and it had worked previously with PHP4.1.2, Any ideas?? Because you are asking on the db list, I'll guess that you are trying to use LOAD DATA INFILE? The file you are trying to load needs to be world readable if it isn't in the database directory. If this isn't the problem, can you be a bit more specific about the circumstances in which this error appears? chmod() ??
Re: [PHP-DB] Re: Error Loading File
Whoops :), Yes, this is using phpMyAdmin, trying to use the Insert data from a textfile into table function, which uploads a file and the attempts to LOAD DATA INFILE. Like I said below, it worked on PHP 4.1.2, then when upgraded to PHP 4.2.1, it gave the error : The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I ran through the phpMyAdmin scripts and watched it up until it tried to load the file, and it wouldn't read it. The /tmp directory is drwxrwxrwx and the files in it are -rw--, but I don't know how to get those changed in PHP. Anyway, on a different server, I could have sworn I got the same problem but the uploaded files in the /tmp directory were -rwxrwxrwx. Any ideas? Thanks David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am getting this error with a new install of PHP4.2.1 and Zend Optimizer 1.3.1: The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I just updated PHP and the Zend Optimizer, and it had worked previously with PHP4.1.2, Any ideas?? Because you are asking on the db list, I'll guess that you are trying to use LOAD DATA INFILE? The file you are trying to load needs to be world readable if it isn't in the database directory. If this isn't the problem, can you be a bit more specific about the circumstances in which this error appears?
Re: [PHP-DB] Re: Error Loading File
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Whoops :), Yes, this is using phpMyAdmin, trying to use the Insert data from a textfile into table function, which uploads a file and the attempts to LOAD DATA INFILE. Like I said below, it worked on PHP 4.1.2, then when upgraded to PHP 4.2.1, it gave the error : The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I ran through the phpMyAdmin scripts and watched it up until it tried to load the file, and it wouldn't read it. The /tmp directory is drwxrwxrwx and the files in it are -rw--, but I don't know how to get those changed in PHP. Anyway, on a different server, I could have sworn I got the same problem but the uploaded files in the /tmp directory were -rwxrwxrwx. Any ideas? Thanks David Robley wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am getting this error with a new install of PHP4.2.1 and Zend Optimizer 1.3.1: The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I just updated PHP and the Zend Optimizer, and it had worked previously with PHP4.1.2, Any ideas?? Because you are asking on the db list, I'll guess that you are trying to use LOAD DATA INFILE? The file you are trying to load needs to be world readable if it isn't in the database directory. If this isn't the problem, can you be a bit more specific about the circumstances in which this error appears? chmod() ?? -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Error Loading File
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am getting this error with a new install of PHP4.2.1 and Zend Optimizer 1.3.1: The file '/tmp/phpr4WYQY' must be in the database directory or be readable by all I just updated PHP and the Zend Optimizer, and it had worked previously with PHP4.1.2, Any ideas?? Because you are asking on the db list, I'll guess that you are trying to use LOAD DATA INFILE? The file you are trying to load needs to be world readable if it isn't in the database directory. If this isn't the problem, can you be a bit more specific about the circumstances in which this error appears? -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php