coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: bewbs on September 09, 2004, 09:59:47 PM

Title: A bit confused
Post by: bewbs on September 09, 2004, 09:59:47 PM
Hi there,

I recently switched hosts, and I made a dump of mysql and downloaded all my files via FTP from my old host. I just got done uploading my FTP files, CHMODed all the necessary files, and I'm stuck on what I should do with the mysql dump.

Could someone supply a step-by-step process on what I should do in MyPHPAdmin to restore the database & such? It would be greatly appreciated.

Thank you.
Title: Re: A bit confused
Post by: kegobeer on September 10, 2004, 02:28:28 AM
Create a new MySQL database with the same name as your old db.  If your username and password isn't the same as before, create a new user with all permissions with the name/password as your old db.  Then import your dump.
Title: Re: A bit confused
Post by: bewbs on September 11, 2004, 08:36:10 PM
Thanks.

I made the database w/ the same username & password, then I went to MyPHPAdmin > SQL, and uploaded my dump.

I received this error:

Error

SQL-query :

--
--

MySQL said:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '--' at line 2


Then when I go to my website, I receive this error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/htk/public_html/include/functions.inc.php on line 99

My website is here: http://hyung-taekim.org/index.php.

Any help would be great, and I don't mind giving out the username/password for further help, if necessary.

Thank you.
Title: Re: A bit confused
Post by: Joachim Müller on September 11, 2004, 08:50:24 PM
Quote from: bewbs on September 11, 2004, 08:36:10 PM
MySQL said:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '--' at line 2[/b]
Post line 2 (or a bit more - the lines around line2.

Joachim
Title: Re: A bit confused
Post by: bewbs on September 11, 2004, 11:35:53 PM
I'm not sure what it means by 'manual' or where to look - all I have is this attachment.
Title: Re: A bit confused
Post by: kegobeer on September 11, 2004, 11:39:20 PM
If you are using phpmyadmin to repopulate your database, you need to unzip that file, and then use phpmyadmin to import the .sql file.
Title: Re: A bit confused
Post by: bewbs on September 12, 2004, 12:26:57 AM
Thanks!

Unfortunatly, I'm still receiving the parse error. Any advice?
Title: Re: A bit confused
Post by: Nibbler on September 12, 2004, 12:33:52 AM
Delete and re-upload your functions.inc.php file
Title: Re: A bit confused
Post by: bewbs on September 12, 2004, 01:14:32 AM
No prevail.  :-[
Title: Re: A bit confused
Post by: kegobeer on September 12, 2004, 01:32:43 AM
T_CONSTANT_ENCAPSED_STRING is called a parser token, and means any string enclosed in double or single quotes.  Most probably you have a single or double quote in one of your table's fields that's causing this problem.

Use phpmyadmin to look thru your tables - look for any single or double quotes in the filename, title, keywords, etc, fields, and then remove them.  Matter of fact, you should compare your db dump with what is now in your db to see if there's anything missing or possibly corrupted.