Page 2 of 2

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Thu Sep 22, 2016 3:07 pm
by pprmkr
Older 1.5 versions used image/data, new versions use image/catalog.

Did you rename image folder /data/ to /catalog/ ?
What is stored in database product table in column image ?
Double check config files. Is DIR_IMAGE the full path to image folder ?
What do you see when opening filemanager ?

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Thu Sep 22, 2016 4:40 pm
by paulfeakins
cyclops12 wrote:well there is a definate problem there as in 2.3.0.2 the modules are in admin/controller/extension/module instead of admin/controller/module/
I believe this is a deliberate re-structure?

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Thu Sep 22, 2016 5:04 pm
by BooWho
pprmkr wrote:Older 1.5 versions used image/data, new versions use image/catalog.

Did you rename image folder /data/ to /catalog/ ?
What is stored in database product table in column image ?
Double check config files. Is DIR_IMAGE the full path to image folder ?
What do you see when opening filemanager ?
In the image folder, there is both a "catalog" and a "data" folder. There is certainly some redundancy in those folders but they are not exactly duplicate. I did not rename anything there.
In the database, images are referenced to "catalog" folder.
In config.php file in the root folder, Line 18: define('DIR_IMAGE', '/home2/quasmo/public_html/store/image/');
I haven't been able access image files from the OC front end, I received the error message in the header of this thread, when I try to access or upload image files.
Thanks for your help.

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Fri Sep 23, 2016 2:20 am
by cyclops12
paulfeakins wrote:
cyclops12 wrote:well there is a definate problem there as in 2.3.0.2 the modules are in admin/controller/extension/module instead of admin/controller/module/
I believe this is a deliberate re-structure?
Hi paulfeakins yes i know this is a deliberate re-structure but the OP had this as one of his errors
"2016-09-14 7:49:12 - PHP Notice: Indirect modification of overloaded property ControllerModuleInformation::$data has no effect in /home/quasmo/public_html/store/admin/controller/module/information.php on line 20"
But this is not the structure of 2.3.0.2 so there is a problem there, that was all i was saying :)

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Sun Jan 01, 2017 7:11 pm
by joe_mm
Was this ever resolved? I'm facing the same problem.

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Mon Jan 30, 2017 4:52 am
by celticgi
Guys - anybody have any ideas on this. I just upgraded also to 2.3 and cant see the images on the frontend.

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Wed Apr 05, 2017 11:42 pm
by kslakhani
May be I am late but could be useful to lates like me ;D
you need to modify both config.php files one in the root of your installation dir and the other in your installation/admin dir
you will find like define('DIR_IMAGE', '/home/htdocs/[your installation dir]//image/'); here you will find double back slash just remove one of those and save
do with all of them paths if neccessary
this is not a developers fault ofcourse bc some server supports double back slash "//" and some not

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Mon Jan 22, 2018 7:16 pm
by jics
I have been getting the same error and found the issue was related to the following condition in filemanager.php (210):

Code: Select all

if (!is_dir($directory) || substr(str_replace('\\', '/', realpath($directory)), 0, strlen(DIR_IMAGE . 'catalog')) != str_replace('\\', '/', DIR_IMAGE . 'catalog')) {
My DIR_IMAGE in both config files was /home5/.../image/ as per the file structure of my host. However, the realpath($directory) was returning /home/.../image/

Once I updated my config to be /home/.../image/ everything started working fine again.

Hope this helps someone with the same issue.

Re: Opencart Image "Warning: Directory does not exist!"

Posted: Sun Oct 18, 2020 9:00 am
by jkkenzie
Late but anyone new can find it useful!
It seems the DIR_IMAGE requires an ABSOLUTE Path like define('DIR_IMAGE', 'D:/wamp/www/projectname/image/'); or define('DIR_IMAGE', 'Home/public_html/image/');

I mean exact path.