【问题标题】:magento large size downloadable product not downloadingmagento大尺寸可下载产品未下载
【发布时间】:2014-05-14 23:43:09
【问题描述】:

我正在研究磁电机 1.8 CE。除了某些产品没有完全下载之外,一切都运行良好。

这些产品的尺寸大于 50M。

我更改了我的php.ini 设置

当前值为

max_execution_time = 5000   
safe_mode = off
max_input_time = 9000
memory_limit = 1024M
post_max_size = 550M
file_uploads = On
upload_max_filesize = 512M
max_file_uploads = 200
allow_url_fopen = On

我还将管理会话值更改为 3600,将 Cookie Lifetime 更改为 3600。

产品类型是 epub 书籍,它们完全在系统浏览器上下载,而不是在移动/tab/ipad 浏览器上完全下载。

我该如何解决这些问题?

谢谢

【问题讨论】:

  • 根据 Google 的说法,它可能是您的主机。

标签: php apache magento download magento-1.8


【解决方案1】:

不能确定是你服务器的配置还是PHP的配置。但要测试导致问题的原因,请将您的产品放在服务器的根目录并尝试使用 PHP 脚本下载文件:

$file = 'PATH_TO_YOUR_FILE';
$baseName = basename($file);
$fileSize = filesize($file);
try {
    $baseName = basename($file);
    header('Content-type: application/force-download');
    header('Content-Transfer-Encoding: Binary');
    header('Content-length: ' . $fileSize);
    header('Content-disposition: attachment; filename="' . $baseName . '"');
    echo file_get_contents($file, true);
    exit(0);
} catch (Exception $e) {
    echo $e->getMessage();
}

查找可能发生的任何错误。希望这会有所帮助。如果没有,请尝试检查您的 magento 错误日志或服务器和/或 PHP 错误日志以获取线索。

【讨论】:

    【解决方案2】:

    可能是 php 问题,也可能是主机阻止了它。请参阅 php 错误日志和 Magento 日志以检查是否引用了任何错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      相关资源
      最近更新 更多