...

View Full Version : Header Error



jaywhy13
01-05-2005, 08:14 AM
If someone can tell me where I went wrong I'd appreciate it!

My error:
Response object error 'ASP 0156 : 80004005'

Header Error

/douploadpic.asp, line 19

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.


And my code:
<html>
<head>
<title>Uploding...</title>




</head>

<%
Set Upload=Server.CreateObject("Persits.Upload.1")
Count = Upload.SaveVirtual ("/uploads")

for each file in Upload.Files
thePath=thePath & file.Path
next

redirectPath="m.1apshost.com/thegroupgenesis/editprofile.asp?newpic=" & thePath

response.redirect(redirectPath)
%>


<body>



</body>
</html>

Roelf
01-05-2005, 09:00 AM
you are redirecting after writing some page-content to the browser. Try doing your asp stuff first in your page, or try Response.Buffer=True in your page:
top of page:
<% Response.Buffer = True %>

jaywhy13
01-05-2005, 03:06 PM
Thanks for your help thus far, but.... :confused: :confused:

Okay, when the asp stuff is first on the page, the browser spits this error:
HTTP Error 404
404 Not Found

The Web server cannot find the file or script you asked for. Please check the URL to ensure that the path is correct.

Please contact the server's administrator if this problem persists.

And the corresponding code:
<%Response.Buffer=True
Set Upload=Server.CreateObject("Persits.Upload.1")
Count = Upload.SaveVirtual ("/uploads")

for each file in Upload.Files
thePath=thePath & file.Path
next

redirectPath="m.1apshost.com/thegroupgenesis/editprofile.asp?newpic=" & thePath

response.redirect(redirectPath)
%>
<html>
<head>


<title>Uploding...</title>

</head>

<body>

</body>
</html>



And If I try putting it after HTML:
I get back the error I had previously

Roelf
01-05-2005, 03:12 PM
try to response.write the redirectpath to see if that delivers a valid url

jaywhy13
01-05-2005, 04:08 PM
it spits this:
m.1apshost.com/thegroupgenesis/editprofile.asp?newpic=I:\scroft\thegroupgenesis\uploads\me bored.jpg

is there a way i could just get the filename, not the file path?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum