Newbie: Integrate in CMS...
Posted by lindstrom
|
Re: Newbie: Integrate in CMS... December 20, 2006 02:24AM |
Registered: 18 years ago Posts: 16 |
After several test I know the problem: Cookies. The error is caused by trying setting a cookie. If I deactivate cookies the problem in login.php is vanished - just in common.php (if I reply a threat) the problem is still there.
Is it possible to deactivate all cookie settings?
P.S. The support team of my cms thinks that is not a cms problem but a Phorum problem and the problem occurs in my cms only because of the high safety settings which my server doesn´t has.
Is it possible to deactivate all cookie settings?
P.S. The support team of my cms thinks that is not a cms problem but a Phorum problem and the problem occurs in my cms only because of the high safety settings which my server doesn´t has.
|
Re: Newbie: Integrate in CMS... December 20, 2006 01:33PM |
Registered: 24 years ago Posts: 1,076 |
Well of course if you (phorum) tries to set a cookie after output has already been sent to browser by your cms template it does not work.
The solution would be ob_start as Thomas mentioned. You have to call it in your cms before any output.
[ch2.php.net]
---
-=[ Panu ]=-
The solution would be ob_start as Thomas mentioned. You have to call it in your cms before any output.
[ch2.php.net]
---
-=[ Panu ]=-
|
January 02, 2007 09:39AM |
Admin Registered: 21 years ago Posts: 8,532 |
The ob_start function will keep PHP from outputting data right away to the browser. Instead, the data will be gathered in a buffer and will sent it only after your PHP scripts have fully finished. That way, you can still send cookies to the browser, even if there was other code that normally would have sent data to the browser already. My guess is that your CMS is sending the page header to the browser, before including the Phorum code. Therefore, Phorum cannot set a cookie anymore. So using the ob_start function will fix this.
What needs to be done, is to put a call to the ob_start function at an early stage in the CMS software, before anything is sent to the browser. Since we do not know the CMS, we cannot advice in where to put this. This is something that the developers of your CMS must be able to tell you. We can tell you how this would look. The PHP script would get this code at the very start:
Note:
This is not a Phorum problem, nor a CMS problem. It's merely a problem of integrating two totally different software packages, which both have their own fully valid implementations. It's never an easy job, since it almost always turns out that you have to find some work arounds to make both packages to behave nicely. The CMS guys apparently did not understand this, since they are pointing at Phorum. Also, the error you get has nothing to do with strict safety settings, but only with the way HTTP (the protocol that browsers use to retrieve web pages) was designed.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
What needs to be done, is to put a call to the ob_start function at an early stage in the CMS software, before anything is sent to the browser. Since we do not know the CMS, we cannot advice in where to put this. This is something that the developers of your CMS must be able to tell you. We can tell you how this would look. The PHP script would get this code at the very start:
<?php ob_start() ?>If you have something like a settings.php or common.php, you could try putting this code in that file. Files with those names are normally read before doing any output.
Note:
This is not a Phorum problem, nor a CMS problem. It's merely a problem of integrating two totally different software packages, which both have their own fully valid implementations. It's never an easy job, since it almost always turns out that you have to find some work arounds to make both packages to behave nicely. The CMS guys apparently did not understand this, since they are pointing at Phorum. Also, the error you get has nothing to do with strict safety settings, but only with the way HTTP (the protocol that browsers use to retrieve web pages) was designed.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Newbie: Integrate in CMS... January 02, 2007 10:04AM |
Registered: 18 years ago Posts: 16 |
Thank you. I understand the problem. Meanwhile I asked the author of my cms how to include the ob_start command and they answered that is impossible to use this command. Unfortunately now I have to change the templates of Phorum because it is not possible to include it in my cms without problems. So I will clode this threat with a tip:
You can´t include Phorum in the cms "webEdition". It´s a great cms but it doenn´t work with Phorum...
Thanks for all comments here.
You can´t include Phorum in the cms "webEdition". It´s a great cms but it doenn´t work with Phorum...
Thanks for all comments here.
|
Re: Newbie: Integrate in CMS... January 02, 2007 11:48AM |
Registered: 24 years ago Posts: 1,076 |
|
Re: Newbie: Integrate in CMS... January 02, 2007 12:03PM |
Registered: 18 years ago Posts: 16 |
|
January 02, 2007 06:39PM |
Admin Registered: 21 years ago Posts: 8,532 |
Pffr... those CMS guys tell some really funny stuff... I see no reason why output buffering would be impossible for any system. It doesn't interfere with the scripts at all. Maybe the CMS is using ob_start() internally to do some work in buffered mode. There are still a lot of programmers that think that you can only use ob_start() once, but it really can be used multiple times and even nested without problems.
It looks like it's a commercial product. I tried to do a quick download to see what files were in the CMS tree. Can you provide me in some way with the CMS' files, so I can take a quick peek at possible entry points for the ob_start() call? I'm sure we can work this thing out, despite anything the CMS guys might tell you.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
It looks like it's a commercial product. I tried to do a quick download to see what files were in the CMS tree. Can you provide me in some way with the CMS' files, so I can take a quick peek at possible entry points for the ob_start() call? I'm sure we can work this thing out, despite anything the CMS guys might tell you.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Newbie: Integrate in CMS... January 03, 2007 04:26AM |
Registered: 18 years ago Posts: 16 |
Hi,
Yes, it´s commercial. You can download a free trial at: [www.living-e.com]
So you can check the whole system. It´s a really nice cms but commercial system have always several handycaps.
P.S. I use version 3, but most files are equal to version 4.
Edited 1 time(s). Last edit at 01/03/2007 04:29AM by lindstrom.
Yes, it´s commercial. You can download a free trial at: [www.living-e.com]
So you can check the whole system. It´s a really nice cms but commercial system have always several handycaps.
P.S. I use version 3, but most files are equal to version 4.
Edited 1 time(s). Last edit at 01/03/2007 04:29AM by lindstrom.
Sorry, only registered users may post in this forum.
