only 347 bytes of Video Uploaded through CMS in PHP/MYSQL for clients
I've created a basic CMS in PHP/MYSQL to allow videographers to manage their portfolio of videos. It's hosted on a shared server. A query inserts the video metadata into the db prior to the below upload script being carried out.
My upload script that works fine whenever I've tried it (on multiple machines, at my home and at University), but when a client tried to upload a video himself, the CMS only uploaded 347 bytes and then acted as though the upload was finished.
Is this an issue with my code or something on the client's end? Is there anythin开发者_JAVA百科g I can do to find out (I don't have access to the raw PHP/Apache logs...) Thanks!
This is the output of the linux "strings" command on the 347 byte binary file:
[moov
Srmra
\rmda
Drdrf
url
/Crispy%20Revised%20SD%20h264%20web-desktop.m4v
rmdr
zrmda
Hrdrf
url
3Crispy%20Revised%20SD%20h264%20web-iPhone-cell.3gp
rmdr
rmvc
mobi
urmda
Crdrf
url
.Crispy%20Revised%20SD%20h264%20web-iPhone.m4v
rmdr
rmvc
mobi
This accounts for about 245 bytes of the 347.
Also, here is the core component of basic upload script (I've omitted some sanitizing activities):
if ($file["error"] > 0)
{
echo "<p>Return Code: " . $file["error"] . "</p>";
}
else
{
if (file_exists($Dir.$file["propername"]))
{
echo "<p>".$file["propername"] . " already exists. ";
}
else
{
move_uploaded_file($file["tmp_name"],
$Dir.$file["propername"]);
echo "<p>Stored in: " . $Dir.$file["propername"];
}
}
I think you have problems with the php.ini upload-related directives. You should check http://www.radinks.com/upload/config.php this site for various solutions.
精彩评论