Posted by Marcus XX
on 22.03.2006 06:28
Attachment: sessionhandling.txt
Further to Richards suggestion of an Examples forum:

Can I also suggest that we need a way to post XML markup in our 
examples. I have been trying to post a solution to one of my own topics 
but kept getting a "Precondition Failed" error. I am pretty sure it was 
because I had :
[ajax-response]
  [response]
  [/response]
[/ajax-response]

...obviously using < and > instead of [ and ]

Details of the scenario:
-I was logged in to the forums
-went to my earlier post and tried to reply - 
http://forum.openrico.org/topic/133?reply_to=384#postform
-see the sessionhandling.txt file that is attached to see the text I was 
trying to post
-repeatedly received the following response after clicking Submit:
URL: http://forum.openrico.org/topic/133#postform
TITLE: 412 Precondition Failed
BODY:
"Precondition Failed

The precondition on the request for the URL /topic/133 evaluated to 
false."
Posted by Richard Cowin
on 22.03.2006 13:18
I will look into this issue:

btw, I am testing your post by including your attachment.



1 - Your normal web page starts a session as per normal using 
session_start()

Then in the server side script (getRecordCount.php) of the AJAX 
request...
...ajaxEngine.registerRequest( 'getRecordCount', 'getRecordCount.php' );
Do the following:

2 - ob_start(); //must be before your session_start(). Make it the very 
1st thing you do

3 - then do whatever it is you need to do which requires $_SESSION 
varaibles. For example, I do database queries which require a userid 
from my $_SESSION and build the XML to be returned.

4 - ob_end_clean(); //this gets rid of any output already generated, 
especially the headers sent by the session_start()

5 - then do the actualy XML output. Eg,
...
testing with extra text instead of the xml]
    this is a test and it should be ignored. Making sure it is an issue 
with the xml....
       if it is an issue with the xml, this reply should not work.
    I have already got the precondition failed notice.  So, we will see 
if this works now
I do not think it is an issue with the size of the posting, so we will 
see.


Marcus XX wrote:
> Further to Richards suggestion of an Examples forum:
> 
> Can I also suggest that we need a way to post XML markup in our 
> examples. I have been trying to post a solution to one of my own topics 
> but kept getting a "Precondition Failed" error. I am pretty sure it was 
> because I had :
> [ajax-response]
>   [response]
>   [/response]
> [/ajax-response]
> 
> ...obviously using < and > instead of [ and ]
> 
> Details of the scenario:
> -I was logged in to the forums
> -went to my earlier post and tried to reply - 
> http://forum.openrico.org/topic/133?reply_to=384#postform
> -see the sessionhandling.txt file that is attached to see the text I was 
> trying to post
> -repeatedly received the following response after clicking Submit:
> URL: http://forum.openrico.org/topic/133#postform
> TITLE: 412 Precondition Failed
> BODY:
> "Precondition Failed
> 
> The precondition on the request for the URL /topic/133 evaluated to 
> false."
Posted by Richard Cowin
on 22.03.2006 13:24
I could not get the xml to post either.
I will go look at the forum software and see if I can resolve.
<p>Should not be a difficult thing.</p>



Richard Cowin wrote:
> I will look into this issue:
> 
> btw, I am testing your post by including your attachment.
> 
> 
> 
> 1 - Your normal web page starts a session as per normal using 
> session_start()
> 
> Then in the server side script (getRecordCount.php) of the AJAX 
> request...
> ...ajaxEngine.registerRequest( 'getRecordCount', 'getRecordCount.php' );
> Do the following:
> 
> 2 - ob_start(); //must be before your session_start(). Make it the very 
> 1st thing you do
> 
> 3 - then do whatever it is you need to do which requires $_SESSION 
> varaibles. For example, I do database queries which require a userid 
> from my $_SESSION and build the XML to be returned.
> 
> 4 - ob_end_clean(); //this gets rid of any output already generated, 
> especially the headers sent by the session_start()
> 
> 5 - then do the actualy XML output. Eg,
> ...
> testing with extra text instead of the xml]
>     this is a test and it should be ignored. Making sure it is an issue 
> with the xml....
>        if it is an issue with the xml, this reply should not work.
>     I have already got the precondition failed notice.  So, we will see 
> if this works now
> I do not think it is an issue with the size of the posting, so we will 
> see.
> 
Posted by Richard Cowin
on 22.03.2006 13:26
testing...  another test without calls
<ajax-response>
  <response type="object" id="totalRowsUpdater">

  </response>
</ajax-response>


Richard Cowin wrote:
> I could not get the xml to post either.
> I will go look at the forum software and see if I can resolve.
> <p>Should not be a difficult thing.</p>
> 
> 
> 
> Richard Cowin wrote:
>> I will look into this issue:
>> 
>> btw, I am testing your post by including your attachment.
>> 
>> 
>> 
>> 1 - Your normal web page starts a session as per normal using 
>> session_start()
>> 
>> Then in the server side script (getRecordCount.php) of the AJAX 
>> request...
>> ...ajaxEngine.registerRequest( 'getRecordCount', 'getRecordCount.php' );
>> Do the following:
>> 
>> 2 - ob_start(); //must be before your session_start(). Make it the very 
>> 1st thing you do
>> 
>> 3 - then do whatever it is you need to do which requires $_SESSION 
>> varaibles. For example, I do database queries which require a userid 
>> from my $_SESSION and build the XML to be returned.
>> 
>> 4 - ob_end_clean(); //this gets rid of any output already generated, 
>> especially the headers sent by the session_start()
>> 
>> 5 - then do the actualy XML output. Eg,
>> ...
>> testing with extra text instead of the xml]
>>     this is a test and it should be ignored. Making sure it is an issue 
>> with the xml....
>>        if it is an issue with the xml, this reply should not work.
>>     I have already got the precondition failed notice.  So, we will see 
>> if this works now
>> I do not think it is an issue with the size of the posting, so we will 
>> see.
>> 
Posted by Richard Cowin
on 23.03.2006 04:55
I am still trying to track this issue down.
We are using RForum software  for this forum.  There has been a bug
posted in the RForum forum on this issue.

I will try to get resolved.







Richard Cowin wrote:
> testing...  another test without calls
> <ajax-response>
>   <response type="object" id="totalRowsUpdater">
> 
>   </response>
> </ajax-response>
> 
> 
> Richard Cowin wrote:
>> I could not get the xml to post either.
>> I will go look at the forum software and see if I can resolve.
>> <p>Should not be a difficult thing.</p>
>> 
>> 
>> 
>> Richard Cowin wrote:
>>> I will look into this issue:
>>> 
>>> btw, I am testing your post by including your attachment.
>>> 
>>> 
>>> 
>>> 1 - Your normal web page starts a session as per normal using 
>>> session_start()
>>> 
>>> Then in the server side script (getRecordCount.php) of the AJAX 
>>> request...
>>> ...ajaxEngine.registerRequest( 'getRecordCount', 'getRecordCount.php' );
>>> Do the following:
>>> 
>>> 2 - ob_start(); //must be before your session_start(). Make it the very 
>>> 1st thing you do
>>> 
>>> 3 - then do whatever it is you need to do which requires $_SESSION 
>>> varaibles. For example, I do database queries which require a userid 
>>> from my $_SESSION and build the XML to be returned.
>>> 
>>> 4 - ob_end_clean(); //this gets rid of any output already generated, 
>>> especially the headers sent by the session_start()
>>> 
>>> 5 - then do the actualy XML output. Eg,
>>> ...
>>> testing with extra text instead of the xml]
>>>     this is a test and it should be ignored. Making sure it is an issue 
>>> with the xml....
>>>        if it is an issue with the xml, this reply should not work.
>>>     I have already got the precondition failed notice.  So, we will see 
>>> if this works now
>>> I do not think it is an issue with the size of the posting, so we will 
>>> see.
>>>