Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2003, 05:23 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default Storing binary data in $_SESSION variables

I was curious if I would run into any problems storing binary data in session variables.

Here is the problem er rather challenge!:
I want to design a multi-part form which may include several steps before the final data is put together and stored in a database. I want the form to be able to get past some ISPs' requirement of accepting only a single upload at a time via the max simultaneous uploads directive in php.ini. Am I interpretting that correctly or can there be multiple files uploaded in a single HTTP request... is it per HTTP request or is it allowing only one file to upload at a time one after another? I've done some research on this and can't seem to even find a reference to how many uploads may occur at a time... maybe I just dreamed the whole thing up!

I was thinking if I could design a function to build hidden fields automatically between steps and store any files in $_SESSION variables then I may have this thing licked. I wanted to go with $_SESSION variables because then if a user inadvertently closes the browser or spontaneously stops in the middle of the submission process then whatever binary data would be destroyed with the other $_SESSION data no harm done, no files left to clean up off of the server. Then after a successful database insert, destroy the leftover binary data in the $_SESSION array with unset().

Just curious if I am going to run into any limitations or possible pitfalls with this solution. I'm thinking since most ISPs limit the size of uploaded files to 2MB, no file would be larger than that and in fact I would probably impose a 1MB limit.

: )

Smiling Souls
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
storing field values to variables imaginevictor SQL Server 2000 1 July 3rd, 2007 02:17 AM
Storing data to a variable Mikect VB Databases Basics 1 April 16th, 2007 01:53 PM
Is it possible to set $_Session Variables in java rinventive Java Basics 1 February 13th, 2006 05:41 AM
storing data in hashtable msrnivas General .NET 0 July 5th, 2005 04:07 PM
Storing objects in Session variables mega ASP.NET 1.0 and 1.1 Basics 8 November 16th, 2004 02:38 PM

All times are GMT -4. The time now is 10:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.