PDA

View Full Version : Installing oscommerce..help


woodwisdom
12-22-05, 01:25 PM
Hi, This will be my first time installing a shopping cart. I've read the instructions in this forum and I'm a bit confused. What I'd like to know if step by step how to install Oscommerce in powweb and be able to have SSL on the checkout page.
I installed (via site tools) once and had it working fine, but under a sub: store.ebonykennel.com. I moved the "store" folder into "htdocs", but now get errors.
If deleting and reinstalling is the way to go, that's fine... I'm hoping someone might provide step by step for me as to what I need to do for a successful install and SSL access.

Thanks..
Mike

stevel
12-22-05, 02:19 PM
If you move the files, you have to update the two configure.php files (one in includes and one in admin/includes) to specify the new paths. You are correct in wanting to move the files to under htdocs because PowWeb's SSL doesn't work with the subdomains outside htdocs.

To enable SSL, you set HTTPS_SERVER (in includes/configure.php) and HTTPS_CATALOG_SERVER (in admin/includes/configure.php) to 'https://examplecom.secure.powweb.com' (where "examplecom" is for domain example.com).

woodwisdom
12-22-05, 04:31 PM
Thanks Steve. Good to see another from NH. Did a complete reinstall from the latest downloaded version on oscommerce.com and followed the tutorial here. I'm able to open the configure.php file, and it looks like I have a "www" where I don't need it: define('HTTPS_SERVER', 'https://www.ebonykennel.secure.powweb.com'); // eg, https://
However, I'm unable to upload it when changed, I get: Can't open that file: Permission denied.

?
Mike

stevel
12-22-05, 04:50 PM
When osC is installed, one of the recommended tasks is to protect the configure.php files against write. You seem to have done that. The easiest workaround is to delete the file on the server first and then upload a new one. You'll then have to re-protect it as 444.

You're correct that the www. does not belong there.

woodwisdom
12-22-05, 05:08 PM
I've deleted the configure.php file and uploaded the one from the fresh zip on my computer. I've lost all the information in the old configure.php of course. One of the recommendations in the install tutorial was to delete the "install" folder. So..... What do I do at this point? Got the new configure.php file but now get the error: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /www/e/ebonykennel/htdocs/shop/catalog/includes/functions/database.php on line 19
Unable to connect to database server!

Grr. Frustration!
Mike

stevel
12-22-05, 08:39 PM
The fields in configure.php are commented - fill them in. Here's an example for the catalog file. I assume that your store is directly under htdocs:

<?php
define('HTTP_SERVER', 'http://www.example.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://examplecom.secure.powweb.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'example.com');
define('HTTPS_COOKIE_DOMAIN', 'examplecom.secure.powweb.com');
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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'mysql00.powweb.com'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'yoursqlusername');
define('DB_SERVER_PASSWORD', 'yoursqlpassword');
define('DB_DATABASE', 'yoursqldatabase');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

Mossy
1-9-06, 04:26 PM
Hi, I’m a total newbie at this and I can’t figure out where I messed up. I used the powweb install tool to create an oscommerce site in a subdomain. Then I found out that SSL doesn’t work in with the subdomain so I moved my store to htdocs/estore. Then I updated the configure.php files in the includes and admin/includes folders.
define('HTTP_SERVER', 'http://www.furtrade.org/estore/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'https://furtradeorg.secure.powweb.com/estore/');
define('HTTPS_CATALOG_SERVER', 'https://furtradeorg.secure.powweb.com/estore/');
define('ENABLE_SSL_CATALOG', true); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/www/f/furtradeorg/htdocs/estore/')


Then when I tried to access the admin page I got this error “FATAL ERROR: register_globals is disabled in php.ini, please enable it!” so from there I found information and this Register Globals Patch and installed that but I’m still getting the same error.
http://forum.powweb.com/showthread.php?t=55381&highlight=FATAL+ERROR%A+register_globals

I don’t have any idea what else to try, any help would be appreciated.

stevel
1-9-06, 05:11 PM
If you correctly installed the Register Globals patch, then it would work. The alternative is to turn RegisterGlobals back on in php.ini.

There's no way for us to know what is wrong without actually examining the PHP files on your site.

By the way, your configuration is incorrect. The code you have above is from the admin/includes/configure.php - the one for the "catalog" looks slightly different. You do not want HTTP_CATALOG_SERVER to be the https URL and you don't want /estore/ at the end of the _SERVER defines. That belongs in DIR_WS_HTTP_CATALOG and DIR_WS_HTTPS_CATALOG.

rodneyphillips
1-21-06, 11:14 PM
Any thoughts? I can access my admin page just fine. When I attempt to access the main store page (index.php) I receive "FATAL ERROR: register_globals is disabled in php.ini, please enable it!".

I have installed the files from the Register Globals Patch.

My .htaccess is as follows:
# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# 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>

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
# php_value register_globals 0
#</IfModule>


The following is from my php.ini file in the high-level store directory:
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
;register_globals = On


I have looked through this a few time and cannot figure it out. Again, the admin page works but the store page does not work (I get the error above).

Thanks

stevel
1-22-06, 07:44 AM
If you properly installed the register globals patch you would not get that error. All I can suggest is that you recheck your work. Indeed, part of that patch is to remove the check that gives that error.