Cookie problem

General discussion about netjukebox
Post Reply
nils
User
Posts: 4
Joined: Thu Jun 22, 2006 3:59 pm

Cookie problem

Post 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
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post 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
nils
User
Posts: 4
Joined: Thu Jun 22, 2006 3:59 pm

Post 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
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

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