dat to mysql import - or redirect authorization
hello everyone..
my users are signing up in a cgi script.. their info is being set inside a .dat file.
now i have many applications that use mysql authorization (forums.. shoppong cart.. image galleries) and i need to have the same users who signed up above to be able to access those...
so i either have to have a script that imports the .dat file into the mysqls and make that run every hour (cron job)..
or i have to have a script that redirects the mysql authorization process to the .dat file (knowing that all the mysqls run on php)..
i think this falls under the perl or php exprience..
ANY suggestion may help..
thanks
Tarek
m3rajk posted this at 19:08 — 24th April 2004.
They have: 461 posts
Joined: Jul 2003
i'd start by changing the cgi for a php form that enters the users into mysql, then, if you dont want to go through by hand, create a script to go throughthe dat files and insert them into sql.
assuming the dat files all have the same structure, it wouldn't be hard to create a perl script that could take the dat directory and make one HUGE sql file that you can read and it will insert them for you
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
tarek990 posted this at 21:52 — 24th April 2004.
They have: 5 posts
Joined: Apr 2004
thanks for the reply..
the problem is that i cant by anyway change the user regstration mode.. coz there are many features that do depend on that..
any other suggestions??
thanks
Tarek
Suzanne posted this at 21:58 — 24th April 2004.
She has: 5,507 posts
Joined: Feb 2000
Reverse it -- use the user registration from the forums, shopping cart, image galleries and combine them into a single registration.
tarek990 posted this at 22:23 — 24th April 2004.
They have: 5 posts
Joined: Apr 2004
thanks again for the reply..
but as i said earlier.. i can not by any means change the registration mode.. many features (user profiles.. ofline messaging.. chat auth) depend on that..
any idea of how to import .dat databases to mysql??
thanks
tarek
Suzanne posted this at 23:16 — 24th April 2004.
She has: 5,507 posts
Joined: Feb 2000
save it as a delimited file and upload it
the problem is all these other authorization systems may need different things -- or may have other security features. without knowing more we're all just pissing in the wind trying to help you.
Mark Hensler posted this at 04:36 — 25th April 2004.
He has: 4,048 posts
Joined: Aug 2000
This problem started the moment you decided (or were compelled) to run a system with multiple authentication systems (flat-file and mysql). IMO, you must choose one and convert the other. Maintaining two data storage systems can create problems.
Twice, you've said that the signup cannot be changed. Why?
I'm guessing you're using prefab (free or not) softwares (which obviously were not designed to work seemlessly) and do not want to modify them. Is this right?
If you want anyone to help with an import script, you'll need to give a sample of the .dat file and the mysql table structures.
Mark Hensler
If there is no answer on Google, then there is no question.
m3rajk posted this at 05:09 — 25th April 2004.
They have: 461 posts
Joined: Jul 2003
also state if you have a dos, mac pre-osx, or posix based os that your server is running (windows == dos; solaris, red hat, debian, mandrake, irix, etc=posix)
i'd need to set the perl script a bit different depending on the os, but once i know the main table and child table structures and dat file structure i can design a perl script to make a sql import file. (similar to a mysql dump file)
if you just dont want to migrate to a sql based instead of flat file or are unsure of how to make the tables, let us know what is being put into the dat (ie: structure) and we can help you make a db that would work.
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
tarek990 posted this at 13:28 — 25th April 2004.
They have: 5 posts
Joined: Apr 2004
yes i am using a premade cgi application (where the signup happens into .dat) and premade php scripts (where the mysql is located)..
Apache version 1.3.29 (Unix)
MySQL version 4.0.18-standard
PHP version 4.3.4
PHP info Click to view
PERL version 5.8.1
Operating system Linux
is that it?
an idea just occured to me.. would it be possible to create a perl script that ads the same sign up to the dat file AND to all the mysqls required?
thanks
Tarek
m3rajk posted this at 13:59 — 25th April 2004.
They have: 461 posts
Joined: Jul 2003
i need the structure of the table(s) in sql and the dat file to help you with a perl script that will make the dat files into a sql dump looking file.
do you have php experience? sql experience?
if not, maybe now would be the time to learn them. we'll definitely help you on that, and if it's all pre-made, then if the dat file directory isn't set right, there'd be more security inherint in converting it all to php/sql anyway.
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
tarek990 posted this at 14:38 — 25th April 2004.
They have: 5 posts
Joined: Apr 2004
well i dont have any php or sql exprience.. id like to learn them but can u give me where would be a good place to start?
how can i get whats the structure of the sql table?
thanks
Tarek
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.