|
From: | Kathleen Ferraro |
Subject: | Re: [Phptest-users] Re: add question issue |
Date: | Thu, 18 Jul 2002 15:26:28 -0400 |
Gladly, Brandon. Here are a couple of scenarios:1. Added the code you suggested and entered text without uploading an image; got this output:
Array ( [skill_level] => English [question] => What is my favorite color [answer] => Blue [alt_1] => Red [alt_2] => Yellow [alt_3] => Violet [additional_notes] => [required] => 1 [weight] => 1 [MAX_FILE_SIZE] => 1000000 [description] => [submit] => Submit! ) Array ( )
2. Removed the code and tried to load file without an image. Got error the error message
The following error(s) were encountered processing your submission: Unknown file upload error3. Reloaded page to enter text again. Noticed that when I reloaded the page (shift reload), the text I had entered cleared but the error message that had displayed was still there.
3. Quit and logged in again 4. Tried to enter text without image again and got:Array ( [skill_level] => English [question] => What time is it? [answer] => now [alt_1] => later [alt_2] => sooner [alt_3] => better [additional_notes] => [required] => 1 [weight] => 1 [MAX_FILE_SIZE] => 1000000 [description] => [submit] => Submit! ) Array ( )
5. Entered text with an image and got:Array ( [skill_level] => English [question] => What are you doing? [answer] => nothing [alt_1] => everything [alt_2] => something [alt_3] => don\'t know [additional_notes] => [required] => 1 [weight] => 1 [MAX_FILE_SIZE] => 1000000 [description] => [submit] => Submit! ) Array ( [image] => Array ( [name] => left_bg.gif [type] => image/gif [tmp_name] => /var/tmp/phpYKaanz [error] => 0 [size] => 2436 ) )
Let me know what you think. I am happy to do more testing. This is going to be a very useful program for me.
Best, Kathie On Wednesday, July 17, 2002, at 03:20 PM, dj resonance wrote:
Hi Kathy, If you wanted, we could troubleshoot the problem further. On the add_question.php page, try putting the following statements after the if (isset($HTTP_POST_VARS['submit'])) { statement: print_r($HTTP_POST_VARS) . "<br>"; print_r($HTTP_POST_FILES); die(); If you then run the page after submitting a question and view the source, you'll get a nice formatted view of everything the browser passed to the page, and you can paste that into an email so I can examine it. I suspect that it might be passing an unrecognized mime type or something that is causing phptest to barf. I've read the php docs regarding the HTTP_POST_FILES variable and apparently there are a few different ways that will specify whether a file was actually uploaded or not. I tested for two of them, but maybe there's a third lurking somewhere. I know at least with IE I experience an intermittent problem where the $submit variable will not get submitted to any of the add pages, so I'm unable to do any adding or editing. The same thing with mozilla will work fine though. Probably buggy code in phptest somewhere but damned if I can figure out what's causing it. Thanks, Brandon --- Kathleen Ferraro <address@hidden> wrote:Hi John, Thanks for following up. After quite a bit of testing, I've come to suspect that this is a browser issue primarily. I had been using OmniWeb, a really nice looking browser that runs under Mac OS X. I tried adding a question using Internet Explorer 5.1 for the Mac and had no problem. Just to clarify, the problem is not with uploading an image. The problem was that in OmniWeb, I found the following: If I did not upload an image, a got the "unknown file upload message and my question text was not loaded. If I did upload an image, everything (image and text) was loaded twice. I suppose I should pass this on to the folks at OMNI. Have not tried it systematically with any of the other browsers I experiement with. Best, Kathie On Wednesday, July 17, 2002, at 08:46 AM, John Lacey wrote:Hi Kathie, I happened to run across your post and waswondering if you were stillexperiencing a problem. If so, just send alongsome additional infothat may help, such as the file type (.gif, .jpg, etc)and file size.thanks, John There appears to be some conditional statementmissing or misplaced inadd_multiple.php and add_truefalse.php, causingboth "INSERT INTOquestions" queries to fire if an image is uploadedand neither to fireif an image is not uploaded. If I enter question text and don't upload animage, I get the message"Unknown file upload error"; if I enter text andupload an image, thetext and image are loaded twice. I've been sortingthrough the code buthaven't been able to get it to work yet. Ifsomeone has already fixedit, can you please post the corrected versions ofthese two files.Everything else is working very nicely. Best, Kathie--------------------------------------------------------------------------------------------------Kathleen A. Ferraro | address@hidden Senior Curriculum Specialist | 412.648.1099 (direct) Office of Medical Education (Scaife M211) | 412.648.8714 (main office) University of Pittsburgh | 412.958.0057 (pager) Pittsburgh, PA 15261 USA | 412.383.7477 (fax)---------------------------------------------------------------------------------------------------I am pleased that history recognizes the first to invent something, but I am more concerned with the first person to make it work. --Commodore Grace Murray Hopper, Computing Pioneer _______________________________________________ Phptest-users mailing list address@hiddenhttp://mail.freesoftware.fsf.org/mailman/listinfo/phptest-users __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com _______________________________________________ Phptest-users mailing list address@hidden http://mail.freesoftware.fsf.org/mailman/listinfo/phptest-users
--------------------------------------------------------------------------------------------------Kathleen A. Ferraro | address@hidden Senior Curriculum Specialist | 412.648.1099 (direct) Office of Medical Education (Scaife M211) | 412.648.8714 (main office) University of Pittsburgh | 412.958.0057 (pager) Pittsburgh, PA 15261 USA | 412.383.7477 (fax)
--------------------------------------------------------------------------------------------------- I am pleased that history recognizes the first to invent something, but I am more concerned with the first person to make it work. --Commodore Grace Murray Hopper, Computing Pioneer
[Prev in Thread] | Current Thread | [Next in Thread] |