Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

'chmod' is not recognized as an internal or external command, operable program or batch file.


ninthgoose

Recommended Posts

Posted

Hi,

I have a copy of RC1 running well about two weeks ago, whilst I played with mod-ing it to my likes.

 

BUT then all of a sudden I start to get images not loading and this error text appearing in pages ;

'chmod' is not recognized as an internal or external command, operable program or batch file.

 

I get images that wont load and their address path it has the chmod command.

 

I have a copy of RC1 operating on a windows server.

 

Does anyone know why I am getting this message. Also.. what ever is causing this is only affecting my non-ssl site. Once you enter the ssl encrypted side of the site all seems to be working well.

I am wondering if someone has managed to hack one of my files?

 

I have searched on here and found a couple of similar posts, but there are no solutions/answers.. anyone help please!?

 

Other similar faults reported;

http://www.oscommerce.com/forums/lofiversion/i...hp?t189179.html

Posted

Right, I have backedup my entire installation and done a search using dreamweaver through the entire php file set and found two chmod commands. And these appear to be in classes\upload.php and functions\html_output.php

 

Does this help at all?

I wondering if it is possible that the use of the is_dir and mkdir and chmod functions are not working as they should on a windows server with php 5.20? But given the upload file only exists in the admin folder and the output file is identicle for the non-ssl as it is for the ssl site. Why would the ssl site show no sign of this problem.

 

Just to clarify, i have a shared ssl folder on my site.

So i have one installation in a non ssl folder and one inside. When someone logs in they are automatically redirected to the ssl site.

So far this setup has worked fine during the testing i have been doing so far.

 

Does anyone have any ideas at all please. As i am at a total loss here.

 

Cheers

 

John

Posted

well if windows server then chmod will not work.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

Hi Satish,

Yes that should be the case on windows servers, however the SSL side of the site is totally unaffected and is using the same output files with the 'chmod' command in.

 

If the command was totally to blame, ie 100% non functional, they i would expect all of my images to be giving the same problem, wouldnt they?

 

Cheers

 

John

 

 

 

well if windows server then chmod will not work.

Satish

Posted

I suggest You to generate a support ticket and let Your hosting company come up with something.

If they say something that can be placed here for further discussion.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
I suggest You to generate a support ticket and let Your hosting company come up with something.

If they say something that can be placed here for further discussion.

 

Satish

 

Hi Satish thankyou for your assistance thus far. I have done as you recomend.

 

My hosting is on windows servers with a shared ssl folder.. thus

I have two folders when I look at my hosting with my ftp, they are; "wesbite" and "ssl_<mysite>"

 

I thus have two catalogs installed. Both were identicle apart from the configure.php file settings. The admin folder in the ssl_mysite was renamed as i dont use this, I only use admin in website/catalog/admin and my images folder is the website/catalog/images, the ssl images folder is hot linked to use the website/catalog/images folder no ssl_<mysite>/catalog/images to avoid two sets of image and potential ssl erros.

 

So my hosting company did a check on the folders to ensure all the permissions for the osc folders in both locations were identicle. So to attempt to rule out a permissions error/missmatch. They were identicle.

 

So working the theory that the ssl side is working fine giving no erros, then there must be a difference between that and the install in "website".. they copied over and replaced all the files expect the config files, admin folder and images, from the ssl site to replace those in the "website".

 

This did not solve the issue. So if my thinking is correct, then the issue lies somewhere with either the contents of "admin" or the configure.php files. As these are the only ones that are not identicle.

My admin control is fine and though i havent tested every option in there ( there are too many) i have tested/tried/changed several options to see if the chmod error appears. I get none so far.

 

Thus I am now left with the configure.php files.. of which due to the shared ssl folder I have three;

website/catalog/includes/configure.php

website/catalog/admin/includes/configure.php

and

ssl_mysite/catalog/includes/configure.php

 

 

So here are the files (edited for security)

website/catalog/includes/configure.php

<?php

define('HTTP_SERVER', 'http://www.<mysite>.com');

define('HTTPS_SERVER', 'https://secure.<hosting>.co.uk/<mysite>');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.<mysite>.com');

define('HTTPS_COOKIE_DOMAIN', 'www.<mysite>.com');

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

define('HTTPS_COOKIE_PATH', '../../<mysite>/website/catalog/');

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

define('DIR_WS_HTTPS_CATALOG', '/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', 'E:/Hosted_Web/users/<mysite>/website/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

website/catalog/admin/includes/configure.php

<?php

define('HTTP_SERVER', 'http://www.<mysite>.com');

define('HTTP_CATALOG_SERVER', 'http://www.<mysite>.com');

define('HTTPS_CATALOG_SERVER', 'https://secure.<hosting>.co.uk/<mysite>');

define('ENABLE_SSL_CATALOG', 'true');

define('DIR_FS_DOCUMENT_ROOT', 'E:/Hosted_Web/users/<mysite>/website/catalog/');

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

define('DIR_FS_ADMIN', 'E:/Hosted_Web/users/<mysite>/website/catalog/admin/');

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

define('DIR_FS_CATALOG', 'E:/Hosted_Web/users/<mysite>/website/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/');

 

ssl_mysite/catalog/includes/configure.php

 

<?php

define('HTTP_SERVER', 'https://secure.<hosting>.co.uk/<mysite>/');

define('HTTPS_SERVER', 'https://secure.<hosting>.co.uk/<mysite>/');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'secure.<hosting>.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'secure.<hosting>.co.uk');

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

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

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

define('DIR_WS_HTTPS_CATALOG', '/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', 'E:/Hosted_Web/users/secure<hosting>/<mysite>/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

Both folders are on the same server and so running the same version of php (5.2).

 

 

Now looking at the files above, i have spotted that ssl_mysite/catalog/includes/configure.php appears to have ENABLE_SSL set to false, and there appears to be a missing operand (fullstop or / ???) between secure and <hosting> in the path define('DIR_FS_CATALOG', 'E:/Hosted_Web/users/secure<hosting>/<mysite>/catalog/');

 

But that said, my ssl site appears to be working ok. Certainly not giving the same error.

I could be looking up the wrong tree here, but hope this helps give some ideas..

 

Any help appreciated. Thanks.. John

Posted

First and foremost having two folders is going to give You lots of problem.So ask Your hosting company on how YOu can have both http and https at same location.

 

I had worked on more then 200 sites and only on one I had code on different folders and it made Me work for many extra hrs.

 

Also with shared SSL cookies are useless so all cookie path needs to be blanked out.

 

 

Will look in chmod matter and get beck on it in some time.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

these appear to be in classes\upload.php and functions\html_output.php both these fresh files do not have chmod.

You need to chek windows equivalent code in php that sets file permission.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Archived

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

×
×
  • Create New...