Post by rhorne » Tue Jun 06, 2017 6:56 pm

I've just upgraded our Opencart to 2.3.0.2 but am experiencing an issue with the image manager.

If I try and create a new folder, or upload an image to the root folder I receive a message stating:
Warning: Directory does not exist!

I can upload images to existing folders just fine.

Having researched this issue I can confirm that I have set Images and all subfolders permissions to 777 and I can confirm that the image folder is correct in my config.php and admin/config.php

I wonder if there's a fundamental issue with the image manager as I can't search within folders either. Whatever I type produces no results.

If I were to reinstall the image manager only, which folders would I need to re-upload?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by rjcalifornia » Tue Jun 06, 2017 7:55 pm

Are you sure the path is correct on both config.php files?

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by MrPhil » Tue Jun 06, 2017 8:58 pm

rhorne wrote:
Tue Jun 06, 2017 6:56 pm
Having researched this issue I can confirm that I have set Images and all subfolders permissions to 777
Not a good thing to do. 777 (world writable) permissions should be used only as a last resort, as they open you up to hacks by anyone sharing your server (they can overwrite your files). Directories are normally 755 and files 644, but you may need to add "write" permission 020 (775/664) if PHP is running in your group, or even 002 (777/666) if PHP is running as a random user. In the latter case, on a shared server it is good practice to change permissions back to 755/644 once you are done uploading files.

If your server is running something like suPHP, PHP is running as owner (you) and you can use the most restrictive permissions. Normally you will get a 500 error if you grant "world writable" permissions, but it's possible that you're either overlooking the error message, or it's being suppressed (and you just see a failure to access the directory). Anyway, try 755 directory permissions, and then 775, before going (temporarily) to 777. If none of that works, you've got some other problem to deal with, such as an incorrectly-specified path.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by rhorne » Tue Jun 06, 2017 9:10 pm

rjcalifornia wrote:
Tue Jun 06, 2017 7:55 pm
Are you sure the path is correct on both config.php files?
I believe so, and images wouldn't upload into the existing folders if these were incorrect, would they?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by rjcalifornia » Thu Jun 08, 2017 5:57 am

rhorne wrote:
Tue Jun 06, 2017 9:10 pm
rjcalifornia wrote:
Tue Jun 06, 2017 7:55 pm
Are you sure the path is correct on both config.php files?
I believe so, and images wouldn't upload into the existing folders if these were incorrect, would they?
Check again. Check if you have the path correctly

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by rhorne » Thu Jun 08, 2017 9:43 pm

rjcalifornia wrote:
Thu Jun 08, 2017 5:57 am
rhorne wrote:
Tue Jun 06, 2017 9:10 pm
rjcalifornia wrote:
Tue Jun 06, 2017 7:55 pm
Are you sure the path is correct on both config.php files?
I believe so, and images wouldn't upload into the existing folders if these were incorrect, would they?
Check again. Check if you have the path correctly
I definitely have the correct path. I say definitely because if I change the path, none of the product preview images load when viewing products. The fact that they all load correctly confirms the path is correct.

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by sculptex » Tue Jun 13, 2017 4:29 pm

As per MrPhil, this may be an owner issue. If you have SSH access, log in as that account to store root (public_html or whatever) and

Code: Select all

chown -R owner:owner *
where owner is the account owner related to that domain.
It seems whoever upgraded was logged in as a different user.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by rhorne » Wed Jun 14, 2017 3:21 pm

I ran the update - no-one else is involved in a technical capacity.

When you say owner, are we talking about my account within OpenCart?

Active Member

Posts

Joined
Wed Jan 18, 2012 3:07 am

Post by sculptex » Wed Jun 14, 2017 3:39 pm

No, the domain account, should be same as cpanel user, also username in path
/home/username/public_HTML or whatever.

If a superuser uploaded the upgrade files for you through ftp, those files and folders that were uploaded will have their ownership. It ties in exactly as root image folder is part of install but subfolders you already created would be your ownership.

It would take your hosting 10 seconds to resolve.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK
Who is online

Users browsing this forum: No registered users and 44 guests