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 1012011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:52:52+00:00 2026-05-16T09:52:52+00:00

First of all, I’m using KohanaPHP Framework. I’ve impletemented SWFUpload successfully, working quite nice.

  • 0

First of all, I’m using KohanaPHP Framework.

I’ve impletemented SWFUpload successfully, working quite nice. I’m having only one issue.

The main problem is I need to allow users to upload attachments before submitting form. So I decided to use Session var to store attachments array. Unfortunately, it is working inly if I use HTML upload (based on iframe), but not when I use SWFUpload.

I tried to Google for that, but without any working solution. Any ideas?

Update & Solution
Basically, I didn’t know there’s an issue with Flash and sessions. Providing the same session id didn’t helped me because I got unlogged. Anyway I got a solution for people with the same issue.

I created an unique ID of an item. I upload files to temporary directory, then… I’m scanning this directory and I’m adding uploaded filenames to session.

Tom

  • 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-16T09:52:53+00:00Added an answer on May 16, 2026 at 9:52 am

    What you need to is pass the session id to SWFUpload by hand. In a nutshell, you do this in your template:

    <script type="text/javascript">
    var PHPSESSID = <?php echo json_encode(session_id()); ?>;
    </script>
    

    Then you do this with your SWFUpload code:

    var settings = {
       post_params: {"PHPSESSID" : PHPSESSID},
       /* the rest of the settings */
    };
    

    And finally, in your application code, before you call session_start, you need to do this (usually just in your index.php or whatever bootstrap you use):

    // Restore session that came from SWFUpload
    if(isset($_REQUEST['PHPSESSID']))
        session_id($_REQUEST['PHPSESSID']);
    

    After this session_start() will use the correct session even for SWFUpload requests.

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

Sidebar

Related Questions

First of all i have to those categoryIDs 1-whos parentcategoryID only appears one 2-ParentCategoryID
First of all, I'm quite new to the Android and JAVA world (coming from
First of all I want to mention two things, One: My code isn't perfect
First all, I am still learning CakePHP and I am close to ZERO using
We're building an app, our first using Rails 3, and we're having to build
First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built
First of all, regular expressions are quite possibly the most confusing thing I have
First of all, I have only worked with scaffolding in rails. What I want
First of all, this isn't for a keylogger, it's for an input in a
first of all some details: I configured security as below in web.xml view plaincopy

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.