Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

htaccess


zpupster

Recommended Posts

Posted

i had some problems with the links in the site i fixed that- i can not get the shopping cart or admin to work from recently imported site from one host to another.

 

 

anyway i want to get the admin to work so i can configure it

 

below is what i am working with

 

 

 

 

 

 

at the site/admin i am getting a 403 error

 

 

 

If you are the webmaster of this site please log in to Cpanel and check the Error Logs. You will find the exact reason for this error there.

Common reasons for this error are:

[*]Incorrect file/directory permissions: Below 644.

In order files to be read by the webserver, their permissions have to be equal or above 644. You can update file permissions with a FTP client or through cPanel's File Manager.

[*]Restrictive Apache directives inside .htaccess file.
There are two Apache directives which can cause this error - 'Deny from' and 'Options -Indexes'.


  •  

i checked the permissions to .htaccess it is 644

 

 

 

site error log shows this:

 

 

[Tue Oct 15 13:21:55 2013] [crit] [client ipno ] (13)Permission denied: /home/site/public_html/talk/apanel/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

 

 

 

htaccess file:

 

# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
# <IfDefine SSL>
# SetEnvIf User-Agent ".*MSIE.*" \
# nokeepalive ssl-unclean-shutdown \
# downgrade-1.0 force-response-1.0
# </IfDefine>
#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1

 

 

admin config:

 

 

<?php
define('HTTP_SERVER', 'http://site.com');
define('HTTP_CATALOG_SERVER', 'http://site.com');
define('HTTPS_CATALOG_SERVER', 'https://site.com');
define('ENABLE_SSL_CATALOG', 'true');
define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html/folder/');
define('DIR_WS_ADMIN', '/admin/');
define('DIR_FS_ADMIN', '/home/username/public_html/talk/admin/');
define('DIR_WS_CATALOG', '/folder/');
define('DIR_FS_CATALOG', '/home/username/public_html/');
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_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

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

Posted

A 403 error usually has 1 of 3 causes:

 

1. You don't own the file in question, and the permissions deny you read ability (plus, you can't chmod it). You usually need the server admin (support) to chown the file or directory.

 

2. You own the file or directory, but you don't have read permission for whoever is wanting to read it. This is a "4" value in the user, group, or other category. Note that the party wanting to read the file (such as PHP) may not necessarily be "owner". If the file has 644 permissions, regardless of who owns it, you should be able to read it.

 

3. Your host has a strangely configured "mod_security" that is unwittingly blocking access to file(s) or directorie(s), due to a bad configuration. Ask your host how to disable mod_security, to see if it has any effect. I'm surprised it would affect /.htaccess, but could very well affect /catalog/.htaccess and lower level ones.

 

By any chance, did you neglect to change the admin directory to some other name? Maybe mod_security is picking up on "admin" and thinking it's a hack attempt.

Posted

on this site i have upgraded to oscommerce 2.3.3.1. could that possibly have something to do with it??

 

but i have contacted my host to see what there opinion is.

Posted

now i am getting a different error:

 

Fatal error: require() [function.require]: Failed opening required '/home/username/public_html/includes/classes/action_recorder.php' (include_path='.:/usr/local/php53/pear') in/home/username/public_html/folder/admin/includes/classes/action_recorder.php on line 13

Posted

no problems now-- my htaccess file was not listed in the file manager from the cpanel.

 

the tech changed the permissions and there was one error in my configure.php file that was not there before when i posted due to

burn out working on this issue, i have a tendency not to ask for help but rather try to work these problems out myself.

 

what is the maximum amount of time you should work on a problem before reaching out??

 

anyway below are the config file contents if someone needs to compare.

 

 

 

admin/includes/configure.php

 

 

<?php
 define('HTTP_SERVER', 'http://site.com');
 define('HTTP_CATALOG_SERVER', 'http://site.com');
 define('HTTPS_CATALOG_SERVER', 'https://site.com');
 define('ENABLE_SSL_CATALOG', 'false');
 define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html/folder/');
 define('DIR_WS_ADMIN', '/folder/admin/');
 define('DIR_FS_ADMIN', '/home/username/public_html/folder/admin/');
 define('DIR_WS_CATALOG', '/folder/');
 define('DIR_FS_CATALOG', '/home/username/public_html/folder/');
 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_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

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

 

 

thanks

Posted

no problems now-- my htaccess file was not listed in the file manager from the cpanel.

That's common. Linux systems may hide files starting with . unless you tell them specifically not to. It's usually a setting in your File Manager.

 

due to burn out working on this issue, i have a tendency not to ask for help but rather try to work these problems out myself.

 

what is the maximum amount of time you should work on a problem before reaching out??

We all appreciate that you try to figure things out before calling for help. When you start making stupid mistakes, it's time to go to bed and clear your head with a good night's sleep. When you've tried everything you can think of, go for a short walk or do something else for a while -- when you come back and you still can't find a new approach, then it's time to call for help.

 

The worst thing you can do is go into panic mode, operating on no sleep. That's when you do all sorts of stupid things, and worse, can't figure out later what you did to get in that particular pickle. Learn when it's time to sleep on it.

Posted

hey phil do i was wondering if you can do some work on my site for me. ?

i can't write on the product infro page once i upload the spreedsheet

Posted

Sorry, I'm fully booked right now (full time job). What are you using -- Easy Populate? You should probably ask in the support area for that add-on.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...