preload
Mar 02

I admin a OSCommerce store for a client. I recently moved his store from one domain to another. When I got the store up an running I was seeing the following error:

Error: Catalog images directory does not exist

After double checking that the owner of the dir was correct and the permissions were 777 I moved on to the two configure.php files.

The fix is in the admin/includes/configure.php change the line:

define(‘DIR_FS_CATALOG_IMAGES’, DIR_WS_CATALOG . ‘images/’);
to
define(‘DIR_FS_CATALOG_IMAGES’, ‘../images/’);

17 Responses to “OSCommerce Error: Catalog images directory does not exist”

  1. Pboucherie Says:

    Thanks for this solutions.

    It solves my problem on my computer

  2. vin Says:

    Thnx! Fixed my problem as well!

  3. noone Says:

    That is NOT the best way to fix this problem! When you set up the shopping cart for the first time you set the path to the root directory of OsCommerce on the hosting server.

    The path looked something like this:

    /home/myusername/myurl/catalog/

    You have to fin out what the path is to the catalog folder on the new server, and change the code.

    The code is in the two configure.php files. These files are located in the includes/ directory and the admin/includes/ drectory.

    they look something like this:

    define(‘DIR_FS_CATALOG’, ‘/home/myusername/myurl/catalog/’);

    There is one line to fix in the includes/configure.php file, and 3 or 4 lines to fix in the admin/includes/configure.php file.

    The fix described obove may work in the short-term, but it is not a fix!

  4. Alexandru G. Says:

    You are the best :) thanks a lot!

  5. ronnie Says:

    I might have a newer version, but in case some one else is pulling their hair out like I was. My error affected both the images problem and header tags, of course it was incorrect path affecting both, so my fix killed two birds with one stone.

    I changed the the following:

    define(‘DIR_FS_DOCUMENT_ROOT’, $DOCUMENT_ROOT);

    to:

    define(‘DIR_FS_DOCUMENT_ROOT’, ‘/home/sites/user/myurl/htdocs/’);

    That was it. I think I over wrote my original configure file.

  6. Carjor Says:

    Gracias, muchas gracias. Me salvaste de verdad.

  7. elfofdark Says:

    I solve it simple. In configure.php i delete first / from ‘/catalog/’ => ‘catalog/’

    Just this and it works fine.

  8. Andres Says:

    Thanks, this is the solution :)

  9. Fixticks Says:

    my version of the problem was me i think.i installed it on my computer then upload to the server hoping to tweak alittle settings here and there n fix the issue.i tweaked but still that damn Error: Catalog images directory does not exist
    the above didnt work for me. later i suspected my
    define(‘DIR_FS_DOCUMENT_ROOT’, ‘/www/bulamu.com’);
    may be the problem.the site works yes but what if these sneaky hosts of mine did not tell me my full document root. to get it fast i looked for this
    this > define(‘DIR_WS_INCLUDES’, ‘includes/’);
    i changed it to this > define(‘DIR_WS_INCLUDES’, ‘/includes/’);
    ………..
    i got an error about a file not being found but the full path was clear stating the missing file some thing like /mnt/w0502/d48/s00/b0268149/www/bulamu.com/includes/sss.php is missing.

    i corrected the error i had made to the DIR_WS_INCLUDES and then updated
    define(‘DIR_FS_DOCUMENT_ROOT’, ‘/www/bulamu.com’);
    to
    define(‘DIR_FS_DOCUMENT_ROOT’, ‘/mnt/w0502/d48/s00/b0268149/www/bulamu.com’);

    save all changes to my admin/includes/configure.php file….uploaded..and Voila..
    the damn error vanished.felt good.

  10. Fixticks Says:

    also edited
    define(‘DIR_WS_CATALOG_IMAGES’, DIR_WS_CATALOG . ‘images/catalog’);
    to
    define(‘DIR_WS_CATALOG_IMAGES’, DIR_WS_CATALOG . ‘images/catalog/’);

    and
    define(‘DIR_FS_CATALOG_IMAGES’, DIR_FS_CATALOG . ‘/images/catalog/’);
    to
    define(‘DIR_FS_CATALOG_IMAGES’, DIR_FS_CATALOG . ‘/images/catalog’);

    it seems the FS directories should not have the last / at the end unlike the WS directories.
    i made sure that catalog directory exists and is 777.
    in my tinkerin i made the followin files 777
    /admin/includes/classes/upload.php
    /admin/categories.php

  11. Le Says:

    Thanx a lot…..

  12. João Dias Says:

    Hello, i have tested every single one of the configs that you show here, but min (error) is still there.

    Another issue is that in my test server with ezosc i cannot see any image:
    http://hobbymixpt.com/

  13. Chris Ward Says:

    what is the equivalent path for a windows NT server please?

  14. Muhammad Says:

    EXCELLENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Worked for mee

  15. leo Says:

    why does this work?
    why is it that there are no image directory errors in admin in one server, but when changing the files and database to another server (and editing the paths in the config files correctly) the error shows up in the other host server?

    another way of saying it is…

    in the first server the system is ok with this line:
    define(’DIR_FS_CATALOG_IMAGES’, DIR_WS_CATALOG . ‘images/’);

    in the next server the system doesn’t like that line anymore, instead it likes this line:
    define(’DIR_FS_CATALOG_IMAGES’, ‘../images/’);

    why is that?
    why can’t the same line work in both web hosting servers?

  16. optimizare Says:

    i had the same problem when my host has changed the servers.

    the last solution is working for me, thanx alot!

    this is a great place for solutions, i would like to see more of oscommerce issues here!

  17. Gianluca Says:

    thank you very much, I was looking for it and after 2 hours you given me this great solution!!!

Leave a Reply

You must be logged in to post a comment.