Cannot select Latin-1 as the character set in PHPM

2020-07-18 02:50发布

I'm trying to follow along with a tutorial. In the tutorial, the instructor shows how to edit the config.inc file to set a folder as the UploadDir. This enabled him to select .SQL files in that folder from a "web server upload directory" drop down menu when importing in phpmyadmin. I tried getting help with this, but couldn't get it to work. So instead I wanted to just browse for the file and import. I was able to do this, but then I wanted to select "Latin-1" for the character set, as the instructor did, but there is no option for it for me. I don't know if it really matters (I assume it does; otherwise he wouldn't have insisted on it.) Does he have the choice available only because he was able to get the web server upload directory to work or did it work for him because he was using some older phpmyadmin? (The video was made in March 2009.)

5条回答
等我变得足够好
2楼-- · 2020-07-18 03:17

I'm on a CentOS server. My phpMyadmin "vanilla" install uses the folder /var/lib/phpMyAdmin which contains the 'config', 'save' and 'upload' folders. I DIDN'T HAVE TO CHANGE the PHP $cfg['UploadDir'] setting away from the system default (which in my case uses ./tmp).

Anyway, all that was necessary was that I FTP the large (500+MB) .csv file that I want to import into my database into the folder /var/lib/phpMyAdmin/upload. Then navigate to the Import tab in phpMyadmin and the option for "web server upload directory" appears. The drop-down menu now shows the file I just placed in /var/lib/phpMyAdmin/upload.

Hope this helps.

查看更多
我命由我不由天
3楼-- · 2020-07-18 03:19

With my version, I can choose it in the welcome page of phpMyAdmin.

查看更多
够拽才男人
4楼-- · 2020-07-18 03:25

It does not sound like the a failure to get UploadDir to work is responsible for the missing "latin 1" selector. Sounds like a phpMyAdmin version issue.

Fortunately, on many (most?) systems, latin is the default encoding, so even if your version of phpMyAdmin doesn't support selecting your encoding, you'll probably be ok.

查看更多
等我变得足够好
5楼-- · 2020-07-18 03:36

You can use ISO 8859-1

Kudos and Thanks to @user1344717 : Apparently Latin 1 is ISO 8859-1

ISO Latin 1 character set

So go ahead and use ISO 8859-1. I did and it worked fine for me with the Latin1 test mysql files

I was facing a similar issue and He answered this in a comment above, but it took me some time to resolve this.

Oh and yeah, to answer your 2nd query updating the config file and using the UploadDir is totally optional. Adding that gives you a default directory that you can default to say C:\Code or C:\Work, but even without it you can navigate to any Folder or File location using the Browse button available by default. (It's available to me since I'm running as an admin user with all Global privileges in my local installation.)

查看更多
forever°为你锁心
6楼-- · 2020-07-18 03:44

Evidently, there is now an extra line: $cfg['UploadDir'] = ''; (Scroll down in the file from where he is adding it in the tutorial to find it)

In the tutorial, he adds $cfg['UploadDir'] = 'c:\Files'; to the file, and the above line must not already exist for him when he made the video.

Deleting this redundant line made it possible for "webserver upload directory" select box to appear in my PHPMyAdmin interface. It wasn't working for me until I deleted this preexisting line. (or just put c:\Files between the single quotes of the existing line)

Now, I have to figure out why there is no "latin1' selection available on the next line of the PHPMyAdmin interface.

查看更多
登录 后发表回答