4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Importing csv files into Mysql
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
fatuzzo
Junior WebHelper
Junior WebHelper


Joined: 14 Feb 2003
Posts: 2

PostPosted: Fri Feb 14, 2003 2:36 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Hello from Sydney Very Happy !!!

I have got a website hosted by f2s.

I am unsuccesfully Confused trying to import a csv file with the phpMyAdmin import tool.

I have contacted the f2s support to solve the problem and I received this explanation:

"The Mysql Admin tool currently has a security bug that effects uploading
from a file. So we have disabled it.

You will need to find another way round this problem like writing your
own php script."

Well ... I am not really an expert to write a php import script Crying or Very sad . Is there anybody who can suggest me a tutorial or a URL where to get a script specifically prepared for the f2s server?


Thanks a LOT Laughing !!!

Fabio

International Job Links
www.joblinks.f2s.com
OfflineView User's ProfileFind all posts by fatuzzoSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Feb 14, 2003 4:03 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Would you consider installing your own copy of phpMyAdmin from phpwizards.net, and then using that?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Feb 14, 2003 6:49 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Wow, you got a reply, thats more than what I get!

Of course, the alternative answer is for them to do something useful for a change and upgrade PHPMyAdmin to something that is secure, but being F2S, you may as well rule this out.

I would bung a copy up over @ Freedom2Support.net, but I think the firewall would stop that would it not?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Feb 14, 2003 6:59 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Does F2S have a firewall which works "in that direction"? I thought all their firewall did was block requests to the outside Very Happy. I may be wrong though...

Otherwise maybe someone who has space at F2S could volunteer to install phpMyAdmin for fatuzzo?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Feb 14, 2003 7:07 pm (21 years, 10 months ago) Reply with QuoteBack to Top

I have some F2S Space, and I've just created a DB, and will test it tommorow both from my local phpmyadmin install and the one on this space.

If you give me 24 hours I will update you.
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Mon Feb 17, 2003 11:52 am (21 years, 10 months ago) Reply with QuoteBack to Top

Use LOAD INTO ... INFILE ... query

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Feb 17, 2003 3:15 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Right. I have found a way to connect to the F2S Database servers through PHPMyAdmin from my webserver, and it works fine, but before I can put it live, I need to solve one minor problem.

I need to do is set up a phpmyadmin login page for all the visitors, therefore I need a mod, something like THIS :

http://www.f2s.net/db/login.php

Which the user then fills in, which in turn logs him/her into phpmyadmin according to the details they have filled in.

How would I do this? Any Ideas?!?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Feb 17, 2003 4:24 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Right, have worked out how to do this, by switching the authentication to cookie, and listing the servers in config.php, I get a login screen showing the following fields :

Language :
Username :
Password :

Server :

What I also need is one for a table, as in the site I linked to above, if I leave the table field blank in the config.php, the left bar is just simply blank and does not show up a list of DB's, is there any way I can specify the table on login as I can the username, password and server?

Thanks!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Feb 17, 2003 5:52 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Some Weird Firewall here, if I don't specify the table name in phpmyadmin's config file, it does not display the left hand frame, so a user can't select their db on login.. Sad
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Feb 17, 2003 7:03 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Justin wrote:
Some Weird Firewall here, if I don't specify the table name in phpmyadmin's config file, it does not display the left hand frame, so a user can't select their db on login.. Sad


LOL - I found out why it did that, it was not a firewall problem, it was a timeout, have a guess how many databases are on server0038.freedom2surf.net? 1500(!!!)

Talk about seriously overloaded servers!!!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Feb 21, 2003 10:52 am (21 years, 10 months ago) Reply with QuoteBack to Top

Unfortunatley, on further investigation it appears that the information Freedom2Surf have supplied is is WRONG.

Freedom2Surf have not disabled uploading .csv files in phpmyadmin, what they have gone and done is disable the LOAD DATA LOCAL INFILE command in mysql. So Basically, I'm afraid to say, as this is off, there is no way of uploading a .csv file at all.

F2S have disabled this command in mysql, making the whole process impossible. Complaints should be fired to chris@freedom2surf.net, make your feelings known.
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Feb 22, 2003 9:19 am (21 years, 10 months ago) Reply with QuoteBack to Top

Seems like the typical "it doesn't work, so we'll just disable it. No matter how it's done, as long as it can't work" Sad

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Sat Feb 22, 2003 10:30 am (21 years, 10 months ago) Reply with QuoteBack to Top

Yeah, but whats the hell the point of turning it off in MySQL? Thats really stupid. All they need to do is upgrade phpmyadmin then turn it back on, upgrading phpmyadmin took me about 3 minutes max here, surely they could do that?!?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Mon Feb 24, 2003 2:37 am (21 years, 10 months ago) Reply with QuoteBack to Top

There are a few PHP scripts which do CSV import without using "load data into" query, but instead read the file line by line and query the database with the "insert into" query

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
fatuzzo
Junior WebHelper
Junior WebHelper


Joined: 14 Feb 2003
Posts: 2

PostPosted: Mon Feb 24, 2003 7:39 am (21 years, 10 months ago) Reply with QuoteBack to Top

Thanks a lot for your replies and time.

Could you please suggest some of these php scripts available?

Is CSV importer http://www.hotscripts.com/Detailed/18098.html one of these?

Thanks again

Fabio Very Happy
OfflineView User's ProfileFind all posts by fatuzzoSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   


Go to page 1, 2  Next

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.176496 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme