Jump to content

Recommended Posts

I am hosting with GoDaddy and i had to throw a page together real quick so that a friend can upload videos to my server with a web interface because they are too large to send via email. The problem is that the page works fine for images and SMALL video files, but after 9MB it will not work any more?

 

I called go daddy and they told me that there are default configuration limits, but that i am allowed to change them as i see fit, because they do not limit the size of the file that we can upload to our account, nor the execution time. They also provided me with this link:

http://help.godaddy.com/article/1475?

 

So i changed my config settings in the php.ini file that is in my webroot, and waited for about 20 minutes, and i still cannot upload anything larger than 9MB! Here are my settings with regards to file uploads:

 

max_input_time = 900

max_execution_time = 900

memory_limit = 100M

post_max_size = 90M

upload_max_filesize = 80M

 

 

I even confirmed this with this page here:

http://us2.php.net/ini.core

 

If you scroll down the page, you will come to this:

  post_max_size  integer

    Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size . When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set.

 

So it appears that i have my settings correct, but still, no luck. Any ideas?

 

Thanx

 

 

Also, there is NO input field for upload limit in the upload form, so i know that is not the problem.

 

Link to comment
https://forums.phpfreaks.com/topic/120055-file-upload-problem/
Share on other sites

I should also add that i have error_reporting set to E_ALL while i'm debugging. So the only error that i get with the large files is:

Notice: Undefined index: pwd in /home/content/a/l/e/alexandergrim/html/tmp/Upload2.php on line 73

 

It is claiming that the password name/value pair/parameter was never sent over, but yet it does not do this if the file is less than 9M, because it IS an input field in the form, and works properly! This has me stumped.

 

Here is the form:

<form method="post" enctype="multipart/form-data" action="Upload2.php">
	<label for="pwd">Enter your password that i gave you:</label>
	<br/>
	<input type="password" name="pwd" id="pwd"/>

	<br/><br/><br/>

	<label for="pwd">Now, choose a file to upload:</label>
	<br/>
	<input type="file" name="file" id="file"/>

	<br/><br/>

	<input type="submit" value="Upload"/>
</form>

 

 

and here is the script that parses it:

<?php error_reporting(E_ALL);
	if ($_POST['pwd'] == "123") {
		if (move_uploaded_file($_FILES['file']['tmp_name'], $_FILES['file']['name'])){?>
			<h2 class="heading">Your file was uploaded successfully;
			<br/><br/>
			<a href="http://alexgrim.com/tmp/Upload.php">Do you want to upload another file?</a>
			</h2>
		<?} else {?>
			<h2 class="heading">Your file was NOT uploaded successfully!</h2>
			<br/>
			The file may have been too large. If so, you may have to find another way to get it to me.
			<br/><br/>
			<h2><a href="http://alexgrim.com/tmp/Upload.php">Do you want to try to upload again?</a></h2>
		<?}
	} else {?>
		<h2 class="heading">Your PASSWORD was NOT correct!</h2>
		<br/>
		Make sure that your are using the correct UPPERCASE or lowercase letters.
		For example, if the password is "Banannas" then "banannas" and "BANANNAS" are NOT correct,
		because it must be spelled EXACLTY like "Banannas". So go back and try to enter your password again.
		<br/><br/>
		<h2><a href="http://alexgrim.com/tmp/Upload.php">Do you want to try to upload again?</a></h2>
	<?}
?>

 

Link to comment
https://forums.phpfreaks.com/topic/120055-file-upload-problem/#findComment-618445
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.