我正在尝试安装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第166行的core / Mage / Captcha / Model / Observer.php
exception.log
为空 最佳答案
确保magento安装中的var文件夹是完全可写的。 777许可。所有文件夹和文件。