News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

mysql syntax error

Started by trixxie, September 30, 2003, 06:07:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

trixxie

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

Joachim Müller

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

GauGau

trixxie

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?

kegobeer

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.
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

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

GauGau

trixxie

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.

Joachim Müller

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

etienne

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?

trixxie

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.

trixxie

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

etienne

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.

trixxie

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

hyperion

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.
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Joachim Müller

@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

hyperion

GauGau,

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

-Hyperion
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

hyperion

The install.php file has been updated in the CVS.  :D
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)