Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: mysql syntax error  (Read 13881 times)

0 Members and 1 Guest are viewing this topic.

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql syntax error
« on: September 30, 2003, 06:07:44 am »

I get this error that I have been unable to deturmine why its happening. Probably something simple

mySQL Error: You have an error in your SQL syntax near '\'0\', description text NOT NULL, visibility int(11) NOT NULL default \'0\' at line 7

i believe its refering to the schema file??

any help would be greatly appreciated.
 :D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
mysql syntax error
« Reply #1 on: September 30, 2003, 07:24:20 am »

do you get this error on install? Check which version of mySQL you're running - it should be better than 3.23.23

GauGau
Logged

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql error on install
« Reply #2 on: September 30, 2003, 09:37:29 pm »

Yes it is happening on install.
The version of MSQL that is running is:
MySQL 3.23.52

if I take the code out of the files and run them in phpadmin, the folders are created.. but I am not sure how to set up the photo album the "hard" way.

Thoughts?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
mysql syntax error
« Reply #3 on: October 01, 2003, 06:34:30 am »

I seem to remember a problem like this on the old boards.  I want to say something you're entering into the setup form is causing this; perhaps a special character?  Something is causing php to escape a character, which is throwing the setup out of whack.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
mysql syntax error
« Reply #4 on: October 01, 2003, 08:28:07 am »

yes - no special characters like / \ ' " . (especially no dot!) - just [a-zA-Z0-9], if you can, also avoid - and _

GauGau
Logged

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql syntax error
« Reply #5 on: October 01, 2003, 08:56:12 am »

I think I know what is probably causing it.. but I am now in a delema..

mysql address involves "." and not just "localhost"
I can't connect to it without the dots..

can I just put \. ? like in php script to nullify it?

Not sure if there is anything I can really do in this case.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
mysql syntax error
« Reply #6 on: October 01, 2003, 09:07:59 am »

hehe, sorry if I confused you: if you have something like "mysql.mydomain.com" that goes into the field "MySQL Host" that's perfectly ok - in fact, all the data you have got from your webhost (hostname, dbname, username,password) are OK - if your webhost wants you to have special chars in it, then it should be special chars, but if you run your own server, make sure to not use special chars with anything related to mySQL. A common error is to have a dot in a db-name or table name - you shouldn't do this!

GauGau
Logged

etienne

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Etienne's Gallery
Same trouble here
« Reply #7 on: October 01, 2003, 02:56:01 pm »

Hey,

I'm getting exactly the same error here on php4.3.3, mysql 4.0.14.

I've run the schema.sql file from phpMyAdmin and it's OK.


magic_quote is set to ON at my hosting... can this be the source of the issue?
Logged

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql syntax error
« Reply #8 on: October 01, 2003, 03:39:37 pm »

Well, I'm stumped then... Can't seem to get rid of the error.

My server has magic quotes on as well.  The mysql is not hosted by me, so I can't really speak to how its set up.

I can even use just "mysql" in the host name.. but the error still appears.
Logged

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql syntax error
« Reply #9 on: October 02, 2003, 04:30:34 am »

hyperion.. as I said before the sql script runs fine withing phpadmin.. its only when I use the install script it does this strange error.

Are there any instructions as to how to configure manually?

Thanks
Logged

etienne

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Etienne's Gallery
set magic quote to off
« Reply #10 on: October 02, 2003, 09:03:22 am »

OK, this morning i've tested a quick modification of install.php.
Setting the magic quotes to off allowed me to successfuly run the install...

Just add:
set_magic_quotes_runtime(0);
after:
// --------------------------------- MAIN CODE ----------------------------- //


I've not tested the product yet. Maybe there will be the same modif to do somewhere else in the app code.
Logged

trixxie

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
mysql syntax error
« Reply #11 on: October 02, 2003, 10:06:49 am »

thank you thank you thank you :)
Worked like a charm. All is functioning wondefully.
:)
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
mysql syntax error
« Reply #12 on: October 02, 2003, 07:21:37 pm »

Congratulations, Etienne!

You have officially found a bug.  It seems the instructions to turn off magic quotes for file reading are included in the init.inc file, but it was never included in the install file, which means that if your server has the magic quotes runtime turned on by default, you get that error.  Interestingly enough, I've now learned there are two magic quotes settings.  Magic quotes gpc and magic quotes runtime.  Magic quotes gpc is turned on in PHP's default configuration, but runtime is normally turned off in the default configuration.  It would seem your hosts have activated this config setting.  I will get this fixed in time for the next release.

Thanks.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
mysql syntax error
« Reply #13 on: October 02, 2003, 08:23:30 pm »

@hyperion: will you take care of this (cvs)?

I'll put it into the faq for those who are running versions up to 1.1.1...

GauGau
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
mysql syntax error
« Reply #14 on: October 02, 2003, 08:41:29 pm »

GauGau,

I'm working on it right now. Setting up the CVS is taking some time.  :)

-Hyperion
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
mysql syntax error
« Reply #15 on: October 02, 2003, 09:12:53 pm »

The install.php file has been updated in the CVS.  :D
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 15 queries.