You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Opencart 1.5.6.4图片上传异常求助:弹窗重复登录页面无法上传

Fix for OpenCart 1.5.6.4 Image Upload Popup Redirecting to Login Page

Hey there, sorry to hear you've been stuck on this frustrating image upload issue for hours—let's break down the most common fixes that resolve this exact problem in OpenCart 1.5.6.4:

  • Check Admin Session & Cookie Settings

    1. Log into your admin panel and navigate to System > Settings > Edit > Server tab
    2. Make sure Session Lifetime is set to a reasonable value (like 3600 seconds/1 hour) — too short a lifetime can cause sessions to expire mid-upload
    3. Verify Cookie Domain and Cookie Path are configured correctly:
      • For a main domain like yourstore.com, set Cookie Domain to .yourstore.com (note the leading dot) and Cookie Path to /
      • For a subdomain like store.yourstore.com, use .store.yourstore.com and /
    4. Save changes, clear your browser's cache and cookies, then log back in to test uploads
  • Fix File & Folder Permission Issues

    1. On your server, set permissions for admin/controller/common/filemanager.php and admin/model/tool/image.php to 644
    2. Ensure the admin/image, image/data, and image/cache folders have permissions set to 755 — the PHP user needs write access to these directories for uploads to work properly
    3. If you're unsure how to adjust permissions, use your hosting control panel's file manager or an FTP client
  • Resolve HTTPS/URL Rewrite Conflicts

    1. If your site uses HTTPS, double-check the admin/config.php file for correct HTTPS definitions:
      define('HTTPS_SERVER', 'https://yourstore.com/admin/');
      define('HTTPS_CATALOG', 'https://yourstore.com/');
      
    2. If you're using URL rewriting (mod_rewrite), inspect your .htaccess file to ensure there are no rules incorrectly redirecting admin panel requests, especially those targeting the File Manager's AJAX endpoints
  • Temporarily Disable Security Extensions
    Some third-party security plugins (like login limiters or captcha tools) can misidentify the File Manager's popup requests as unauthorized access, triggering a redirect to the login page. Try:

    1. Renaming the plugin's directory via FTP (e.g., change admin/extension/module/security-plugin to security-plugin-disabled)
    2. Test image uploads again — if it works, adjust the plugin's settings or find an alternative that doesn't interfere with the File Manager
  • Rule Out Custom Theme/Modification Issues

    1. Switch back to the default admin theme temporarily to see if the upload works — custom themes sometimes modify session handling code in admin/view/template/common/header.tpl that breaks the popup
    2. If you've modified core files related to sessions or file management, revert those changes (or restore from a backup) to check if that's the root cause

Try these steps one by one—most users fix this issue with the first two checks. Let me know if you hit any snags along the way!

内容的提问来源于stack exchange,提问作者unitSphere

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 04:05:41