Jump to content

$_FILES is empty, and $_SERVER['CONTENT_LENGTH'] is empty


Ionisis

Recommended Posts

I've got an upload form, and it works FINE. I tried to modify it to allow for MULTIPLE uploads, and it doesn't work suddenly. I've tried EVERYTHING, and i've googled this for HOURS now.

 

		<form method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data">
			<div class="con">
				<h1 class="headline">Multimedia Upload</h1>
				<div class="sec">
					<input type="hidden" name="MAX_FILE_SIZE" value="67108864"/>
					<strong class="fnt_ff0000">Each File must be more than 0 bytes,<br/>ALL FILES must TOTAL less than <?=floor($remaining)?>mb</strong>
					<br/>
					<label for="multimedia">Choose a fie: Audio, Video, Image</label>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/>
					<br/><br/>
					.....
				</div>
			</div>
		</form>

 

file_uploads = On
upload_tmp_dir = /Multimedia/servers/http/0-logic/temp
max_execution_time = 200
max_input_time = 192
memory_limit = 152M
post_max_size = 144M
upload_max_filesize = 128M
max_file_uploads = 16

 

print_r($_FILES);print_r($_SERVER);exit;

 

I get the content length of the TEXT fields --826, but NOTHING for the images (~200kb each).

 

When observing my temp directory during an upload, the files ARE BEING UPLOADED. So, WTF?

 

FTR, action="" is not the issue, neither is id="multimedia[]". I've tried using different ways of each parameter, as well as adding and removing parameters, etc. NOTHING works. Yet, if i REMOVE all of the input fields but 1, it works again...

 

This is killing me --i've wasted HOURS of time on this already. Any ideas?

 

TIA

Link to comment
Share on other sites

The $_FILES and the $_POST array are both empty (done by php) when the total of all the form data exceeds the post_max_size setting.

 

What does a phpinfo() statement show for the post_max_size and upload_max_filesize settings?

 

Also, are you on a server where the Suhosin hardened php patch has been installed, as it imposes some other upload restrictions.

Link to comment
Share on other sites

phpinfo shows the same as my specified settings. AFAIK i don't have that patch installed.

 

The 4 test images that i'm trying to upload are less than 100k each, and my upload limits are over 128M, so that's not it either. IDK, this is so aggravating........

 

Relevant fields from phpinfo:

file_uploads	On	On
max_file_uploads	16	16
max_input_time	192	192
memory_limit	152M	152M
post_max_size	144M	144M
upload_max_filesize	160M	160M
upload_tmp_dir	/Multimedia/servers/http/0-logic/temp	/Multimedia/servers/http/0-logic/temp

 

Also forgot to mention that there is no relevant error in /var/log/httpd/error_log

 

PHP Version: 5.3.5

Server: Fedora 14

Apache: 2.2.17

 

Link to comment
Share on other sites

The form you posted works for me and gives the expected $_FILES and $_SERVER['CONTENT_LENGTH'] data.

 

I'm going to guess that something in your actual form or form processing code is causing the problem. Post enough of the code on your page that reproduces/duplicates the problem.

 

If you only select ONE file in the first field, but have the 4 fields in the form, does it work?

Link to comment
Share on other sites

In this example, i check it as SOON as it's posted back, with:

print_r($_FILES);print_r($_SERVER);exit;

 

So, it's empty right off the bat, before any processing at all...

 

Uploading only 1 of the 4 files does the SAME thing.

 

Forgot to mention that i'm using FF4. I'm going to try this with another browser, brb...........

 

Arora: same thing.

Chrome: who knows, it sucks so bad that you can't focus a form field without it crashing. POS..........

FF4 - Linux: me, you know the result

FF4 - Windows: same thing.

Link to comment
Share on other sites

If i remove the brackets from the name of the form fields, leaving them only as "multimedia", then i get ONE form field's information from the _FILES array:

 

Array ( [multimedia] => Array ( [name] => phphaXl17 [type] => application/octet-stream [tmp_name] => /Multimedia/servers/http/0-logic/temp/phpPSJdFl [error] => 0 [size] => 268552 ) )

 

Here's another thing: if i manually number the indices for the file names (eg, "multimedia[4]"), then the _FILES array is still empty --that means it MUST be an issue with the way php is processing them or handling them, and NOT a browser / html issue.

 

I'm going to have to move on with this, i've already lost too much time on it. I'm going to have to manually name each of the form fiels (multimedia_1, etc), and handle them that way. I can't believe that i haven't figured this out already........

Link to comment
Share on other sites

Just a moment, maybe it COULD be something wrong with the HTML/Browser... Tamper Data shows THIS:

 

Host=xratedbliss.com
User-Agent=Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20100101 Firefox/4.0
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-us,en;q=0.5
Accept-Encoding=gzip, deflate
Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive=115
Connection=keep-alive
Referer=http://xratedbliss.com/?a=SMMM_Multimedia_Create_Bulk
Cookie=****
Content-Type=multipart/form-data; boundary=---------------------------985814143726565843317566494
Content-Length=1048807
POSTDATA =-----------------------------985814143726565843317566494

Content-Disposition: form-data; name="MAX_FILE_SIZE"



67108864

-----------------------------985814143726565843317566494

Content-Disposition: form-data; name="multimedia[]"; filename="01.jpg"

Content-Type: image/jpeg



ÿØÿà

 

Notice there is only ONE form field posted (after the MAX_FILE_SIZE, anyway), and the rest --EVEN the text fields-- do not follow!

 

But on that same post, i get this:

print_r($_FILES); echo $_SERVER['CONTENT_LENGTH'];
Array ( ) 864

Link to comment
Share on other sites

I would try using a different name for the field in - name="multimedia[]". Your server or the php compiled for your server (I tested using FF4.0 under XP and with Apache (latest 2.2)/php (latest 5.3) running as an Apache Module under XP) could be doing something unique for an array with that name.

 

Also, without your whole form, it's kind of hard for anyone to eliminate that as the source of the problem.

Link to comment
Share on other sites

I'm sorry, i completely forgot to come back to this.

 

When struggling to get it to work, and trying different things, i had outright copied and pasted a few examples, which used different names for the form fields, and they didn't work either. I got the same empty files result. I wonder if there is a directive in php.ini that affects that behaviour, because i've got a fairly custom config...

 

Also, here's the whole form, ignore the new field names, and just imagine that they are still "multimedia[]". Also, remember, i was checking as SOON as the page posted back, before any processing:

		<form method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data">
			<div class="con">
				<h1 class="headline">Multimedia Upload</h1>
				<div class="sec">
					<input type="hidden" name="MAX_FILE_SIZE" value="134217728"/>
					<p class="fnt_ff0000">
						<strong>Each File must be more than 0 bytes. ALL FILES must TOTAL less than <?=floor($remaining)?>mb</strong>.
						Also, your Title, Description, and Keywords MUST be applicable to all files, as they will be applied to all files.
						If the files are somewhat similar, then proceed; but go to each file when finished and add any extra information to it that makes it unique from the others.
						For example, if you're uploading a set of images that are about "Me, Mom, and Dad, on vacation", and 1 of the images also has "Susie",
						then it needs to be later updated to reflect that, so that the image with "Susie" can be found by searching for it.
						If you are uploading different unrelated files, or you do not appropriately update the Title, Description, Keywords, for the unique properties of the files, then you may be breaking this website's rules.
					</p>
					<label for="multimedia">Choose a fie: Audio, Video, Image</label>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_1" name="multimedia_1" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_2" name="multimedia_2" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_3" name="multimedia_3" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_4" name="multimedia_4" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_5" name="multimedia_5" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_6" name="multimedia_6" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_7" name="multimedia_7" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_8" name="multimedia_8" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_9" name="multimedia_9" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_10" name="multimedia_10" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_11" name="multimedia_11" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_12" name="multimedia_12" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_13" name="multimedia_13" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_14" name="multimedia_14" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_15" name="multimedia_15" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_16" name="multimedia_16" style="width:98%;" value=""/>
					<br/><br/>

					<label class="fnt_ff0000" for="pid">Belongs to Sub Category:</label><br/>
					<select tabindex="2" class="button_link" id="pid" name="pid">
						<option value="">Select a Category</option>
						<? $optgroup = null; $i = 0;
						foreach((array)$m as $r){
							if ($r[1] != $optgroup){
								$optgroup = $r[1];
								if ($i > 0){
									echo "</optgroup>\n\t\t\t\t\t\t\t<optgroup label=\"{$r[1]}\">";
								}else{
									echo '<optgroup label="',$r[1],'">';
									$i++;
								}
							}?>
							<option value="<?=$r[0]?>" <? if($system->id == $r[0]){echo 'selected';} ?>><?=$r[2]?></option>
						<?}?>
					</select>

					<br/><br/>

					<label for="title">Title:<br/>
					(if this is a song from a band, you can cause rich media tags to be generated for this video /
					audio, by giving it a title structure like so: "Artist or Band Name - Album Name - Song Name")</label><br/>
					<input tabindex="3" class="button_link" type="text" id="title" name="title" style="width:98%;" value=""/>

					<br/><br/>

					<label for="description">Description:</label><br/>
					<textarea tabindex="4" class="button_link" id="description" name="description" rows="2" style="width:98%;"></textarea>

					<br/><br/>

					<label for="keywords">Keywords / Tags:</label><br/>
					<textarea tabindex="5" class="button_link" id="keywords" name="keywords" rows="2" style="width:98%;"></textarea>

					<br/><br/>

					<label for="comments">Allow Comments:</label>
					<select tabindex="6" class="button_link" id="comments" name="comments">
						<option value="1">Yes</option>
						<option value="0">No</option>
					</select>  

					<label for="voting">Allow Voting:</label>
					<select tabindex="7" class="button_link" id="voting" name="voting">
						<option value="1">Yes</option>
						<option value="0">No</option>
					</select>

					<br/><br/>

					<label for="privacy">Choose who can see this:</label>
					<select tabindex="8" class="button_link" id="privacy" name="privacy">
						<option value="0">Everyone</option>
						<option value="1">Indirect Connections</option>
						<option value="2">Direct Connections</option>
					</select>

					<br/><br/>
					<strong class="fnt_ff0000">Do not navigate away from this page until your files have finished uploading!</strong>
					<br/><br/>

					<input tabindex="9" class="button_link" type="submit" value="Upload Multimedia Files"/>
				</div>
			</div>
		</form>

Link to comment
Share on other sites

While I am looking at/testing your form, does it WORK using the uniquely named (non-array) input fields?

 

Are your $_POST and $_FILES arrays both empty when this problem occurs?

 

Also, AFAIK multiple="true" in that type of field is invalid and should be removed.

 

I would also validate the HTML of your form page at validator.w3.org

 

You have id="..." attributes in those fields, implying you have some javascript referencing the values. Any chance your javascript is doing something to the fields?

Link to comment
Share on other sites

I tried it:

without: multiple="true"

with:  multiple="true"

with:  multiple="multiple"

with  multiple (no value, as suggested by Mozilla)

 

None of them worked.

 

The uniquely named elements DO work, but i have to loop through them on the backend.

 

There is no javascript. It's all plain html. The html LABEL element addresses input fields by id, and not name (go figure).

 

$_POST contains the title and description field values, but $_FILES is empty and $_SERVER['content_length'] only holds the length of the textfield values.

 

Like i said, it DOES seem that the data IS posted TO the server (as per TamperData).

 

validator.w3.org shows the only "errors" being with the OpenGraph meta tags (which is not really an error, it just doesn't know wtf they are yet).

Link to comment
Share on other sites

Just for the hell of it, here's the ENTIRE html page (sans php):

 

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://developers.facebook.com/schema/">
<head>
	<title>Upload Multimedia</title>
	<meta property="og:site_name" content="The Social Expo"/>
	<meta name="robots" content="index,follow,NOODP"/>
	<meta name="title" content="Upload Multimedia"/>
	<link rel="prev" href="/"/>
	<link rel="next" href="/"/>

	<link rel="start" href="/"/>
	<link rel="active" href=""/>
	<link rel="canonical" href="http://thesocialexpo.com/?a=SMMM_Multimedia_Create_Bulk"/>
	<link rel="image_src" href="http://TheSocialExpo.com/api.ionisis.com/images/icons/128/default.png"/>
	<link rel="stylesheet" href="http://TheSocialExpo.com/api.ionisis.com/css/eecs.css"/>
	<link rel="stylesheet" href="http://TheSocialExpo.com/api.ionisis.com/css/smmm.css"/>
	<link rel="stylesheet" href="http://TheSocialExpo.com/api.ionisis.com/css/uams.css"/>
	<link rel="alternate" href="/?r=WCMS_Article_New" type="application/rss+xml" title="New Articles"/>
	<link rel="alternate" href="/?r=WCMS_Article_Updated" type="application/rss+xml" title="Updated Articles"/>

	<link rel="alternate" href="/?r=WCMS_Article_Voted" type="application/rss+xml" title="Highest Voted Articles"/>
	<link rel="alternate" href="/?r=UFBB_Topic_New" type="application/rss+xml" title="New Forum Topics"/>
	<link rel="alternate" href="/?r=UFBB_Topic_Unanswered" type="application/rss+xml" title="Unanswered Forum Topics"/>
	<link rel="alternate" href="/?r=UFBB_Topic_Updated" type="application/rss+xml" title="Updated Forum Topics"/>
	<link rel="alternate" href="/?r=SUBS_Blog_New" type="application/rss+xml" title="New User Blogs"/>
	<link rel="alternate" href="/?r=SUBS_Blog_Voted" type="application/rss+xml" title="Highest Voted User Blogs"/>
	<link rel="alternate" href="/?r=SMMM_Multimedia_New" type="application/rss+xml" title="New User Multimedia"/>
	<link rel="alternate" href="/?r=SMMM_Multimedia_Voted" type="application/rss+xml" title="Highest Voted User Multimedia"/>
	<link rel="alternate" href="/?r=EECS_Product_New" type="application/rss+xml" title="New Products"/>

	<link rel="alternate" href="/?r=EECS_Product_Voted" type="application/rss+xml" title="Highest Voted Products"/>

	<link rel="home" href="http://TheSocialExpo.com" title="Social Networking • Online Community • User Forums • Blogs • Friends"/>
	<link rel="shortcut icon" href="/favicon.png" type="image/png"/>
	<link rel="stylesheet" href="/api.ionisis.com/css/default.css" id="css"/>
	<link rel="stylesheet" href="/api.ionisis.com/css/textbox.css"/>
	<link rel="stylesheet" href="/api.ionisis.com/css/generic.css"/>
	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<meta property="fb:admins" content="100000464735232"/>

	<meta name="sitemap" content="/sitemap.xml"/>
	<meta name="Author" content="ionisis.com"/>
	<meta name="Rating" content="General"/>
	<meta name="google-site-verification" content="vWyket2mRv2OlYXO90_75PYB22F6HL6_jbEE-OpaGFU" />
	<script type="text/javascript" defer="defer" src="/api.ionisis.com/scripts/forms.js"></script>
	<script type="text/javascript">
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-15222608-7']);
		_gaq.push(['_trackPageview']);
		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	</script>
</head>
<body>

	<div id="layer1">
		<div id="menu">
			<a id="top" class="float_l" href="/" title="Online Community - Social Networking"><img id="heading_img" src="/api.ionisis.com/images/graphics/heading.png" alt="Social Networking - Online Community"/></a>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_u">
				<a href="/?a=UAMS_Display" title="Account Options">Account</a>

			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_u">
				<a href="/?a=Search" title="Search">Search</a>
			</div>
			<div class="m_b_s">

				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_u">
				<a href="/?a=SPIM_Display" title="Personal Information Manager">Organizer</a>
			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>

			<div class="m_b_u">
				<a href="/?a=WCMS_Display" title="Articles and Content">Articles</a>
			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_u">
				<a href="/?a=SUBS_Display" title="User Blogs">Blogs</a>

			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_u">
				<a href="/?a=UFBB_Display" title="User Forums">Forums</a>
			</div>
			<div class="m_b_s">

				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
			<div class="m_b_f">
				<a href="/?a=SMMM_Display" title="Social Multi Media Manager">Multimedia</a>
			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>

			<div class="m_b_u">
				<a href="/?a=EECS_Display" title="Easy E-Commerce System">Shop</a>
			</div>
			<div class="m_b_s">
				<img src="/api.ionisis.com/images/graphics/menu_separator.png" alt=""/>
			</div>
		</div>

		<div id="content_area">

			<div id="contents">
				<div id="navigation">
<div class="float_r">
	<a class="button_link" href="/?a=SMMM_Multimedia_Create">Upload Individual Files</a>
</div>
<a href="/?a=UAMS_Profile&id=12962693550254944">
	<img class="float_l" id="navigation_image" src="/api.ionisis.com/uams/small/12962693550254944.jpg" alt=""/>
</a>

<div id="navigation_link_chain">
	<a href="/?a=SMMM_Display">SMMM Main</a> -> <a href="/?a=SMMM_Multimedia_Create_Bulk">Upload Multimedia</a>
</div>
<br class="cleared"/>
</div>

		<form method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data">

			<div class="con">
				<h1 class="headline">Multimedia Upload</h1>
				<div class="sec">
					<input type="hidden" name="MAX_FILE_SIZE" value="134217728"/>
					<p class="fnt_ff0000">
						<strong>Each File must be more than 0 bytes. ALL FILES must TOTAL less than 93984mb</strong>.
						Also, your Title, Description, and Keywords MUST be applicable to all files, as they will be applied to all files.
						If the files are somewhat similar, then proceed; but go to each file when finished and add any extra information to it that makes it unique from the others.
						For example, if you're uploading a set of images that are about "Me, Mom, and Dad, on vacation", and 1 of the images also has "Susie",
						then it needs to be later updated to reflect that, so that the image with "Susie" can be found by searching for it.
						If you are uploading different unrelated files, or you do not appropriately update the Title, Description, Keywords, for the unique properties of the files, then you may be breaking this website's rules.
					</p>
					<label for="multimedia">Choose a fie: Audio, Video, Image</label>

					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_1" name="multimedia_1" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_2" name="multimedia_2" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_3" name="multimedia_3" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_4" name="multimedia_4" style="width:98%;" value=""/>
					<br/>

					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_5" name="multimedia_5" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_6" name="multimedia_6" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_7" name="multimedia_7" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_8" name="multimedia_8" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_9" name="multimedia_9" style="width:98%;" value=""/>

					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_10" name="multimedia_10" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_11" name="multimedia_11" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_12" name="multimedia_12" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_13" name="multimedia_13" style="width:98%;" value=""/>
					<br/>

					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_14" name="multimedia_14" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_15" name="multimedia_15" style="width:98%;" value=""/>
					<br/>
					<input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia_16" name="multimedia_16" style="width:98%;" value=""/>
					<br/><br/>

					<label class="fnt_ff0000" for="pid">Belongs to Sub Category:</label><br/>
					<select tabindex="2" class="button_link" id="pid" name="pid">

						<option value="">Select a Category</option>
						<optgroup label="Audio, Music, Sound">								<option value="12974041670482675" >Audio and Sound</option>
														<option value="12974044600043451" >Music, Artists, Bands</option>
						</optgroup>
						<optgroup label="Family, Friends, and Community">								<option value="12975151360908780" >Community</option>
														<option value="12975149100923624" >Family</option>

														<option value="12975150530816298" >Friends</option>
						</optgroup>
						<optgroup label="Fun and Entertainment">								<option value="12974091320860418" >Adult Oriented Topics</option>
														<option value="12974090160122016" >Comedy</option>
														<option value="12974089910707285" >Cool Websites</option>
														<option value="12974090600757953" >General</option>

						</optgroup>
						<optgroup label="Science, Philosophy, Mathematics">								<option value="12974052650449933" >Biology</option>
														<option value="12974051790326242" >Chemistry</option>
														<option value="12974045940267979" >Classical Physics / Mechanics</option>
														<option value="12974052200000317" >Cosmology</option>
														<option value="12974047340229179" >Modern Physics, Quantum Physics</option>

														<option value="12974045300420890" >Philosophy</option>
						</optgroup>
						<optgroup label="Sports">								<option value="12974080690596945" >Baseball</option>
														<option value="12974080490672611" >Basketball</option>
														<option value="12974080960291325" >Football</option>
														<option value="12974113840489481" >Racing</option>

														<option value="12974059760246165" >Soccer</option>
														<option value="12974080100903414" >Swimming</option>
														<option value="12974079530903369" >Tennis</option>
														<option value="12974079870846736" >Volleyball</option>
						</optgroup>
						<optgroup label="Technology, Gadgets, Software">								<option value="12974082120799223" >Gadgets</option>

														<option value="12974083630691849" >Hardware</option>
														<option value="12974084130227582" >Information Technology</option>
														<option value="12974085290998116" >Linux Operating System</option>
														<option value="12974084870773470" >Networking</option>
														<option value="12974084430750010" >Programming</option>
														<option value="12974085630100615" >Server Administration</option>

														<option value="12974083830113426" >Software</option>
						</optgroup>
						<optgroup label="Video, Movies, TV">								<option value="12974086020769868" >Movies</option>
														<option value="12974086460412908" >Online Videos</option>
														<option value="12974086270350132" >Television</option>
						</optgroup>

						<optgroup label="World Affairs, Economy, Trade">								<option value="12974088230475499" >Animal Rights and Human Rights</option>
														<option value="12974087340929578" >Economics</option>
														<option value="12974087980172950" >Policy and Politics</option>
														<option value="12974087620164549" >Trade</option>
														<option value="12998488500515089" >Tragic Events and Current Events</option>
												</select>

					<br/><br/>

					<label for="title">Title:<br/>
					(if this is a song from a band, you can cause rich media tags to be generated for this video /
					audio, by giving it a title structure like so: "Artist or Band Name - Album Name - Song Name")</label><br/>
					<input tabindex="3" class="button_link" type="text" id="title" name="title" style="width:98%;" value=""/>

					<br/><br/>

					<label for="description">Description:</label><br/>

					<textarea tabindex="4" class="button_link" id="description" name="description" rows="2" style="width:98%;"></textarea>

					<br/><br/>

					<label for="keywords">Keywords / Tags:</label><br/>
					<textarea tabindex="5" class="button_link" id="keywords" name="keywords" rows="2" style="width:98%;"></textarea>

					<br/><br/>

					<label for="comments">Allow Comments:</label>
					<select tabindex="6" class="button_link" id="comments" name="comments">
						<option value="1">Yes</option>
						<option value="0">No</option>
					</select>  

					<label for="voting">Allow Voting:</label>

					<select tabindex="7" class="button_link" id="voting" name="voting">
						<option value="1">Yes</option>
						<option value="0">No</option>
					</select>

					<br/><br/>

					<label for="privacy">Choose who can see this:</label>

					<select tabindex="8" class="button_link" id="privacy" name="privacy">
						<option value="0">Everyone</option>
						<option value="1">Indirect Connections</option>
						<option value="2">Direct Connections</option>
					</select>

					<br/><br/>
					<strong class="fnt_ff0000">Do not navigate away from this page until your files have finished uploading!</strong>

					<br/><br/>

					<input tabindex="9" class="button_link" type="submit" value="Upload Multimedia Files"/>
				</div>
			</div>
		</form>
					</div>
		</div>

		<div id="feedback">

			<a href="/?a=WMMS_Create"><img src="/api.ionisis.com/images/graphics/feedback.png" alt="feedback"/></a>
		</div>

		<br class="cleared"/><br/>

		<div id="footer">
			<div id="footer_links">
				<br/><br/><br/><br/><br/>
			</div>
		</div>

	</div>
</body>
</html>

Link to comment
Share on other sites

And while we're at it, here's my entire php.ini; later i plan i re-reading the entire core directives documentation again, to get rid of the options that i don't need (it's been a couple of years):

engine = On
extension_dir = "/usr/lib64/php/modules"
zend.ze1_compatibility_mode = Off
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 0
zlib.output_compression = On
zlib.output_compression_level = 2
zlib.output_handler =
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
realpath_cache_size=64k
realpath_cache_ttl=256
expose_php = Off

file_uploads = On
upload_tmp_dir = /Multimedia/servers/http/0-logic/temp
max_execution_time = 240
max_input_time = 240
memory_limit = 96M
post_max_size = 368M
upload_max_filesize = 368M
max_file_uploads = 16

error_reporting  =  E_ALL
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off
server.max-keep-alive-requests = 64
server.max-keep-alive-idle = 10
variables_order = "EGPCS"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
default_mimetype = "text/html"
enable_dl = On
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
date.timezone = UTC
define_syslog_variables  = Off
sendmail_path = /usr/sbin/sendmail -t -i
tidy.clean_output = Off


;xmlrpc_error_number = 0
;xmlrpc_errors = 0


sql.safe_mode = Off
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off


mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
query_cache_size = 8M


session.save_handler = files
session.save_path = "/var/lib/php/session"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly = 1
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"


soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400

Link to comment
Share on other sites

I cannot get your form to FAIL on my server (Windows development system.) Even when exceeding the post_max_size setting, the server-side $_SERVER['CONTENT_LENGTH'] is the correct/expected value that matches what was selected in the form, with empty $_FILES and $_POST arrays.

 

I'm going to guess this has something to do with php on your specific server.

 

The only thing I can see in all this is I would turn on display_startup_errors

Link to comment
Share on other sites

AH! I think that i know EXACTLY what's going on! My systems run over a SaaS framework that i've spent 2 years developing; i never planned on having more than 1 parameter with the SAME name to forward through the API! I need to update my framework's api connector file that's used on the client's site so that it can handle multiple get/post/files params with the same name... Wow, that's going to be fun.

 

Thanks a million for your help man. Without you, i would not have come to this realisation :D

 

By the way, i love some of the quotes in your signature and under your avatar.

 

Is there not a way to mark this "solved"?

Link to comment
Share on other sites

Ha, that's almost exactly what i was doing:

for ($i = 1; $i < 17; $i++){
if (isset($_FILES['multimedia_'.$i])){
	if ($_FILES['multimedia_'.$i]['size'] > 0){
		$file = $_FILES['multimedia_'.$i]['tmp_name'];
		if ($mm->analyze($file)){
		}
	}
}
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.