Jump to content

Recommended Posts

Posted

Hi !

 

I recently got a script from a friend of mine which takes a particular data file , creates tables within a database and imports the data into the tables..

 

The problem is.. no matter how many times i try, the script refuses to load the data into the tables... Still it returns a message saying that the information was successfully uploaded :D

 

Are there special permissions required to be set to upload data into tables using a PHP script??.. Am i doing something wrong? Can i post the code from the script here ??... .Please help!!!

 

Thanks!

FoX

- Complete PHP Newbie

Posted

I'm gonna take two wild guesses here, based on a previous experience with an auto install for another application.

 

First, you must create the DB through Manage MySQL in the cPanel. Then you must create a DB User through that same interface, then you must assign that user to that db.

 

Second, the MySQL db's here are shared and therefore the following considerations should be made:

 

DB Name = will be prepended with your cpanel username. For example, if you create a database called mytest and your cpanel username is fox, then the resulting db will actually have a name of: fox_mytest

 

DB Username = Same thing applies here. If you create a DB User called testadmn, the resulting username is: fox_testadmn

 

DB Table names = Same principle, but with prepending DB name. If you create a table called table1, then the table's real name is mytest_table1

 

Hope this helps somewhat. If not, then please feel free to send me the code via email (attach it as a txt file).

 

Lianna

Posted

Hi Lianna,

 

Thank you so much for your reply.. I went back and checked the script ... The DBName, login name and pwd are all configured from a config file and checked out to be ok...

 

I have attached the import script in an email.. the problem is that the script is able to download the required file to my server, login to the database and create the tables... for some reason it just isn't able to process the file and import it into the tables... meanwhile, the same file is working fine for my friend!!

 

Any and all help is most appreciated!

 

Thanks!

FoX

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...