1
我们最近升级我们的服务器从PHP 5.4.15至5.5.1,并已开始在日志中收到此错误PHP错误的文件描述符错误
致命错误无法创建锁定文件:错误的文件描述符
我已经跟踪到这一位代码,该代码打开另一个小的PHP脚本,该脚本在后台将文件上传到S3。
// Grab uploaded file and assign a working name
$fileTemp = $_FILES['file']['tmp_name'];
$pathToWorkingFile = tempnam($g_TmpDirectory, "TR-");
// Move the file to our working area
if (move_uploaded_file($fileTemp, $pathToWorkingFile) === false)
throw new Exception("Cannot move file to staging area.", 1011);
// Where the file will end up on S3
$s3Bucket = "test.bucket.com";
$uploadDest = "/uploads/image123.jpg";
// Create process to upload file in background
popen("/usr/local/bin/php /path/to/uploadScript.php $pathToWorkingFile $s3Bucket $uploadDest &", 'r');
我们不知道你的代码的其余部分看起来像......那一个片段似乎很没用...... – Neal
我希望至少'$ SOME ARGUMENTS' $从'escapeshellarg接受治疗() '。 – Sven
可能是损坏的文件系统,测试和修复取决于您的操作系统。 fsck是在Linux上启动或扫描/检查Windows上的磁盘的地方 – Anigel