Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Re-install on new server- 2 problems


Guest

Recommended Posts

(by the way I have read this posting: http://www.oscommerce.com/forums/topic/394093-fresh-instal-no-images/)

 

I have just re-installed an OSC website on to a new server. Website is www.bankofflowers.co.uk/index.php.

 

The re-install of the files and the MySQL worked like a dream and the site loaded after changing the config. in the folder /includes BUT..........

 

- The images don't load

 

and

 

- I can't get in to the site admin. function using the login information previously used. In fact the admin. screen does not even load. The server seems to 'hang'.

 

The site name is: www.bankofflowers.co.uk/index.php

 

This is the config text in the includes/ folder:

 

<?php

define('HTTP_SERVER', 'http://www.bankofflowers.co.uk');

define('HTTPS_SERVER', 'http://www.bankofflowers.co.uk');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'www.bankofflowers.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'www.bankofflowers.co.uk');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_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', '/home/****/public_html/');

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', '****_admin');

define('DB_SERVER_PASSWORD', '****');

define('DB_DATABASE', '****_bankofflowers');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

This config. mirrors what it was before though the database details etc have changed. It also mirrors other config details I have used on OSC sites in the past.

 

All the images are on the server and the path to them seems OK.

 

No changes have been made to the database.

 

Any advice would be appreciated.

 

Thank you

 

Martin

Link to comment
Share on other sites

What version of osC? What's different about the new server, especially the PHP version? Is the admin directory password protected? Maybe you need to manually re-do the password protection, especially if there's anything different about the server levels from the old server. As for images, are they in the right directory, and can you manually bring them up on the browser? They weren't corrupted by transferring in ASCII? Your new server doesn't have hotlink protection that you need to whitelist your site on?

Link to comment
Share on other sites

Thanks Mr Phil.

 

My answers to your questions are:

 

What version of osC?- not too sure. Probably 2.xx.

 

What's different about the new server, especially the PHP version? I don't know! The job I am doing is a rescue job.

 

Is the admin directory password protected? I don't think so

 

Maybe you need to manually re-do the password protection, especially if there's anything different about the server levels from the old server. I don't think this applies

 

As for images, are they in the right directory, and can you manually bring them up on the browser? They weren't corrupted by transferring in ASCII? The images are in the right directory and I can 'see' them on File Manager AND bring them up if I click 'view'. HOWEVER, if I try to load them on the browser, eg http://www.bankofflowers.co.uk/images/C00341OS.jpg I get an 'Internal Server Error ' message viz:

<quote>

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

</quote>

 

On the question of access to the Admin Panel, is it possible for me to change the login details via the database, eg create a new password or user? If so, how please. I know I have done this for another database driven application but I can't remember how to do it. This was a long time ago!

 

Thank you again for your help

 

Martin

 

Sorry, I forgot this question:

 

Your new server doesn't have hotlink protection that you need to whitelist your site on?

Doesn't seem to have.

Link to comment
Share on other sites

I am still puzzled by the failure to access the Admin panel. The server still seems to 'hang'. No error or failure messages, just waiting and waiting for the login page to load.

 

Any ideas please?

 

Martin

Link to comment
Share on other sites

Look into the htaccess files to ensure they are correct in relation to how the server is set up.

 

As a quick test, simply remove the .htaccess from the images folder (if there is one there) and then see if the images load. If they do, speak with the host to determine the problem.

 

If they still don't the problems are deeper.

 

 

 

Link to comment
Share on other sites

Thanks Bazinga!

 

There was an .htaccess file in the images folder which I deleted and the images on the website are back again!

 

This is what the .htaccess said:

 

<quote>

php_flag engine off

<Files ~ "\.(php*|s?p?html|cgi|pl|ini)$">

deny from all

</Files>

</quote>

 

I am not sure what this means though I can perhaps guess!

 

Regards

 

Martin

Link to comment
Share on other sites

I am now finding .htaccess files in other folders on this site, one of which mirrors that mentioned above.

 

If, as I now suspect, this is a deliberate attempt by the previous webmaster or others to sabotage any re-installation of the site then this is despicable.

 

I would appreciate your views.

 

thank you

 

Martin

Link to comment
Share on other sites

Of course it's not and I would suggest that you stop casting a shadow over the previous webmaster of this site.

 

The "problem" is a lack of understanding on your part, and the part of the site owner. These htaccess files are fine and required - you need to speak with the host to see why they are not working.

 

 

 

Link to comment
Share on other sites

Thank you. I did not mean to offend. I was only suspicious because part of the site started working after the removal of the .htaccess file and number of such files on the server. There are still problems of course not connected with this particular file. I withdraw that part of my previous posting which was, of course, incorrect.

 

I will of speak to the website host. In the meantime, my apologies again.

Link to comment
Share on other sites

Right, an update if you can bear with me please.

 

I contacted the Host who upgraded the server with the latest PHP version. No change. If the .htaccess file is there, the images don't show. If it is not, they do.

 

However in an inspired, or despairing, piece of thinking I changed the text on the .htaccess file to that on an OSC application I worked on last year, to:

 

<quote>

# $Id$

#

# This is used to restrict access to this folder to anything other

# than images

# Prevents any script files from being accessed from the images folder

<FilesMatch "\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$">

Order Deny,Allow

Deny from all

</FilesMatch>

</quote>

 

Bingo! it works and the images show regardless of the .htaccess file.

 

There are other similar type problems with other parts of the site (in different folders) but your comment as to whether this particular problem has finally been put to bed would be appreciated.

 

Also, if the purpose of the .htaccess file is to ensure only images are loaded then why the difference in the two wordings, and why does one work and the other not?

 

Thank you.

 

Martin

Link to comment
Share on other sites

Ah,

php_flag engine off

does not belong in an .htaccess file. It will trigger a 500 (Internal Server) error on most hosts. Its purpose there was to disable PHP in that directory, so no one could slip in an executable script as malware. If customers don't have access to insert files there, I'm not sure what purpose that serves on your site. Anyway, if you want to keep it, ask your host how to do the equivalent in php.ini.

 

All php_flag and php_value entries in .htaccess files must be moved to php.ini or the equivalent. Talk to your host about how to do that.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...