old_apache 15 Junior Poster in Training

hi guys

i just found wierd thing, my cookies work in local(Windows) but, after i pushed to server (Ubuntu), the cookies null (empty).
this the code to set cookies:

set: function(name, value, duration, domain, path, secure) {
    name = this.prefix + name;
    if (duration == null) duration = this.duration;
    if (secure == null) secure = this.secure;
    if ((domain == null) && this.domain) domain = this.domain;
    if ((path == null) && this.path) path = this.path;
    secure = secure ? true : false;

    var date = new Date();
    date.setTime(date.getTime() + (duration * 86400000));
    var expires = date.toGMTString();

    var str = name + '=' + value + '; expires=' + expires;
    if (domain != null) str += '; domain=' + domain;
    if (path != null) str += '; path=' + path;
    if (secure) str += '; secure';

    return (document.cookie = str) ? true : false;
}

any idea why?
note: this is kcfinder

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.