500 Internal Server Error in filemanager after upgrading Open Cart 1.5.6.1 to 1.5.6.4

StackOverflow https://stackoverflow.com/questions/23433692

  •  14-07-2023
  •  | 
  •  

문제

I have just upgraded my OC shop from 1.5.6.1 to 1.5.6.4 and now every time I go to add an image to a product, as soon as I click on the "Browse" link, the image manager pop up shows up empty and I get the following error (in firebug):

"NetworkError: 500 Internal Server Error - http://example.com/admin/index.php?route=common/filemanager&token=[...]&field=image1"

Steps to reproduce the issue:

  1. Go to Catalog->Products and edit a product
  2. Go to Image tab
  3. Click Browse

Here is the error I'm receiving in my server logs (but not in System->Error Logs):

[Fri May 02 10:38:44 2014] 
[warn] 
[client IP Removed] 
mod_fcgid: stderr: 
PHP Parse error:  syntax error, unexpected ';', expecting T_FUNCTION in /var/www/vhosts/example.com/httpdocs/admin/controller/common/filemanager.php on line 498, 
referer: http://example.com/admin/index.php?route=catalog/product/update&product_id=400&token=7c96a8e340e4bc680e887abf97ec4def

Line 498 is the very last line on filemanager.php (the closing php tag line)

enter image description here

도움이 되었습니까?

해결책

Compare your filemanager.php to the original file from OpenCart distribution and replace it if needed. The original file has only 497 lines.

다른 팁

I had faced same sought of similar issue. For resolution, i raised the ticket with my hosting support and then they Disabled the set_time_limit from their side. This was actually causing the problems for me.

So, would request you to request your hosting provider disable the set_time_limit.

I've had issues with OC File Manager when images in the cache (image/cache/data/) directory don't match with those in the data (image/data/) directory. In the cache directory, OC stores other resized thumbnails of the uploaded images. My assumption is that when you open file manager OC checks if all thumbnails are available per the set image sizes under store settings. If not, it creates them hence taking longer to respond depending on how many images it has to fix.

A fresh installation of OC 1.5.6.4 not only doesn't have this issue, but the file only has 497 lines. I would suggest you

  1. Backup the original filemanager.php file
  2. Replace it with one from the 1.5.6.4 download package here
  3. Reload and check again for errors

If this still reoccurs then the cause is probably strange spacing/encoding/special characters in that file itself, or in the parent file doing the inclusion of that one.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top