我正在尝试安装 Magento 软件包,但我得到了No file was uploaded
它来自此代码,因为$_FILES
它是一个空数组/downloader/Maged/Controller.php
/**
* Install uploaded package
*/
public function connectInstallPackageUploadAction()
{
if (!$_FILES) {
echo "No file was uploaded";
return;
}
if(empty($_FILES['file'])) {
echo "No file was uploaded";
return;
}
$info =& $_FILES['file'];
if(0 !== intval($info['error'])) {
echo "File upload problem";
return;
}
$target = $this->_mageDir . DS . "var/" . uniqid() . $info['name'];
$res = move_uploaded_file($info['tmp_name'], $target);
if(false === $res) {
echo "Error moving uploaded file";
return;
}
$this->model('connect', true)->installUploadedPackage($target);
@unlink($target);
}
值得注意的是,产品上传工作正常。
我得到的唯一日志输出是
2014-07-03T18:44:15+00:00 ERR (3): 警告:array_key_exists() 期望参数 2 为数组,/var/www/vhosts/example.com/httpdocs/app/code/ 中给出的 null core/Mage/Captcha/Model/Observer.php 第 166 行
exception.log
是空的