Support ⇒ Explain Please :: Archives ⇒ Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexExplain Please

Archived ⇒ Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies


I would like to know what the difference is between the old DF 9.0 and the versions above 9.0.2 handling the cookies. I ask this because when i do a complete clean install of a version above 9.0.2 i´m getting the allknown error

ERROR: 'Please enable cookies to post on this site. If you feel that you have reached this message in error please refresh the preceding page once and post again'

Removing the newer version and do a complete clean install of 9.0 doesnt give me the error.

I have checked the session.save_path in my php.ini and its set to /tmp so that shouldnt be a problem. Anyway i´m currious why a i´m getting the error as of version 9.0.2. and not below!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1


You have a url ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


DJMaze wrote
You have a url ?



Did a clean install of DF 9.0.3 on one of my domains www.blauwroodlaan.nl/

and guess?!?! I got the problem! Let me know if you need anything else.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1


Your header is correct
HTTP/1.1 200 OK Date: Sat, 09 Apr 2005 15:33:46 GMT Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d PHP/4.3.10 mod_perl/1.29 FrontPage/5.0.2.2510 X-Powered-By: Dragonfly CMS using PHP engine Set-Cookie: PHPSESSID=c1dd11575f6d764d7f3fcf0c5ce11fa5; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: cms_admin=deleted; expires=Fri, 09-Apr-2004 15:33:45 GMT; path=/; domain=www.blauwroodlaan.nl Content-Encoding: gzip Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=utf-8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

So try the session test:
<?php
session_start();
session_register('installtest');
if (!isset($_SESSION['installtest'])) $_SESSION['installtest'] = 0;
$_SESSION['installtest']++;
echo 'This page is accessed: '.$_SESSION['installtest'].' time(s)';

Reload this test script as many times as you need and see if the number increases Wink

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


No problems with the session test.

Tested it 30 times

Try it yourself: www.blauwroodlaan.nl/session.php

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1


Hmm i see a problem it says
Set-Cookie: PHPSESSID=c1dd11575f6d764d7f3fcf0c5ce11fa5; path=/

'PHPSESSID' should be 'CMSSESSID'

Try a slight modified version of that script:
<?php
error_reporting(E_ALL);
session_name('CMSSESSID');
session_start();
session_register('installtest');
if (!isset($_SESSION['installtest'])) $_SESSION['installtest'] = 0;
$_SESSION['installtest']++;
echo 'This page is accessed: '.$_SESSION['installtest'].' time(s)';

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Counter runs, but i get this message

Notice: A session had already been started - ignoring session_start() in /home/blauwrood/domains/blauwroodlaan.nl/public_html/session.php on line 4 This page is accessed: 8 time(s)

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1


There we go, just what i thought.
Somehow the server admin has setup PHP to already start a session, this is a most unusual behavior.

open config.php and add 2 new lines at bottom (above the ?> if that exists)

session_destroy();
session_write_close();


You could also contact your host and ask them why they've setup the following in php.ini:
session.auto_start = 1

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


That did the trick. Thanks DJMaze!!!

I will contact my hosting company and ask them why they want to hava auto start.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD/Apache/1.3.33/MySQL 4.0.24/PHP 5.0.4/CPGNuke 9.0.6.1


I've added a fix for this odd behaviour in our session class.
If you use 9.0.3 you can download the patched file
cpgnuke.com/cvs/html/i...ession.php (revision 9.10)

Then you don't have to have your special config.php

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

All times are UTC