| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
FrontRunner Nice poster


Offline Joined: Feb 27, 2005 Posts: 62 Location: Netherlands
|
Posted: Sat Apr 09, 2005 2:39 pm Post subject: 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
| Code:: |
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!
_________________

FrontRunner'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
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Apr 09, 2005 3:03 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies |
|
You have a url ?
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
FrontRunner Nice poster


Offline Joined: Feb 27, 2005 Posts: 62 Location: Netherlands
|
Posted: Sat Apr 09, 2005 3:26 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling coo |
|
| 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.
_________________

FrontRunner'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
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Apr 09, 2005 3:37 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies |
|
Your header is correct
| Code:: |
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: |
<?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
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
FrontRunner Nice poster


Offline Joined: Feb 27, 2005 Posts: 62 Location: Netherlands
|
Posted: Sat Apr 09, 2005 6:17 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling coo |
|
No problems with the session test.
Tested it 30 times
Try it yourself: www.blauwroodlaan.nl/session.php
_________________

FrontRunner'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
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sat Apr 09, 2005 8:08 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies |
|
Hmm i see a problem it says
| Code:: |
Set-Cookie: PHPSESSID=c1dd11575f6d764d7f3fcf0c5ce11fa5; path=/ |
'PHPSESSID' should be 'CMSSESSID'
Try a slight modified version of that script:
| PHP: |
<?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)';
|
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
FrontRunner Nice poster


Offline Joined: Feb 27, 2005 Posts: 62 Location: Netherlands
|
Posted: Sun Apr 10, 2005 7:01 am Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling coo |
|
Counter runs, but i get this message
| Code:: |
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) |
_________________

FrontRunner'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
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sun Apr 10, 2005 2:44 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies |
|
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)
| PHP: |
session_destroy(); session_write_close();
|
You could also contact your host and ask them why they've setup the following in php.ini:
| Code:: |
session.auto_start = 1 |
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
FrontRunner Nice poster


Offline Joined: Feb 27, 2005 Posts: 62 Location: Netherlands
|
Posted: Sun Apr 10, 2005 8:26 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling coo |
|
That did the trick. Thanks DJMaze!!!
I will contact my hosting company and ask them why they want to hava auto start.
_________________

FrontRunner'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
|
|
| Back to top |
|
 |
DJ Maze Developer


Offline Joined: Apr 19, 2004 Posts: 5683 Location: http://tinyurl.com/5z8dmv
|
Posted: Sun Apr 10, 2005 8:35 pm Post subject: Re: Difference between DF 9.0 and 9.0.2 - 9.0.3 handling cookies |
|
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
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
|
|
| Back to top |
|
 |
|
|