Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

error cahnge folder permissions


JimBarry

Recommended Posts

I was in my admin area "/define_language.php" and discovered clicking on any of the page links said I did not have write permissions. So I couldn't use the edit feature.

 

So I made "text only" changes to the file "shopping_cart.php" found in the english/ folder (see code below). A simple edit of removing some text I had placed there about 10 days ago. I uploaded the "shopping_cart.php" using WS_FTP just then. At the time of the original edit, I wasn't able to use the edit feature in the Define Languages page either so I had uploaded using WS_FTP. At that time the site worked ok.

 

Edit of "shopping_cart.php" file now looks like this on the server:

 

<?php
/*
 Copyright (c) 2002 osCommerce
 
 Modified for use by YourShopCart.com sections Copyright (c) 2002 - 2003
 YourShopCart Version 1.0

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Cart Contents');
define('HEADING_TITLE', 'What\'s In My Cart?');
define('TABLE_HEADING_REMOVE', 'Remove');
define('TABLE_HEADING_QUANTITY', 'Qty.');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Product(s)');
define('TABLE_HEADING_TOTAL', 'Total');
define('TEXT_CART_EMPTY', 'Your Shopping Cart is empty!');
define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');
define('SUB_TITLE_TOTAL', 'Total:');

define('OUT_OF_STOCK_CANT_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' dont exist in desired quantity in our stock.<br>Please alter the quantity of products marked with (' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '), Thank you');
define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' dont exist in desired quantity in our stock.<br>You can buy them anyway and check the quantity we have in stock for immediate deliver in the checkout process.');

?>

 

I went back into the "/define_language.php" and was curious why I couldn't perform edits. Figuring if I changed the folder permissions, it would allow me. So using hte CHMOD opiton in WS_FTP I changed the permission of the ".../include/lanuages/english" folder to checkmark Owner/Execute. I thought this perrmission would allow me to have write permissions form the admin area. If it didn't then simply reversing the steps I just performed would back me out of it. It didn't.

 

Now when trying to view the catalog, I get the error as I stated in the original request.

 

The permissions for the languages folder are now:

drwxr-xr-x    3 32101    user     4096 Oct 28 17:09 .
drwxr-xr-x    8 32101    user     4096 Sep 30 12:52 ..
-rw-r--r--    1 32101    user     3850 Apr 17  2004 affiliate_english.php
drwxr--r--    4 32101    user     4096 Nov 16 10:17 english
-rw-r--r--    1 32101    user     18852 Apr 22  2004 english-orig.php
-rw-r--r--    1 32101    user     18717 Oct 28 17:04 english.php
-rw-r--r--    1 32101    user     641 Sep 30 12:53 index.htm

 

 

At this point I get this error when trying to view the catalog site online:

 

Warning: main(includes/languages/english/attributes_sorter.php): failed to open stream: No such file or directory in /home/woodwork/public_html/catalogue/includes/languages/english.php on line 342

 

Fatal error: main(): Failed opening required 'includes/languages/english/attributes_sorter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/woodwork/public_html/catalogue/includes/languages/english.php on line 342

 

As well, trying to view any of the links in the admin area "/define_language.php" indicate file does not exist.

 

I'd appreciate if someone can lead me in the right direction.

Link to comment
Share on other sites

It sounds more like your host may have made some changes (upgrades) and this may have affected permissions on your folders. I'd check with them to find out if they have performed any upgrades recently.

 

Errors you may or may not have made in files shouldn't affect your ability to edit them, and should show errors on-screen if something in the file is wrong.

 

Vger

Link to comment
Share on other sites

It is not adviseable to edit the files online via the Admin are as this CAN cause problems with the running of OSC.

 

It is always adviseable to edit the files locally on your PC using your favourite text editor and then UPLOAD them to your server.

 

There are numerous posts in these boards about this and the problems it can cause if you edit them online.

 

Another thing you have to consider, if you change the file permissions so that YOU can edit the files, WHO ELSE can also edit them?

Link to comment
Share on other sites

It is not adviseable to edit the files online via the Admin are as this CAN cause problems with the running of OSC.

 

Another thing you have to consider, if you change the file permissions so that YOU can edit the files, WHO ELSE can also edit them?

 

Well the permissions have not been changed given the CHMOD for that folder are still set to "drwxr--r--" Your second question is a mute point given the permissions have not been changed.

 

And since my last post I still cannot get this problem fixed.

 

I'm at the point now where I'm considering not using osC as it is, in my opinion, the most unstable program I've ever used. :angry:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...