Page 1 of 1

Cookie problem

Posted: Thu Jun 22, 2006 4:04 pm
by nils
Hi,
after successful installation of v3.79b (PHP5, MySQL5), I face a problem that really drives me mad: :shock:

On login, I get the "Cookies required" message - the browser (IE6, Firefox9 are set to "accept all cookies), and playing with the register_globals setting in the PHP.ini doesn't help either.

Any idea?

Thanks,
Nils

Posted: Thu Jun 22, 2006 5:07 pm
by wbartels
I never had any related problem with netjukebox.

This is how I have configured IE 6 cookies:
Tools > Internet Options… > Tab: Privacy > Advanced…
Image

What happens when you try to login on the demo site?
http://live.netjukebox.nl
Username: anonymous
Password: anonymous

Posted: Thu Jun 22, 2006 8:06 pm
by nils
Hi Willem,

I found it!

My MySQL database is started - by default - with the ANSI quotes setting = ON (in MySQL: SET GLOBAL SQL_MODE = "ansi";). I need ANSI by default in order to be able to run my picture DB properly (Thumbsplus).

As long as ANSI is ON, netjukebox will come with weird error messages (cookies not set, incremental updates not allowed, and some others).

When I change this setting to SET GLOBAL SQL_MODE = ''; (nothing), netjukebox works fine (by this way: it is a great program!) - at the latest when I stop and restart the DB. (And, needless to mention, my picture DB crashes ...)

Which now leads to the following question: Is it possible (in PHP) to check this MySQL parameter, switch it off, if set, and THEN run netjukebox?
Other possibility (more elegant): How to make netjukebox run even though this parameter is set?

Anyway: It took me one day to find out about this topic but I hope it helps you guys to improve your brilliant application.

Hope to hear more soon!

Greetings,
Nils

Posted: Mon Jul 24, 2006 12:12 am
by wbartels
nils wrote:Hi Willem,

I found it!

My MySQL database is started - by default - with the ANSI quotes setting = ON (in MySQL: SET GLOBAL SQL_MODE = "ansi";). I need ANSI by default in order to be able to run my picture DB properly (Thumbsplus).

As long as ANSI is ON, netjukebox will come with weird error messages (cookies not set, incremental updates not allowed, and some others).

When I change this setting to SET GLOBAL SQL_MODE = ''; (nothing), netjukebox works fine (by this way: it is a great program!) - at the latest when I stop and restart the DB. (And, needless to mention, my picture DB crashes ...)

Which now leads to the following question: Is it possible (in PHP) to check this MySQL parameter, switch it off, if set, and THEN run netjukebox?
Other possibility (more elegant): How to make netjukebox run even though this parameter is set?

Anyway: It took me one day to find out about this topic but I hope it helps you guys to improve your brilliant application.

Hope to hear more soon!

Greetings,
Nils
Maybe adding something like this:

Code: Select all

mysql_query('SET GLOBAL SQL_MODE = ""');
to the mysql.inc.php file will help.