Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin Access 2.2c Error Message Help Request


Guest

Recommended Posts

Hello,

 

I'm new to OSC and the forum and I would greatly appreciate your help with answering a question.

 

I've installed Access with Level Account (v. 2.2) for the Admin Area of osCommerce (MS2).

 

I receive the following error messages when I click on File Access and click on any "Store Files" category button:

 

Warning: dir(/home/dprentiss/domains/glass-rocks.com/public_html/admin/): failed to open dir: No such file or directory in /home/dprentiss/domains/mywebsite.com/public_html/shop/admin/admin_files.php on line 235

 

Fatal error: Call to a member function on a non-object in /home/dprentiss/domains/mywebsite.com/public_html/shop/admin/admin_files.php on line 237

 

I could not find any information in the forum that would help me resolve the issue. It appears to me that the directory that is being sought is not defined correctly as being under the "shop" directory, but I do not know how to correct the problem.

 

Thank you in advance for your help.

 

Best regards,

 

Dick

Edited by dreamlab
Link to comment
Share on other sites

  • 4 months later...
Hello,

 

I'm new to OSC and the forum and I would greatly appreciate your help with answering a question.

 

I've installed Access with Level Account (v. 2.2) for the Admin Area of osCommerce (MS2).

 

I receive the following error messages when I click on File Access and click on any "Store Files" category button:

 

Warning: dir(/home/dprentiss/domains/glass-rocks.com/public_html/admin/): failed to open dir: No such file or directory in /home/dprentiss/domains/mywebsite.com/public_html/shop/admin/admin_files.php on line 235

 

Fatal error: Call to a member function on a non-object in /home/dprentiss/domains/mywebsite.com/public_html/shop/admin/admin_files.php on line 237

 

I could not find any information in the forum that would help me resolve the issue. It appears to me that the directory that is being sought is not defined correctly as being under the "shop" directory, but I do not know how to correct the problem.

 

Thank you in advance for your help.

 

Best regards,

 

Dick

 

 

I got this same error and was having alot of trouble working it out, this is what I can understand.

 

The line it refers to in admin_files.php is:

 

$dir = dir(DIR_FS_ADMIN);

 

Notice in the first line of the Warning the path is showing in your case public_html/admin - that should say public_html/shop/admin.

 

However in configure.php DIR_FS_ADMIN shows:

 

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

 

So this means that it will go to public_html/admin - which doesn't exist because admin is inside catalog or shop in your case.

 

My solution was to change $dir = dir(DIR_FS_ADMIN); to $dir = dir(DIR_FS_CATALOG); and it appears to work.

 

(However, I would like to know why this occurs?

 

I don't know if it's affected by another Contrib (I have a few installed), and considering I haven't been able to find any other information on this also, it doesn't seem to be a common problem.

 

I guess I'm just concerned because by default - the Contrib appears to work for others without making this change, or else I'm guessing there would be more people with this problem?)

 

:blush:

Link to comment
Share on other sites

I got this same error and was having alot of trouble working it out, this is what I can understand.

 

The line it refers to in admin_files.php is:

 

$dir = dir(DIR_FS_ADMIN);

 

Notice in the first line of the Warning the path is showing in your case public_html/admin - that should say public_html/shop/admin.

 

However in configure.php DIR_FS_ADMIN shows:

 

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

 

So this means that it will go to public_html/admin - which doesn't exist because admin is inside catalog or shop in your case.

 

My solution was to change $dir = dir(DIR_FS_ADMIN); to $dir = dir(DIR_FS_CATALOG); and it appears to work.

 

(However, I would like to know why this occurs?

 

I don't know if it's affected by another Contrib (I have a few installed), and considering I haven't been able to find any other information on this also, it doesn't seem to be a common problem.

 

I guess I'm just concerned because by default - the Contrib appears to work for others without making this change, or else I'm guessing there would be more people with this problem?)

 

:blush:

 

:blush: Ok, fix one problem encounter another. I'm concerned about the change because there files that are in /catalog appearing in the pulldown menu.

There must be problem in admin_files.php or another file to do with the Contribution (or a conflict or Contribs).

Edited by Thenes
Link to comment
Share on other sites

:blush: Ok, fix one problem encounter another. I'm concerned about the change because there files that are in /catalog appearing in the pulldown menu.

There must be problem in admin_files.php or another file to do with the Contribution (or a conflict or Contribs).

 

Okay, that is not a fix.

 

While it does stop the error under Administrator > File Access - the path brings up the wrong folder in the pull down menu - meaning you'll see all the files in /catalog - instead of /catalog/admin.

 

This will cause issue if you accidentally remove files.

 

The only way to get them back is to edit admin/includes/configure.php and put the local path in $Document_Root (in my case I had to add /catalog on the end of it.)

 

This will show the correct files in the pulldown menu and allow you to store the files once again - however I found, that this breaks other things in admin such as the path to images etc.

 

Setting the path back to $Document_Root returns Admin back to normal but File Access doesn't function properly.

 

Mind you this is with the original setting of

 

$file_dir = array();

$dir = dir(DIR_FS_ADMIN);

 

and not the change I suggested before. :(

 

I'll keep working on it.

Link to comment
Share on other sites

:blush:

 

Okay I think I have it worked out (I probably should've listened to my administrator to begin with!).

 

It will be something in the admin/includes/configure.php

 

For myself I had to replace values with the absolute path.

 

Eg. The original configure.php is something like this:

 

define('HTTP_SERVER', 'https://www.yourdomain.com/catalog'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com');

define('HTTPS_CATALOG_SERVER', ''http://www.yourdomain.com);

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_WS_CATALOG', '/catalog/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

Edited configure.php

 

define('HTTP_SERVER', 'https://www.yourdomain.com/catalog'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com');

define('HTTPS_CATALOG_SERVER', 'https://www.yourdomain.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/youdomain/httpdocs/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', '/var/www/vhosts/yourdomain/httpdocs/catalog/admin/');

define('DIR_WS_CATALOG', '/catalog/');

define('DIR_FS_CATALOG', '/var/www/vhosts/yourdomain/httpdocs/catalog/');

 

Of course you'll have to use your own paths, and it may differ, so the above is just for example.

 

:) Hope my fumbling through it helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...