I'm migrating a website from a server with WS2003, IIS6, PHP 5.2 over to a server with WS2008, IIS7 and PHP 5.3
I have a html form that uploads files to the site.
<?php
if(isset($_POST["Upload"])){
echo "<pre>";
print_r($_POST);
print_r($_FILES);
echo "</pre>";
}
?>
<form action="tester.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="Upload" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="4500000" />
<input type="file" name="artImage" id="artImage" />
<input type="submit" />
</form>
Works great on the old server, but on the new server, it chops off the first letter for no reason I can see. I don't know if it's an IIS setting, or a PHP setting.
Output:
Array
(
[Upload] => 1
[MAX_FILE_SIZE] => 4500000
)
Array
(
[artImage] => Array
(
[name] => easons_Change_(HD_Ready).jpg
[type] => image/pjpeg
[tmp_name] => C:\Windows\Temp\php99.tmp
[error] => 0
[size] => 498879
)
)
Output from the old server, same code, same file:
Array
(
[Upload] => 1
[MAX_FILE_SIZE] => 4500000
)
Array
(
[artImage] => Array
(
[name] => Seasons_Change_(HD_Ready).jpg
[type] => image/pjpeg
[tmp_name] => C:\WINDOWS\Temp\php6835.tmp
[error] => 0
[size] => 498879
)
)
This looks like the bug you are experiencing $_FILES 'name' missing first character after upload.
I am having the same issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With