Forums
This topic is locked
Problems with SSI
Posted 25 Jul 2001 12:11:56
1
has voted
25 Jul 2001 12:11:56 rubs eguan posted:
Hi all, I'm in troubles with SSI... I've got a simple page with a include, the both are .asp and have an insert behaviour inside. I have already renamed all the variables within the include file to abort any duplication error, but when I submit the form that is into the include file, the insertion is correctly made but this error is displayed:object Response error 'ASP 0156 : 80004005'
Header Error
/inc_rate.asp, line 107
HTTP header are already written in the client explorer.
Any change at the HTTP header must be done after writting the page
content.
(the line number belongs at the redirection of the insert behaviour (MM_Redirecturl)).
Can somebody help me...
Thank you in advance.
Replies
Replied 25 Jul 2001 14:47:15
25 Jul 2001 14:47:15 Bruno Mairlot replied:
I don't know if already knows what I'll write, but it might help you a bit...
The error mean that you're (or your code) trying to redefine the HTTP headers after you have already written something in the body of the request.
Try to find in your code where you're modifiying the header, then check to be absolutely sure that there is nothing printed before.
Usually headers are managed by the server (IIS, Apache,...) and when the first character of the page is written in the server buffer, then the headers are already sent to the client browser.
I had the same problem once, and it was because my tags began after a newline. So be sure that there is absolutely no character sended to the server buffer before you're trying to modify the headers.
I don't know if that works in ASP, but you may search for this feature : In php it is possible to block everything being sended to the client browser until you release the buffer manually. This way you can modify headers whenever you want.
Don't know if it helps.
The error mean that you're (or your code) trying to redefine the HTTP headers after you have already written something in the body of the request.
Try to find in your code where you're modifiying the header, then check to be absolutely sure that there is nothing printed before.
Usually headers are managed by the server (IIS, Apache,...) and when the first character of the page is written in the server buffer, then the headers are already sent to the client browser.
I had the same problem once, and it was because my tags began after a newline. So be sure that there is absolutely no character sended to the server buffer before you're trying to modify the headers.
I don't know if that works in ASP, but you may search for this feature : In php it is possible to block everything being sended to the client browser until you release the buffer manually. This way you can modify headers whenever you want.
Don't know if it helps.
Replied 25 Jul 2001 15:37:05
25 Jul 2001 15:37:05 Joel Martinez replied:
put this at the top of the page (under the language definition if it's there)
<%response.buffer=true%>
it will solve all this issue
Joel Martinez
----------
Is this thing on?....
<%response.buffer=true%>
it will solve all this issue
Joel Martinez
----------
Is this thing on?....
Replied 25 Jul 2001 18:07:50
25 Jul 2001 18:07:50 rubs eguan replied:
Hi joel, I've tryed with your idea but it didn't work. The line number of the error message has changed to de one that I put the <% Response.bufer=true %>. Anyway I'd like to thank you for your cooperation, anyfurther ideas will be welcome...
Replied 25 Jul 2001 18:58:36
25 Jul 2001 18:58:36 Joel Martinez replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote><% Response.bufer=true %><hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
hmm, that may be your problem... it's buffer, not bufer.
but that was probably a mistype in the forum... so if you're getting the same error, then there must be something being written to the stream before you put that.
make sure that the <%response.buffer=true%> is before any include files or anyting... the only thing that it can't be before is <% @language="VBScript" %>
also, make sure that "<%response.buffer=true%>" is not inside other ASP tags...
if you're still getting an error, post the error, the line number, and the surrounding code to that line...
Joel Martinez
----------
Is this thing on?....
hmm, that may be your problem... it's buffer, not bufer.
but that was probably a mistype in the forum... so if you're getting the same error, then there must be something being written to the stream before you put that.
make sure that the <%response.buffer=true%> is before any include files or anyting... the only thing that it can't be before is <% @language="VBScript" %>
also, make sure that "<%response.buffer=true%>" is not inside other ASP tags...
if you're still getting an error, post the error, the line number, and the surrounding code to that line...
Joel Martinez
----------
Is this thing on?....
Replied 26 Jul 2001 11:49:08
26 Jul 2001 11:49:08 rubs eguan replied:
Hi Joel,
As you told in your last reply, the "bufer" was correct in the source page code, this was a mistype of mine. Below is the surrounding code of my page...
(Note the "MM_" variables have been changed in order to work properly within the main page).
Edited by - rubs on 07/26/2001 12:05:08
Edited by - rubs on 07/26/2001 12:05:41
As you told in your last reply, the "bufer" was correct in the source page code, this was a mistype of mine. Below is the surrounding code of my page...
(Note the "MM_" variables have been changed in order to work properly within the main page).
Edited by - rubs on 07/26/2001 12:05:08
Edited by - rubs on 07/26/2001 12:05:41
Replied 26 Jul 2001 11:51:38
26 Jul 2001 11:51:38 rubs eguan replied:
<%Response.buffer=true %>
<!--#include file="../../Connections/SAP4allConexion.asp" -->
<%
' *** Edit Operations: declare variables
MM_editAction1 = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction1 = MM_editAction1 & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit1 = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Edit Operations: declare variables
MM_editAction1 = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction1 = MM_editAction1 & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit1 = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert1") <> "" Then
MM_editConnection1 = MM_SAP4allConexion_STRING
MM_editTable1 = "RATES"
MM_editRedirectUrl1 = "/MySap4all/Consultoria/MySap4all_.asp"
MM_fields1Str1 = "A_ID|value|radiobutton|value"
MM_columns1Str1 = "A_ID|none,none,NULL|R_RATE|none,none,NULL"
' create the MM_fields1 and MM_columns1 arrays
MM_fields1 = Split(MM_fields1Str1, "|"
MM_columns1 = Split(MM_columns1Str1, "|"
<!--#include file="../../Connections/SAP4allConexion.asp" -->
<%
' *** Edit Operations: declare variables
MM_editAction1 = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction1 = MM_editAction1 & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit1 = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Edit Operations: declare variables
MM_editAction1 = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction1 = MM_editAction1 & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit1 = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert1") <> "" Then
MM_editConnection1 = MM_SAP4allConexion_STRING
MM_editTable1 = "RATES"
MM_editRedirectUrl1 = "/MySap4all/Consultoria/MySap4all_.asp"
MM_fields1Str1 = "A_ID|value|radiobutton|value"
MM_columns1Str1 = "A_ID|none,none,NULL|R_RATE|none,none,NULL"
' create the MM_fields1 and MM_columns1 arrays
MM_fields1 = Split(MM_fields1Str1, "|"
MM_columns1 = Split(MM_columns1Str1, "|"
Replied 26 Jul 2001 17:33:48
26 Jul 2001 17:33:48 Joel Martinez replied:
yes, but what is the error line...
I need to see exactly what code is throwing the error, and where it stands in comparison the buffer=true.
all that code looks fine to me, so it must be something in the include file...
Joel Martinez
----------
Is this thing on?....
I need to see exactly what code is throwing the error, and where it stands in comparison the buffer=true.
all that code looks fine to me, so it must be something in the include file...
Joel Martinez
----------
Is this thing on?....
Replied 26 Jul 2001 21:42:44
26 Jul 2001 21:42:44 rubs eguan replied:
Hi, well the if I put the response.buffer on the first line, the error is in the line 1... if I put it in the second line, under the include conn. line, the line number is 2.. . so before I was putting the resp.buffer, the error was in the 107 line... this line is where the insert behaviour is making the redirection after inserting. (MM_EditRedirecturl... or something like that).
I could send you the whole include page to watch this If you want to...
I could send you the whole include page to watch this If you want to...
Replied 27 Jul 2001 15:14:55
27 Jul 2001 15:14:55 Joel Martinez replied:
yes, email me the main page, and the include file... I'll see what I can find
Joel Martinez
----------
Is this thing on?....
Joel Martinez
----------
Is this thing on?....