hi all...

this is a bit retarded but i cant figure it out.

if(!$hook = mysql_connect(localhost, user, passwd)) die('did not connect');
mysql_select_db(db,$hook);

echo $q = 'select * into outfile "/path/to/files/daily/today.txt" from table where date(entry) = curdate()';

mysql_query($q);

nice. after executing it on the command line nothing happens except it prints the query.
permissions a fine. i even set it up the directory to 777 so i can test.
no warning/error messages. no log entries....

if i copy and paste the printed query in the mysql client cli it works fine...

it works fine on a another machine. just want to move it...

php 5.2.6 with mysql 5.0.51b

any help welcome....

thanks...

    try some debugging.

    mysql_query($q) or die( mysql_error() . "<br>$q" );

      HalfaBee;10890491 wrote:

      try some debugging.

      thanks... i did. weirder. here:
      Access denied for user 'user'@'host' (using password: YES)

      thing is the connection is done with an include file that the whole application is using and it's working fine. i also logged in via client to mysql with the original user/passwd and it all works fine....

      i tried the root/root_pw and that works. but i can't explain the fact that the same user will work for the whole application on line but not on the command line. it work on the old machine - i just did it.

      why would that be different?

      thanks...

        You "user" must not have "FILE" PRIVILEGES.

          HalfaBee;10890496 wrote:

          You "user" must not have "FILE" PRIVILEGES.

          correct. i forgot about that. thanks...

            Write a Reply...