7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Uploadify "HTTP Error 302"
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 8364 Views |
-
Uploadify "HTTP Error 302"

28 May 2011 at 12:38am Last edited: 28 May 2011 1:35am
Hi guys,
on my server installation I get the 302 Error when trying to upload a file with FileObjectManager, on my local installation everything works fine.
'session.use_only_cookies' is 0, upload folder rights are set to 777 and 'die(session_id());' in uploadify _config.php returns an alphanumeric string,
Unfortunately I can't set the session.save_path in my .htaccess file - which seems to have helped a number of users -, as this results in a 500 Server Error.Are there any workarounds or solutions for this problem?
-
Re: Uploadify "HTTP Error 302"

31 May 2011 at 3:23pm
It's a really nasty problem. I wish I knew why certain environments do this, even with use_only_cookies off. It just doesn't make sense.
The only solution that I can see is to add a setting that will disable authenticated uploads for Uploadify fields, which is insecure, but there are some things we can do to improve that.
I'll post to this thread when I have something. I'm always juggling a number of things, so don't be afraid to ping this thread and rattle my cage every now and then.
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: Uploadify "HTTP Error 302"

2 June 2011 at 3:16am
OK, I've just checked in a change. If you add the following line to your _config.php:
UploadifyField::disable_authentication();
That will force Uploadify to use a public-facing upload controller, and should avoid those 302 errors. Let me know how that works.
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com -
Re: Uploadify "HTTP Error 302"

3 June 2011 at 8:48pm
I just downloaded the new commit, uploaded it to the server, added UploadifyField::disable_authentication(); to my _config.php, but unfortunately my upload still gets shut down with the same error.
Thanks for the quick attempt to fix it, though! -
Re: Uploadify "HTTP Error 302"

4 June 2011 at 4:57am
Hmm.. that doesn't sound right. Are you sure it's a 302 error? What is the URL that is throwing the 302?
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com -
Re: Uploadify "HTTP Error 302"

4 June 2011 at 7:42am Last edited: 4 June 2011 7:53am
Oh, my bad, it's not a 302 but a 404 error.
I played around a bit in Wireshark and got this ('follow TCP stream'), I censored some stuff with '/* */'. Maybe you or someone else can get something out of it:
POST /baustelle/UploadifyUploader?uploadFolder=Uploads&imageClass=Image&fileClass=File HTTP/1.1
Accept: text*/
Content-Type: multipart/form-data; boundary=----------/* alphanumeric string*/
User-Agent: Shockwave Flash
Host: /* my host */
Content-Length: 5171
Connection: Keep-Alive
Cache-Control: no-cache
------------/* alphanumeric string*/
Content-Disposition: form-data; name="Filename"
crashreporter.ini
------------/* alphanumeric string*/
Content-Disposition: form-data; name="PHPSESSID"
819cc0c94ae11baddc16db25c254b29c
------------/* alphanumeric string*/
Content-Disposition: form-data; name="folder"
/baustelle/admin/EditForm/field/Resources/
------------/* alphanumeric string*/
Content-Disposition: form-data; name="FolderID"
1
------------/* alphanumeric string*/
Content-Disposition: form-data; name="fileext"
*.*
------------/* alphanumeric string*/
Content-Disposition: form-data; name="Filedata"; filename="crashreporter.ini"
Content-Type: application/octet-stream
# This file is in the UTF-8 encoding
[Strings]
# LOCALIZATION NOTE (isRTL):
# Leave this entry empty unless your language requires right-to-left layout,
# for example like Arabic, Hebrew, Persian. If your language needs RTL, please
# use the untranslated English word "yes" as value
isRTL=
CrashReporterTitle=Absturz-Melder
# LOCALIZATION NOTE (CrashReporterVendorTitle): %s is replaced with the vendor name. (i.e. "Mozilla")
CrashReporterVendorTitle=%s Absturz-Melder
# LOCALIZATION NOTE (CrashReporterErrorText): %s is replaced with another string containing detailed information.
CrashReporterErrorText=Ein Problem ist aufgetreten und die Anwendung ist abgest..rzt.\n\nBedauerlicherweise kann der Absturz-Melder diesen Absturz nicht melden.\n\nDetails: %s
# LOCALIZATION NOTE (CrashReporterProductErrorText2): The first %s is replaced with the product name (i.e. "Firefox"), the second is replaced with another string containing detailed information. These two substitutions can not be reordered!
CrashReporterProductErrorText2=Ein Problem ist aufgetreten und %s ist abgest..rzt.\n\nBedauerlicherweise kann der Absturz-Melder diesen Absturz nicht melden.\n\nDetails: %s
CrashReporterSorry=Entschuldigung
# LOCALIZATION NOTE (CrashReporterDescriptionText2): The %s is replaced with the product name.
CrashReporterDescriptionText2=Ein unerwartetes Problem ist aufgetreten und %s ist abgest..rzt.\n\nUm uns zu helfen, dieses Problem zu erkennen und zu reparieren, k..nnen Sie uns eine Absturz-Meldung schicken.
CrashReporterDefault=Diese Anwendung wird nach einem Absturz ausgef..hrt, um das Problem an den Anwendungs-Hersteller zu melden. Sie sollte nie direkt ausgef..hrt werden.
Details=Details...
ViewReportTitle=Inhalte ansehen
CommentGrayText=Einen Kommentar hinzuf..gen (Kommentare sind ..ffentlich sichtbar)
ExtraReportInfo=Diese Meldung enth..lt Informationen ..ber den Status der Anwendung zum Zeitpunkt des Absturzes.
# LOCALIZATION NOTE (CheckSendReport): The %s is replaced with the vendor name.
CheckSendReport=%s ..ber diesen Absturz informieren, sodass er behoben werden kann
CheckIncludeURL=Die Adresse der Seite hinzuf..gen, die gerade geladen war
CheckAllowEmail=%s erlauben, mich wegen diese Meldung zu kontaktieren
EmailGrayText=Geben Sie hier Ihre E-Mail-Adresse ein
ReportPreSubmit2=Ihre Absturzmeldung wird vor dem Beenden oder dem Neustart abgesendet.
ReportDuringSubmit2=Senden der Meldung...
ReportSubmitSuccess=Meldung erfolgreich abgesendet!
ReportSubmitFailed=Beim Senden der Meldung ist ein Problem aufgetreten.
ReportResubmit=Meldungen, die vorher nicht gesendet werden konnten, werden erneut gesendet...
# LOCALIZATION NOTE (Quit2): The %s is replaced with the product name.
Quit2=%s beenden
# LOCALIZATION NOTE (Restart): The %s is replaced with the product name.
Restart=%s neu starten
Ok=OK
Close=Schlie..en# LOCALIZATION NOTE (CrashID): The %s is replaced with the Crash ID from the server, which is a string like abc12345-6789-0abc-def1-23456abcdef1
CrashID=Absturz-ID: %s
# LOCALIZATION NOTE (CrashDetailsURL): The %s is replaced with a URL that the user can visit to view the crash details.
CrashDetailsURL=Sie k..nnen Details dieses Absturzes unter %s ansehen
ErrorBadArguments=Die Anwendung hat ein ung..ltiges Argument ..bergeben.
ErrorExtraFileExists=Die Anwendung hat keine Anwendungsdaten-Datei hinterlassen.
ErrorExtraFileRead=Die Anwendungsdaten-Datei konnte nicht gelesen werden.
ErrorExtraFileMove=Die Anwendungsdaten-Datei konnte nicht verschoben werden.
ErrorDumpFileExists=Die Anwendung hat keine Absturz-Ausgabedatei hinterlassen.
ErrorDumpFileMove=Die Absturz-Ausgabedatei konnte nicht verschoben werden.
ErrorNoProductName=Die Anwendung hat sich nicht identifiziert.
ErrorNoServerURL=Die Anwendung hat keinen Absturzmeldungs-Server angegeben.
ErrorNoSettingsPath=Die Absturzmeldungs-Einstellungen konnten nicht gefunden werden.
ErrorCreateDumpDir=Der Ordner f..r anstehende Ausgaben konnte nicht erstellt werden.
# LOCALIZATION NOTE (ErrorEndOfLife): The %s is replaced with the product name.
ErrorEndOfLife=Die Version von %s, die Sie verwenden, wird nicht mehr unterst..tzt. Absturzmeldungen werden f..r diese Version nicht mehr angenommen. Bitte ..berlegen Sie, auf eine unterst..tzte Version zu aktualisieren.------------/* alphanumeric string*/
Content-Disposition: form-data; name="Upload"
Submit Query
------------/* alphanumeric string/*--HTTP/1.1 404 Not Found
Date: Fri, 03 Jun 2011 19:40:00 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.2.6-1+lenny9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=/* another alphanumeric string */; path=/; HttpOnly
Set-Cookie: bypassStaticCache=deleted; expires=Thu, 03-Jun-2010 19:40:00 GMT; path=/; httponly
Set-Cookie: bypassStaticCache=deleted; expires=Thu, 03-Jun-2010 19:40:00 GMT; path=/; httponly
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset="utf-8"
b45
-
Re: Uploadify "HTTP Error 302"

4 June 2011 at 2:43pm
Can you access that URL directly from your browser, or do you get a 404?
You may need to flush, because if SilverStripe doesn't know about the UploadifyUploader class, it will 404 when you try to access it directly from the URL.
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: Uploadify "HTTP Error 302"

15 July 2011 at 8:42pm
I just came from my vacation and checked it again and it works now! Guess I didn't flush properly the first time or something.
Thanks a lot for your support!
| 8364 Views | ||
| Go to Top | Next > |

