Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Localhost: problems with admin - images directory permissions and more...

This is a discussion on Localhost: problems with admin - images directory permissions and more... within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; Using Xampp on OSX 10.6.8 and have sorted out the setup of both OSCMax 2.0.25 and the database - and ...

      
  1. #1
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Localhost: problems with admin - images directory permissions and more...

    Using Xampp on OSX 10.6.8 and have sorted out the setup of both OSCMax 2.0.25 and the database - and the 'store' side looks fine and seems to work properly with no error messages, however when I go into 'admin' and then drill down to the products the categories page gives me the following error message twice "Error: Catalog images directory does not exist: /mystore/catalog/images/"

    Have set images directory with proper permissions - read/write for everyone.

    Below is my admin/includes/local/configure.php

    <?php
    define('HTTP_SERVER', 'http://localhost/~username/www');
    define('HTTP_CATALOG_SERVER', 'http://localhost/~username/www');
    define('HTTPS_CATALOG_SERVER', 'http://localhost/~username/www');
    define('ENABLE_SSL_CATALOG', 'false');
    define('DIR_FS_DOCUMENT_ROOT', '/mystore/catalog/');
    define('DIR_WS_ADMIN', '/mystore/catalog/admin/');
    define('DIR_FS_ADMIN', '/mystore/catalog/admin/');
    define('DIR_WS_CATALOG', '/mystore/catalog/');
    define('DIR_FS_CATALOG', '/mystore/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('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'xyz');
    define('DB_SERVER_PASSWORD', 'abc');
    define('DB_DATABASE', 'store_dbase');
    define('USE_PCONNECT', 'false');
    define('STORE_SESSIONS', 'mysql');
    ?>

    If I change the line: define('DIR_FS_CATALOG', '/mystore/catalog/'); to define('DIR_FS_CATALOG', '../'); (suggested somewhere), then I get the error message "Error: Catalog images directory is not writeable: ../images/"

    Can't find backups either: "Error: Backup directory does not exist. Please set this in configure.php". Directory is where it is supposed to be...

    This only appears in the localhost environment, the online version works happily - of course it is not using the localhost version of configure.php in the (renamed) admin directory.

    Pretty sure I am overlooking something really obvious here, but there is not a lot of info out there on setting up the localhost environment for OSC under OSX.

    As an aside, in Firefox (13.0.1) I have no problems with logging onto the 'admin' on localhost, however Safari (5.1.7) - while the login window appears - login refuses to accept the login name and password, blanks out the name and password field as if I just launced the program. I've reset the password a couple of times under Firefox, and have cleared the cache and tried running Safari in Private mode to avoid cache issues, no success.
    I have also allowed 'localhost' and '127.0.0.1' in Preferences, Network, Advanced, Proxies, Bypass proxy settings for these Hosts & Domains (no change in either case).
    Weird.

    Thanks!

  2. #2
    Member
    Join Date
    Mar 2011
    Location
    Croydon (Melbourne), Victoria, Australia
    Posts
    34
    Rep Power
    0


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Hi

    Try adding write permissions at the parent directory level. It might be that while the images directory is open, the permissions on the parent prevent getting inside the catalog directory to use it.

    cheers
    Tony

  3. #3
    Member
    Join Date
    Mar 2011
    Location
    Croydon (Melbourne), Victoria, Australia
    Posts
    34
    Rep Power
    0


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Hi

    Try adding write permissions at the parent directory level. It might be that while the images directory is open, the permissions on the parent prevent getting inside the catalog directory to use it.

    cheers
    Tony

  4. #4
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Nope, no change. I have tried changing the permissions for catalog/images (everyone read/write (R/W)) as well as the files inside to also be R/W- no change. Also your idea of setting catalog itself to R/W for everyone with no change to the error message.

    I have a feeling this is some permission in OSX that I am missing that is only related to 'localhost' operations - however extensive searching for localhost settings has not (so far) given me a solution. Still I will hunt longer tonight and if I find a solution I certainly will post it!

    John :-#(#

  5. #5
    Member
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    78
    Rep Power
    21


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Here are the settings I use for the teststore I run on my laptop.

    I cant remember what problem it was I had using localhost, but ended up using the computer name. Think it may have just been so other computers on the network could browse the site.

    <?php
    define('HTTP_SERVER', 'http://medion-laptop');
    define('HTTPS_SERVER', 'http://medion-laptop');
    define('ENABLE_SSL', false);
    define('HTTP_COOKIE_DOMAIN', 'medion-laptop');
    define('HTTPS_COOKIE_DOMAIN', 'medion-laptop');
    define('HTTP_COOKIE_PATH', '/~scott/teststore/catalog/');
    define('HTTPS_COOKIE_PATH', '/~scott/teststore/catalog/');
    define('DIR_WS_HTTP_CATALOG', '/~scott/teststore/catalog/');
    define('DIR_WS_HTTPS_CATALOG', '/~scott/teststore/catalog/');
    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
    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_DOWNLOAD_PUBLIC', 'pub/');
    define('DIR_FS_CATALOG', '/home/scott/public_html/teststore/catalog/');
    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'oscmax_teststore');
    define('DB_SERVER_PASSWORD', 'password');
    define('DB_DATABASE', 'oscmax_teststore');
    define('USE_PCONNECT', 'false');
    define('STORE_SESSIONS', 'mysql');
    ?>

  6. #6
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Have tried similar settings with no success - Admin and the store run fine until they bump into a directory that they have to write to then either (admin) complains that the directory doesn't exist or (the store) the shopping cart refuses to add the item selected.

    Suggestions most welcome, I've spent days trying to solve this...this is localhost running under either xampp or mamp (no difference in results) on an OSX 10.6.8 machine.

  7. #7
    Member
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    78
    Rep Power
    21


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Have you changed your DIR_FS_... and DIR_WS... variables? Yours all look the same, though the FS ones should be the complete path on you system, and the WS ones should be the URL path.

    Here is my admin config (other one I posted was my store config);
    define('HTTP_SERVER', 'http://medion-laptop');
    define('HTTP_CATALOG_SERVER', 'http://medion-laptop');
    define('HTTPS_CATALOG_SERVER', 'http://medion-laptop');
    define('ENABLE_SSL_CATALOG', 'false');
    define('DIR_FS_HOST_ROOT', '/home/scott/public_html/teststore/catalog/install/templates/pages');
    define('DIR_FS_DOCUMENT_ROOT', '/home/scott/public_html/teststore/catalog/');
    define('DIR_WS_ADMIN', '/~scott/teststore/catalog/ts_admin/');
    define('DIR_FS_ADMIN', '/home/scott/public_html/teststore/catalog/ts_admin/');
    define('DIR_WS_CATALOG', '/~scott/teststore/catalog/');
    define('DIR_FS_CATALOG', '/home/scott/public_html/teststore/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 our database connection
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'oscmax_teststore');
    define('DB_SERVER_PASSWORD', 'password');
    define('DB_DATABASE', 'oscmax_teststore');
    define('USE_PCONNECT', 'false');
    define('STORE_SESSIONS', 'mysql');

    (Ignore DIR_FS_HOST_ROOT in my config. No idea why it is set to that, but the store does seem to work :S)

    Looking at your config, I'd take out the ~username/,,, from the HTTP_SERVER definitions and change you DIR_FS_... definitions to the full filesystem path and the DIR_WS_... ones to the full URL path (not including localhost).

    I've never been an apple user so no idea if it could be your permissions. But your config does not look right to me.

  8. #8
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Re: Localhost: problems with admin - images directory permissions and more...

    I am quite convinced it is in one (or more) lines of admin/local/configure.php running in localhost on OSX 10.6.8


    define('DIR_FS_CATALOG', '/Users/johnrobertson/Sites/www/mystore/catalog/');

    So the question I am having a heck of a time finding the answer to is what is the 'absolute' address for my localhost site?

    According to OSX (command-I) the directory is as above, but it simply can't be quite right.I've tried many variations /Users/~johnrobertson/Sites/www/mystore/catalog, /~johnrobertson/Sites/www/mystore/catalog, johnrobertson/www/mystore/catalog, etc but no joy.

  9. #9
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Re: Localhost: problems with admin - images directory permissions and more...

    Here is the current mostly working localhost (Xampp osx 10.6.8 admin/localhost/configure.php

    define('HTTP_SERVER', 'http://localhost'); //without full path image not shown in catagories/products
    define('HTTP_CATALOG_SERVER', 'http://localhost');
    define('HTTPS_CATALOG_SERVER', 'http://localhost');
    define('ENABLE_SSL_CATALOG', 'false');
    define('DIR_FS_DOCUMENT_ROOT', '/Users/johnrobertson/Sites/www/mystore/catalog/'); //the absolute path to your shop, e.g. /home/user/public_html/shop/
    define('DIR_WS_ADMIN', '/~johnrobertson/www/mystore/catalog/admin/'); //path to admin continued from HTTP_SERVER
    define('DIR_FS_ADMIN', '/Users/johnrobertson/Sites/www/mystore/catalog/admin/'); // the absolute path to the admin folder, e.g. /home/user/public_html/shop/admin/
    define('DIR_WS_CATALOG', '/~johnrobertson/www/mystore/catalog/'); //path to catalog continued from HTTP_SERVER
    define('DIR_FS_CATALOG', '/Users/johnrobertson/Sites/www/mystore/catalog/'); // the absolute path to your shop, e.g. /home/user/public_html/shop/
    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/');

    Error message on Admin/Categories: (repeated twice as shown):
    Error: Catalog images directory is not writeable: /Users/johnrobertson/Sites/www/mystore/catalog/images/
    Error: Catalog images directory is not writeable: /Users/johnrobertson/Sites/www/mystore/catalog/images/

    Backups do work properly now with the current (above) admin/configure.php - very close now to the root of the problem!

    Checked permissions for images directory and they are correct "drwxrwxrwx" (777).
    Images directory not writeable is the last remaining problem...
    Last edited by JRR; 07-13-2012 at 03:50 PM. Reason: updating

  10. #10
    JRR
    JRR is offline
    Active Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    159
    Rep Power
    17


    Default Re: Localhost: problems with admin - images directory permissions and more...

    SOLVED!

    Found the solution to my localhost not writing to the images directory. Was in the Apache2 settings in file httpd.conf which in XAMPP is located in /Applications/XAMPP/xamppfiles/etc directory. Following the instructions on this web page I changed (all in httpd.conf file):

    1) Changed User from yourusername to my username (johnrobertson in this case)

    2) Changed the DocumentRoot from "/Users/yourusername/yoursiteroot" to "/Users/johnrobertson/Sites/www"

    and 3) Changed <Directory "/Users/moo/code/joomla/mobilejoomla_dev"> to <Directory "/Users/johnrobertson/Sites/www">

    (check that ServerName is localhost too).

    What is interesting is I did not have to edit my local/configure.php file to get rid of the 'not writeable' issue. I do not understand how Apache2 works, but all looks well for now. Hope this helps someone!

    John :-#)#
    Note that these setting are all under OSX 10.6.8 - your mileage will vary...

Page 1 of 2 12 LastLast

Similar Threads

  1. localhost and server results for images are different
    By l_frank_t in forum Bugs and Problems
    Replies: 3
    Last Post: 04-30-2012, 10:14 PM
  2. Cannot login for 1st time using admin@localhost.
    By pdacruz in forum Introduce yourself!
    Replies: 2
    Last Post: 08-20-2010, 03:51 PM
  3. Admin Trouble: "Catalog images directory does not exist
    By 24hourcampfire in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 05-09-2006, 12:10 PM
  4. Testing on Localhost Problems
    By demkin in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 02-01-2005, 09:44 AM
  5. directory permissions - noob help required
    By jayr in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 11-25-2002, 04:17 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
  •