Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4002140
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:59:23+00:00 2026-05-20T07:59:23+00:00

im try to catch a fileupload from my Flashfile, this sends it with $_POST

  • 0

im try to catch a fileupload from my Flashfile, this sends it with $_POST to my File upload.php.

Maybe anyone find my Bug, the File was’nt uploaded.

$data = $GLOBALS["HTTP_RAW_POST_DATA"];
$fp = fopen("upload/".$session."/".$wkid."/".$data, "wb");
fwrite($fp, $data);
fclose($fp);

The Header of POST looks like:

http://192.168.1.161:81/upload.php

POST /upload.php HTTP/1.1
Host: 192.168.1.161:81
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: PHPSESSID=9873ceb6399eafefb91dac3b942d0b78; __utma=48168551.1670897330.1298964838.1298964838.1298968544.2; __utmc=48168551; __utmz=48168551.1298964838.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); phpMyAdmin=f54c4ad7eb21706a57b4b6e5058dd2cfbea1cc32; pma_lang=de-utf-8; pma_charset=utf-8; pma_mcrypt_iv=UX8VuU94d%2BA%3D; pmaUser-1=SNAWkCqwJCg%3D; pmaPass-1=eV3KOmsoVPlmV1Z%2BYkskZQ%3D%3D; pma_fontsize=82%25; pma_theme=original; __utmb=48168551.2.10.1298968544; session=9873ceb6399eafefb91dac3b942d0b78; wkid=314; uid=25c75688b1e929d494fea85a0d6a8439
Referer: http://192.168.1.161:81/upload.swf
Content-type: application/octet-stream
Content-length: 73371

PNG


HTTP/1.1 200 OK
Date: Tue, 01 Mar 2011 08:35:03 GMT
Server: Apache/2.2.9
X-Powered-By: PHP/5.2.6-1+lenny9
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 35
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html

Regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:59:23+00:00Added an answer on May 20, 2026 at 7:59 am

    I think the issue might be this part:

    $fp = fopen("upload/".$session."/".$wkid."/".$data, "wb");
    

    $data was set to the raw POST payload. And with this fopen call you are trying to create a filename with the raw bytestream (possibly over 10K) in its name. While this depends on the actual filesystem, it is most likely to fail on most BSD/Linux servers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm bored with surrounding code with try catch like this.. try { //some boring
This is a self-explanatory question: Why does this thing bubble into my try catch's
Apache returns this error while trying to upload a file (I only kept the
I'm trying to upload a file using JavaFX using the HttpRequest. For this purpose
When I start typing a try/catch block, ReSharper causes it to be expanded from
This is a followup question to this Should I stick with the Try/Catch/Finally construct,
Short of inserting a try/catch block in each worker thread method, is there a
We are using SQL 2005 and the try-catch functionality to handle all of our
So, I know that try/catch does add some overhead and therefore isn't a good
What kind of performance implications are there to consider when using try-catch statements in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.