LOAD DATA LOCAL INFILE revisited

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pieter Van Waeyenberge

    LOAD DATA LOCAL INFILE revisited

    Hello

    i *had* it working ... i have everything in place as all documentation and
    fora stated.. but yet i AGAIN get the error:

    "The used command is not allowed with this MySQL version" in
    /home/foo/public_html/goo/import.load.ite ms.php on line..

    LOAD DATA LOW_PRIORITY LOCAL INFILE
    '/home/foo/public_html/goo/import/file.txt' REPLACE INTO TABLE discipline
    FIELDS TERMINATED BY '{_^^)' LINES TERMINATED BY '\r\n' (col1,col2)


    The context:

    - PHP Version 4.3.8
    - MySql: version - 4.0.17
    - FreeBSD 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4 #1: Sun i386

    - MySql has LOCAL_INFILE = On
    - I connect to mysql using CLIENT_LOCAL_FL AGS: mysql_connect($ host, $usr,
    $pwd, false, 128);
    - the open base dir is set to '/home/foo/'
    - the directory 'import' where i get the file from has max permissions
    - what i do in the app is: move the HTTP uploaded file to
    '/goo/import/file.txt' ... (which is NOT the upload_tmp_dir) .. and then
    later in another script i use the above sql statement


    Am i missing something? help would be appreciated ..

    thnx in advance ..
    Pieter Van Waeyenberge


  • GoL

    #2
    Re: LOAD DATA LOCAL INFILE revisited

    On Tue, 17 Aug 2004 16:00:30 +0200, "Pieter Van Waeyenberge"
    <p@foo.com> wrote:
    [color=blue]
    >Hello
    >
    >i *had* it working ... i have everything in place as all documentation and
    >fora stated.. but yet i AGAIN get the error:
    >
    >"The used command is not allowed with this MySQL version" in
    >/home/foo/public_html/goo/import.load.ite ms.php on line..
    >
    >LOAD DATA LOW_PRIORITY LOCAL INFILE
    >'/home/foo/public_html/goo/import/file.txt' REPLACE INTO TABLE discipline
    >FIELDS TERMINATED BY '{_^^)' LINES TERMINATED BY '\r\n' (col1,col2)
    >
    >
    >The context:
    >
    >- PHP Version 4.3.8
    >- MySql: version - 4.0.17
    >- FreeBSD 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4 #1: Sun i386
    >
    >- MySql has LOCAL_INFILE = On
    >- I connect to mysql using CLIENT_LOCAL_FL AGS: mysql_connect($ host, $usr,
    >$pwd, false, 128);
    >- the open base dir is set to '/home/foo/'
    >- the directory 'import' where i get the file from has max permissions
    >- what i do in the app is: move the HTTP uploaded file to
    >'/goo/import/file.txt' ... (which is NOT the upload_tmp_dir) .. and then
    >later in another script i use the above sql statement
    >
    >
    >Am i missing something? help would be appreciated ..
    >
    >thnx in advance ..
    >Pieter Van Waeyenberge
    >[/color]

    It's local-infile=1, not local_infile = on
    unless I'm mistaken...?
    Additionally, both client and server needs local-infile enabled.





    Comment

    • Pieter Van Waeyenberge

      #3
      Re: LOAD DATA LOCAL INFILE revisited

      sorry for my late response

      on or 1 .. both still fail me ...

      and both client (PHP) and server (Mysql) have it enabled ... so it still
      dont work

      Worse yet .. i installed PhpMyAdmin and even there on the import file func i
      get the same errors bor both methods:

      with and without LOCAL !!!!!!

      pieter van waeyenberge


      "GoL" <^^@**.com> wrote in message
      news:gfl4i0tn6a 70nv2rddv6jicie uvs5t6nef@4ax.c om...[color=blue]
      > On Tue, 17 Aug 2004 16:00:30 +0200, "Pieter Van Waeyenberge"
      > <p@foo.com> wrote:
      >[color=green]
      > >Hello
      > >
      > >i *had* it working ... i have everything in place as all documentation[/color][/color]
      and[color=blue][color=green]
      > >fora stated.. but yet i AGAIN get the error:
      > >
      > >"The used command is not allowed with this MySQL version" in
      > >/home/foo/public_html/goo/import.load.ite ms.php on line..
      > >
      > >LOAD DATA LOW_PRIORITY LOCAL INFILE
      > >'/home/foo/public_html/goo/import/file.txt' REPLACE INTO TABLE discipline
      > >FIELDS TERMINATED BY '{_^^)' LINES TERMINATED BY '\r\n' (col1,col2)
      > >
      > >
      > >The context:
      > >
      > >- PHP Version 4.3.8
      > >- MySql: version - 4.0.17
      > >- FreeBSD 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4 #1: Sun i386
      > >
      > >- MySql has LOCAL_INFILE = On
      > >- I connect to mysql using CLIENT_LOCAL_FL AGS: mysql_connect($ host,[/color][/color]
      $usr,[color=blue][color=green]
      > >$pwd, false, 128);
      > >- the open base dir is set to '/home/foo/'
      > >- the directory 'import' where i get the file from has max permissions
      > >- what i do in the app is: move the HTTP uploaded file to
      > >'/goo/import/file.txt' ... (which is NOT the upload_tmp_dir) .. and then
      > >later in another script i use the above sql statement
      > >
      > >
      > >Am i missing something? help would be appreciated ..
      > >
      > >thnx in advance ..
      > >Pieter Van Waeyenberge
      > >[/color]
      >
      > It's local-infile=1, not local_infile = on
      > unless I'm mistaken...?
      > Additionally, both client and server needs local-infile enabled.
      >
      >
      >
      >
      >[/color]


      Comment

      Working...