#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    23
    Rep Power
    0
    hey, all... I'm having a bit of a problem, in that I have a text document (update.txt) on my local drive, and while using phpmyadmin, I need to update the nec. tables.

    I keeping getting an error with phpmyadmin that states:
    'Error
    MySQL said: File 'php2' not found (Errcode: 2)'

    I don't know what this error is, and I really need the ability to remotely update the databse... I'm running mysql and php on a backoffice server. right now I go to the server and use:
    mysql DBNAME < TABLENAME.txt
    to import the data... Soon, I will need to do this remotely... Please let me hear your ideas as to the strange error message. Perhaps I'm using phpmyadmin incorrectly?

    Thanks!
    rainmaker



    ------------------
    Everyone want's to be a rock star.... I just want the money.
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    phpMyAdmin, AFAIK, does not support uploading a local schema file to the remote db. The only way you could do this via MyAdmin is to copy and paste the contents of the file to the "Run SQL query/queries..." text box.

    You could also do this the traditional way and upload the file to the server and use the command line.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    23
    Rep Power
    0
    PHPmyAdmin specifically has an option entitled: Insert textfiles into table

    My text file looks like:

    ********************************************
    INSERT INTO phone_table
    VALUES (
    NULL,
    2,
    'Jones',
    'John',
    'Micro Spec.',
    'jones@texasU.edu',
    '443-4567',
    '443-4448',
    '443-3456',
    NULL );
    ********************************************

    When you select this option, you are asked to fulfill these options:

    Location of text file:
    Fields terminated by:
    Fields enclosed by:
    Fields escaped by:
    Lines terminated by:

    as well as a few others that are yes/no questions.

    I would be fine with uploading and doing it from the command line, however, I can't telnet to this box; so that, I can't do.

    Besides, updating tables via a text doc and a browser is something I would like to know how to do. I was planning on getting this to work, then view the phpmyadmin source and insert it into my own, custom project.

    Thanks for everyone's replies.
    rainmaker


    ------------------
    Everyone want's to be a rock star.... I just want the money.
  6. #4
  7. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    rainmaker-

    It looks to me like there is not a problem with MySQL or phpMyAdmin, but rather with the file upload configuration of your webserver. In order for phpMyAdmin to allow you to browse your local drive and choose a file for MySQL, the web server has to then save that file to a temporary location, which MySQL then reads. (thus the 'File not found' message)

    Check up on how IIS4 supports the File Upload form element. (I am more familiar with Apache, sorry)

    Also, this might simply be a bug with phpMyAdmin/NT. phpMyAdmin was originally written with Unix in mind, and it might have a problem with the Windows '' directory naming convention. (notice the 'php2' in the error message) You might check for the latest version of phpMyAdmin, or ask the creators if this is a bug.

    Good luck
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    60
    Rep Power
    15
    I think you mut be using this on Win32. I have the same issue on three installs on Win32 (98/NT), but it works fine on Linux. phpMyAdmin was definitely written for 'nixes. Also, there are some issues with PHP4RC1/RC2 and phpMyAdmin 2.0.5. return statements from a "require()" need to be changed to "include()".

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 06:42 PM
  2. reading text file
    By jrthor2 in forum Java Help
    Replies: 4
    Last Post: February 14th, 2004, 12:42 PM
  3. Possible to read in value from a text file?
    By discus18 in forum PHP Development
    Replies: 2
    Last Post: February 7th, 2004, 12:19 AM
  4. Simple find and replace word search for a text file with php?
    By rabid lemming in forum PHP Development
    Replies: 4
    Last Post: February 1st, 2004, 10:37 PM
  5. Read text file in reverse
    By million1977 in forum PHP Development
    Replies: 2
    Last Post: January 30th, 2004, 06:04 AM

IMN logo majestic logo threadwatch logo seochat tools logo