I'm unable to upload files using Internet Explorer 8, so I tried:
$IniSetting = ini_set('upload_max_filesize', '30971520');
if(empty($IniSetting))
{
echo("Couldn't set upload_max_filesize!");
}
but it returns empty!
Then I created an htaccess file;
php_value upload_max_filesize 30M
I suspect my webserver be on a Unix system, so I used a program called tofrodos to change the linebreaks to a Unix format. But no matter what I do, I get:
[color=#000000] Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the [email="gunnar@gpartner.no"]webmaster[/email].
Error 500 gpartner.no
[size=2]Wed Jun 8 09:39:10 2011
I suspect my webserver be on a Unix system, so I used a program called tofrodos to change the linebreaks to a Unix format. But no matter what I do, I get:
Create a php file with this in it to see what system you are dealing with: <?php phpinfo(); ?>
php_value upload_max_filesize 30M
Try:
php_value upload_max_filesize "30M"
If I've helped you in any way please push the reputation button, thanks!
phpinfo() says the system is [font="sans-serif"]SystemLinux sheraton 2.6.26-2-686-bigmem #1 SMP Thu Jan 27 01:21:02 UTC 2011 i686
[/font]
[font="sans-serif"]It also says the max_upload_filesize is[/font]
[font="sans-serif"]upload_max_filesize64M64M
[/font]
[font="sans-serif"]Which makes me wonder... is this a problem with Internet Explorer? o_O[/font]
mysql_close($Connection);
}
else
{
EchoError("Type");[/font]
}
else
{
if ($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_INI_SIZE)
{
echo("The UPLOAD_ERR_INI_SIZE error code means the size of the uploaded file is larger than the value specified by the upload_max_filesize directive.");
}
else if($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_FORM_SIZE)
{
echo("The UPLOAD_ERR_FORM_SIZE error code never appears if there is no MAX_FILE_SIZE hidden field in the HTML/XHTML form that contains the <input type=\"file\"> element.");
}
else if($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_PARTIAL)
echo("The UPLOAD_ERR_PARTIAL error code means the server only receives part of the uploaded file.");
}
else if($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_NO_FILE)
{
echo("The UPLOAD_ERR_NO_FILE error code means the HTTP request contains no uploaded file.");
}
else if($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_NO_TMP_DIR)
{
echo("The UPLOAD_ERR_NO_TMP_DIR error code means there is no temporary directory.");[/font]
}
else if($_FILES['UploadedZip']['error'] == $UPLOAD_ERR_CANT_WRITE)
{
echo("The UPLOAD_ERR_CANT_WRITE error code means the uploaded file cannot be written to disk.");
}
EchoError("Error");
}
[font="sans-serif"]On Internet Explorer 8, the above ALWAYS fails with UPLOAD_ERR_INI_SIZE as the errorcode. [/font]
[font=Tahoma, Arial, Helvetica, sans-serif][size=2]I also checked [/font][font=Tahoma, Arial, Helvetica, sans-serif][size=2]POST_MAX_SIZE, and it also set to 64m o_O[/font]
... but it returns empty!
[/quote]
The documentation page for ini_set has a comment at the end saying that if it returns "empty" then a script cannot set the value.
... is this a problem with Internet Explorer? o_O
[/quote]
Why, is it working using another browser?
Ya, it works perfectly in Google Chrome, and I'd assume also in Firefox.
[color="#1C2837"]The documentation page for ini_set has a comment at the end saying that if it returns "empty" then a script cannot set the value.[/quote]
[color="#1C2837"]
[color="#1C2837"]I am painfully aware of this. But since the phpinfo() seems to think that the ini is set to 64m, I shouldn't need to set the value in the first place!
[color="#1C2837"]
[color="#1C2837"]Edit: Setting the value doesn't work in another browser, but uploading does.