osCmax v2.5 User Manual
Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By michael_s

Images directory mystery...

This is a discussion on Images directory mystery... within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; I just installed a fresh copy of osCMax v2.0.25 and like many others I have the problem with the images ...

      
  1. #1
    Lurker
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0


    Default Images directory mystery...

    I just installed a fresh copy of osCMax v2.0.25 and like many others I have the problem with the images directory in my admin panel.
    I have tried everything I found on the forum and everything else I was able to find online but no luck...
    I know that the issue is connected with the configure.php files but I cannot seem to get the right path for mine...I guess...
    would like to start using oscmax but without images directory I cant...
    can someone help?
    I already tried to set the permission to 777

    here is my admin/include/configure.php file...

    PHP Code:
    <?php
    define
    ('HTTP_SERVER''http://www.mydomainname.com/oscmax'); // your domain name
    define('HTTP_CATALOG_SERVER''http://www.mydomainname.com.com/oscmax'); // your domain name
    define('HTTPS_CATALOG_SERVER''http://www.mydomainname.com/oscmax'); // your domain name
    define('ENABLE_SSL_CATALOG''false');
    define('DIR_FS_DOCUMENT_ROOT''/homepages/5/123456789/htdocs'); // your local path. (eg, /usr/local/apache/htdocs) - where your catalog folder is located on the server - very important: path shouldnt end with /
    define('DIR_WS_ADMIN''/admin/');
    define('DIR_FS_ADMIN'DIR_FS_DOCUMENT_ROOT DIR_WS_ADMIN);
    define('DIR_WS_CATALOG''/homepages/5/123456789/htdocs/oscmax/');
    define('DIR_FS_CATALOG'DIR_FS_DOCUMENT_ROOT DIR_WS_CATALOG);
    define('DIR_WS_IMAGES''images/');
    define('DIR_WS_ICONS'DIR_WS_IMAGES 'icons/');
    define('DIR_WS_CATALOG_IMAGES'DIR_WS_CATALOG 'images/');
    define('DIR_WS_INCLUDES''includes/');
    define('DIR_WS_BOXES'DIR_WS_INCLUDES 'boxes/');
    define('DIR_WS_FUNCTIONS'DIR_WS_INCLUDES 'functions/');
    define('DIR_WS_CLASSES'DIR_WS_INCLUDES 'classes/');
    define('DIR_WS_MODULES'DIR_WS_INCLUDES 'modules/');
    define('DIR_WS_LANGUAGES'DIR_WS_INCLUDES 'languages/');
    define('DIR_WS_CATALOG_LANGUAGES'DIR_WS_CATALOG 'includes/languages/');
    define('DIR_FS_CATALOG_LANGUAGES'DIR_FS_CATALOG 'includes/languages/');
    define('DIR_FS_CATALOG_IMAGES'DIR_FS_CATALOG 'images/');
    define('DIR_FS_CATALOG_MODULES'DIR_FS_CATALOG 'includes/modules/');
    define('DIR_FS_BACKUP'DIR_FS_ADMIN 'backups/');
    define('DIR_FS_CACHE''tmp/'); // its better to create if not exist
    define('DIR_FS_DOWNLOAD'DIR_FS_CATALOG 'download/');
    define('DIR_FS_DOWNLOAD_PUBLIC'DIR_FS_CATALOG 'pub/');
    define('DB_SERVER''myweb.server.net');
    define('DB_SERVER_USERNAME''1234abcd'); // your database username
    define('DB_SERVER_PASSWORD''*******'); // your database password
    define('DB_DATABASE''12345678'); // your database name
    define('USE_PCONNECT''false');
    define('STORE_SESSIONS''mysql');
    ?>

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Images directory mistery...

    What are your current settings for Dynamic Mopics?

    Thumbnails --> thumbs/
    Large Images --> images_big/

    What exactly is the problem? You are looking in the admin panel and which images are missing?

    The installer should set all of the configure file for you ... then you need to control the images through the admin panel using Dynamic Mopics menu.

    Regards,
    pgmarshall
    _______________________________

  3. #3
    Lurker
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0


    Default Re: Images directory mistery...

    Mopics paths are images/images_big and images/thumbs
    No images are missing but when I was in the admin panel and I clicked on catalog I got this error message:
    Error: Catalog images directory does not exist: /homepages/5/123456789/htdocs/homepages/5/123456789/htdocs/oscmax/images/
    Just figured out something was wrong in the path for the DIR_WS_CATALOG in my configure.php file.
    I just changed from /homepages/5/123456789/htdocs/oscmax to /oscmax/ (my store catalog folder directory) and the error disappeared.
    I am posting it so anyone else having same kind of issue can try to solve it. I have seen a lot of posts about the same type of error, but there are many different hints and suggestions. I think it is mostly a matter of making sure the configure.php file in the admin/include directory has the right absolute path for everything.
    Thank you for you reply pgmarshall.

  4. #4
    JRR
    JRR is offline
    Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    52
    Rep Power
    3


    Default Re: Images directory mistery...

    The error message "Error: Catalog images directory is not writeable" is not specific enough. It actually refers to sub-directories of /images - it just doesn't tell you WHICH sub-directories - someone may want to edit this error message someday...

    For example, in Dynamic Mopics you need to chmod 777 only /images/images_big and /images/thumbs directories, you do not chmod the /images directory, as that won't solve the problem!

    This seems to be a bug (or a not easily understood feature), in that I would expect that the 'user' (admin) should be enough of a clearance to change the images as you work on them from the admin directory. Some sort of script is needed to change the directory permissions during access to 777, then return them to 755 afterwards...
    Last edited by JRR; 06-28-2010 at 10:48 AM.

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Images directory mystery...

    Permissions are recursive, so that error message is sufficient. Just chmod -R the images directory. Problem solved. A few seconds of reading and perhaps checking the image path in the browser will lead even the most uninformed to the correct solution in a few minutes.

    The whole permissions thing is being worked on for osCmax v2.1 to make it more easy for those that are ignorant regarding permissions.

    Unfortunately it is not as easy as you seem to assume. Webservers can be configured many ways, and a server that requires 777 permissions to write/upload is a security risk. Servers configured with more attention to security do not have this requirement and actually do not allow 777 permissions on any directory. Coding in something to change permissions to match a single server configuration is shortsighted and insecure. We are working on the documentation to give more examples, but it really depends on the server configuration as to what the correct permissions are.

    For instance all the servers that I manage osCmax sites on are configured with suphp which allows a maximum directory permission of 755, and allows for proper writing of image. 777 is not allowed on these servers due to the obvious security hole it creates and will cause a 500 Internal Server Error if a dir is set to 777.

    I would expect that the 'user' (admin) should be enough of a clearance to change the images as you work on them from the admin directory
    Again an unrealistic expectation. It fully depends on the server configuration. osCmax's default permissions are set for security, not convenience. If you install osCmax on a server running mod_php you will manually have to change permissions to be insecure. If you are running suphp or php_cgi, no permissions settings are needed, and osCmax's default permissions will be fine for all reading and writing of files.
    JRR likes this.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: Images directory mystery...

    Hear, hear, Boss
    If the server environment is setup correctly in the first place, then there is no need to change the defaults presented to you during installation (referring specifically to the configure paths).
    [Crawls back under a stone]
    Hosting plans with installation, configuration, contributions, support and maintenance.

  7. #7
    JRR
    JRR is offline
    Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    52
    Rep Power
    3


    Default Re: Images directory mystery...

    Quote Originally Posted by michael_s View Post
    If you install osCmax on a server running mod_php you will manually have to change permissions to be insecure. If you are running suphp or php_cgi, no permissions settings are needed, and osCmax's default permissions will be fine for all reading and writing of files.
    This was what I had been looking for, what the server settings need to be, thanks very much Michael, when I sent the bit above to my host (Pair.net) they promptly popped back with:

    -----------(quote)-------------
    You can run PHP as a CGI by copying the CGI version of PHP to your own
    cgi-bin directory. To do so run this command from your home directory:

    cp /usr/www/cgi-bin/php5.cgi ~/public_html/cgi-bin

    Then you must create a .htaccess file in the directory where your PHP files
    reside, and add these lines:

    Action application/x-pair-sphp /cgi-bin/php5.cgi
    AddType application/x-pair-sphp .php
    ------------(end quote)---------

    I did that and now everything works as it should...

    John :-#)#

Similar Threads

  1. Error: Catalog images directory is not writeable:
    By JRR in forum osCmax v2 Installation issues
    Replies: 7
    Last Post: 02-17-2010, 12:08 PM
  2. Too many images in the image directory
    By Anomily in forum osCmax v2 Customization/Mods
    Replies: 14
    Last Post: 09-12-2008, 07:05 AM
  3. Changing default /images directory
    By MindTwist in forum osCmax v2 Customization/Mods
    Replies: 8
    Last Post: 08-30-2007, 02:31 AM
  4. Separate directory for product images
    By Twister in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 06-15-2007, 03:03 AM
  5. Error: Catalog images directory is not writeable:
    By shellarts in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 06-07-2005, 06:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •