The file '/var/tmp/phpLyOutn' must be in the database direct

liunx

Guest
Hi,

I have a problem with my PHP and MySQL on a FreeBSD 6.2 server.
When I am saving a file to the database I get this error:

The file '/var/tmp/phpLyOutn' must be in the database directory or be readable by all


What I understand is that MySQL has to have the privilliges to access and read the file, but how do I do this? The /var/tmp dir har CHMOD 777, so the problem is not there. The uploadtemp dir in php.ini, is /var/tmp/, no problems there.. but still I get this error.

MySQL function I use:
$queryLoadDoc = "LOAD DATA INFILE \"$post\" INTO TABLE $tabletemp";

Can somebody please help me, I am all googled out!

// PaulProbably the permissions on this file don't allow it to be read by all users. The permissions on the directory don't affect who has access to the file.

Do a chmod a+r on the file (maybe you'd have to use mode 644 or something if using PHP e.g. chmod(file, 0644) or sommat?)

MarkYes, but the file is created by PHP (got the file on a other PC so can't really check it right now)

Everything is working fine on a Windows server with MySQL 4.x and PHP 5. Does anyone have any other suggestions incase this doesn't work...

I am going back to my office in 30 min and going to att chmod to the PHP created file.

// Paul
 
Back
Top