Web Hosting Talk







View Full Version : I dont know anything about programming, but can you help my friend?


lexington
12-18-2003, 01:07 AM
Hello, there is a script that someone is working on (please keep in mind I do not understand anything about this) Apparently if you try to copy and paste text into a certain field that will display the text you entered on a webpage, it results in errors on the script. The only way to not receive any errors is to type in the text manually. The author of this script is always blaming the server, apache for all of the problems, yet it is funny only his script causes these errors. Here is his response to a question concerning the copy and paste:

The problem with this issue is that it really is not my script - I have tested this extensively to see if there is a way around it, but the problem is occuring within apache, and not within my script. apache never "gives" the posted form data correctly to my script in the first place i.e. by the time PHP sees the $_REQUEST data, it is already corrupted (the $_REQUEST variable is a PHP associative array containing POSTed form data - some of the asocciative elements are actually deleted when the problem occurs). I guess it could be a bug in PHP - I'll check out the bug trakcer at php.net and see if I can see anything.

I really dont believe this, so could you ask me or give me suggestions on how to fix this so I can relay the information to him please? I know that you probably do not know what I am talking about, but he claims that "copy and pasting" text into the fields is what is causing the errors, and not his script. Thanks

hiryuu
12-18-2003, 03:05 AM
I haven't seen anything like that, but I usually use $_POST so I know a little more about how the data is coming in.

I find an input bug unlikely, but I don't know of any public scripts that use $_REQUEST, so bugs could linger there for longer. Have you tried this in other browsers? I've seen some IE quirks that defy explanation, and it has some juicy paste-related security for M$ to break.

lexington
12-18-2003, 04:23 AM
I believe the error is in all browsers.

Burhan
12-18-2003, 01:26 PM
I don't know of any bug in Apache that corrupts $_REQUEST. It would be huge, and already known if it existed.

lexington
12-18-2003, 02:33 PM
Thanks fyestrtr, I relayed your message to him, and he said this:

I already know what the bug is - IE does not handle "enctype=multipart/form-data" correctly (like Netscape does). The work around is to NOT use that in the HTML form tag, but then you can't do file uploads in the same form as text input.

I am looking into a long term solution, since the "enctype=multipart/form-data" was originally a Netscape proposed addition, I don't beleive MS has any interest in getting IE to work correctly with it.

Does anyone know the solution to this problem?

Burhan
12-18-2003, 06:06 PM
Err ... say what?

There was a bug in IE (iirc, only with Mac IE) with mutipart/form-data ... but there are workarounds for it. After all, Hotmail -- which runs best on IE, uses the same form encoding for its file upload function.

I don't know where "I don't believe MS has any interest in getting IE to work correctly with it" is coming from.

There are published workarounds for this bug.

lexington
12-18-2003, 06:18 PM
Here is his reply to your statement:

it affects more than Mac IE, although that is what got the most attention (pretty obvious since it is happening to us).

Let me see what Hotmail is doing, since I really want to keep the file-uploads and forms on the same page. The alternative would be to move the file-uploads (i.e. song files and image files) to a sperate upload form, but I'll only do that as a last resort.

maildanc
12-19-2003, 01:53 AM
I always use $HTTP_POST_VARS $_POST does not work in some PHP server.

kneuf
12-19-2003, 08:22 AM
What errors are you getting? And copy and pasting? Sounds never heard of that happening before. I've used the uploading script (the enctype part) many times, and I've copy and pasted many times to and this has never happenend to me. Is there an error or something in the script? I use IE 6.0.2800.xxxx. Interested to see how this plays out... Good luck.

Just my $0.5