NewBudda Posted December 19, 2007 Posted December 19, 2007 Hi all, I have been trying to move the contents of the catalog folder which were previoulsy in www.mysite.com/os1/catalog/ to www.mysite.com/shop. I have adjusted the includes/configure.php and admin/includes/configure.php as below: define('HTTP_SERVER', 'http://www.mysite.com'); define('HTTPS_SERVER', 'http://www.mysite.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'www.mysite.com'); define('HTTPS_COOKIE_DOMAIN', 'mysite.com'); define('HTTP_COOKIE_PATH', '/shop/'); define('HTTPS_COOKIE_PATH', '/shop/'); define('DIR_WS_HTTP_CATALOG', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); 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', '/srv/www/vhosts/mysite.com/httpdocs/shop/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Admin configure define('HTTP_SERVER', 'http://www.mysite.com'); define('HTTP_CATALOG_SERVER', 'http://www.mysite.com'); define('HTTPS_CATALOG_SERVER', 'http://www.mysite.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/srv/www/vhosts/mysite.com/httpdocs/shop/'); define('DIR_WS_ADMIN', '/shop/admin/'); define('DIR_FS_ADMIN', '/srv/www/vhosts/mysite.com/httpdocs/shop/admin/'); define('DIR_WS_CATALOG', '/shop/'); define('DIR_FS_CATALOG', '/srv/www/vhosts/mysite.com/httpdocs/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/'); I tried tried adjusting the permissions, but all I get is Error 403 Forbidden... Can you spot the problem? Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
germ Posted December 19, 2007 Posted December 19, 2007 If I put: http://[your url here]/shop Into my browser addrees bar I get the same error, indicating to me it's a "permissions" problem on the "shop" folder, or the files contained therein. Or maybe an errant .htaccess file in the "shop" folder. This isn't saying that your config files are correct/incorrect. I just think looking in them for the solution at this point in time is "barking up the wrong tree". ;) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
NewBudda Posted December 19, 2007 Author Posted December 19, 2007 The .htacces file i Found in shop/ is as follows: # $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 I cant see anything wrong with that... Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
germ Posted December 19, 2007 Posted December 19, 2007 I'm no ".htaccess expert", but neither can I. You could make a simple HTML file and put it into the "shop" folder: Example: <HTML> <HEAD> </HEAD> <BODY> We made it! </BODY> </HTML> Save it as "test.html" in the "shop" foilder. If you can access it with no problem from your browser, that would prove it's a configure problem (in my mind anyway). If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted December 19, 2007 Posted December 19, 2007 Conversely, if you still get the same error, it proves it's a "permissions" problem. I think... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
NewBudda Posted December 20, 2007 Author Posted December 20, 2007 What an easy and right way to find out!! It didnt work, so i deleted all the .htaccess files. That got rid of the 403 Error. So the permissions are ok. However I have a new Error: Warning: Unknown(/srv/www/vhosts/mysite.com/httpdocs/shop/index.php): failed to open stream: Permission denied in Unknown on line 0 Warning: (null)() [function.include]: Failed opening '/srv/www/vhosts/mysite.com/httpdocs/shop/index.php' for inclusion (include_path='.:/usr/share/php') in Unknown on line 0 Failed to open stream? Is this a database problem? Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
germ Posted December 20, 2007 Posted December 20, 2007 I'm getting the same error on any page in the shop folder (login.php, account.php for example). Make sure the permissions on the PHP files there are at 644 If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
NewBudda Posted December 20, 2007 Author Posted December 20, 2007 Make sure the permissions on the PHP files there are at 644 I check and changed them to 644. Now I am getting: Warning: main(includes/application_top.php) [function.main]: failed to open stream: Permission denied in /srv/www/vhosts/mysite.com/httpdocs/shop/index.php on line 13 Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/share/php') in /srv/www/vhosts/mysite.com/httpdocs/shop/index.php on line 13 Line 13 refers to "require('includes/application_top.php');" which is set to 644. Is there a tool to enable easier migration? Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
germ Posted December 20, 2007 Posted December 20, 2007 Try changing the permission on the /shop/includes folder to 644. If that doesn't help, try 755. If that doesn't work, post again. There's no "tool" to do this any easier because it involves you manually moving all the files/folders. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
NewBudda Posted December 20, 2007 Author Posted December 20, 2007 includes is now on 755, application.php too: Warning: main(includes/functions/compatibility.php) [function.main]: failed to open stream: No such file or directory in /srv/www/vhosts/mysite.com/httpdocs/shop/includes/application_top.php on line 40 Fatal error: main() [function.require]: Failed opening required 'includes/functions/compatibility.php' (include_path='.:/usr/share/php') in /srv/www/vhosts/mysite.com/httpdocs/shop/includes/application_top.php on line 40 Thank you for your great help! I really have to sleep now, I will read your tip tomorrow, until then... Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
germ Posted December 20, 2007 Posted December 20, 2007 Same error, different file/folder. Now that you have a "blueprint" to follow, looks like you have a lot of permission changing to do... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted December 20, 2007 Posted December 20, 2007 According to those with a lot of osC experience: Folder permissions should be 755, and files should be 644 I'd start there. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
NewBudda Posted December 20, 2007 Author Posted December 20, 2007 According to those with a lot of osC experience: Folder permissions should be 755, and files should be 644 I'd start there. Yes, thats it. I took me 45 minutes but now all the files/folders have the right settings and there are no more error messages. Thank you for your help! Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
Recommended Posts
Archived
This topic is now archived and is closed to further replies.