Koozali.org: home of the SME Server

osCommerce on SME How-to

Craig Jensen

osCommerce on SME How-to
« on: January 01, 2003, 09:45:46 AM »

Steve Lewis

Re: osCommerce on SME How-to
« Reply #1 on: January 01, 2003, 09:54:59 PM »
Hello,

Just got finished with your How-To.

Worked great , thank you. I followed it word for word and is very easy. Thanks again for the How-To.

Just a word though. During the web based install the configure.php file was reported as "not able to write to" and osCommerce suggested several commands which I followed.

Need some help here though, please?

The admin page worked great except the images directory is not writeable. Do you have any suggestions or should I use similar commands that made the configure.php file writeable, i.e. touch images ; chmod 706 images?

 The catalog default.php page is displaying this error "Warning: I am able to write to the configuration file: /home/e-smith/files/ibays/store/html/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file."

That particular config file was made writeable with the suggested command from the osCommerce install process, i.e. 'cd /home/e-smith/files/ibays/store/html/catalog/includes/configure.php' ; then 'touch configure.php' ; then 'chmod 706 configure.php'

Not sure what permission will provide the needed security on the site pages, but allow for admin functions to write to configure.php.

Any help, pointers, suggestions are greatly appreciated and am currently RTFineM.

Once again thank you for the How-To and your hard work.

Steve

Steve Lewis

Re: osCommerce on SME How-to
« Reply #2 on: January 01, 2003, 10:22:57 PM »
Hello again,

Jumped the gun here.

I solved the above error I was getting by changing , within the Server-Manager , this setting.

From:

User access-Write = group, Read = everyone

to:

User access-Write = admin, Read = group

This appears to also allow the Admin functions to work within osCommerce.

Thank you for your How-To Craig.

Steve

Craig Jensen

Re: osCommerce on SME How-to
« Reply #3 on: January 01, 2003, 10:30:54 PM »
Cool, thx for your input.

Are you still able to access the store from outside your local network?  If not, youmay need to change the Read option.

Unless someone else has input here, I will leave the How-to as is, otherwise, this may be an option I will edit after more reflection/input.

Let me know Steve how this works when accessed from outside.

Craig Jensen

Steve Lewis

Re: osCommerce on SME How-to
« Reply #4 on: January 02, 2003, 03:36:06 AM »
Craig,

Sure will. However I will not be able to do it until 1.2.03 at work.

Thank you for all your hard work,
Steve

Tony P.

Re: osCommerce on SME How-to
« Reply #5 on: January 02, 2003, 04:53:39 AM »
Craig,
Thanks for the How-To I was just thinking about how cool a e-commerce site would be on SME.

I did this on 5.1.2 so if it’s not the same I apologize in advance for my next few comments and questions.

I had the same issue with the Warning in the configuration file that Steve had so I would suggest that that be in the How-To.

Another suggestion for inclusion in the How-To would be on how to modify the apache template to look for default.php as well as index.php. Or create a link to default.php from index.php. When I goto http://mydomain.com/store/catalog I get a directory listing. Creating the link "ln default.php index.php" seemed to have fixed it for me but I didn't like the fact I was able to browse the directory before I did that.

I am also concerned about the admin pages not being password protected. Do you know a way around this? Should I look into the .htaccess customizations?

Thanks again,
Tony P.

Craig Jensen

Re: osCommerce on SME How-to
« Reply #6 on: January 02, 2003, 08:04:37 AM »
The warning in the initial startup is normal as the site is opened.  This is true for any install, SME or otherwise.  Changing the config.php to chmod 755 and removing the install directory fix that.  

My goal in the how-to was to allow an SME user to get to the same point as a third party server installation of osCommerce.  The rest is up to the user.

The default.php vs index.php question is addressed in the FAQ.  You have several options.  Either you can rename default.php to index.php, or follow other instructions in the setup/config FAQ.

The question of admin is answered as well in the initial docs and FAQ for osCommerce.  osCommerce is a very complex and ever-changing application much like SME itself.  As you check out the docs, and begin exploring the osCommerce structure, you will find a great deal of options to persue for creating the store you always dreamed of ;-)

Craig Jensen

Tony P.

Re: osCommerce on SME How-to
« Reply #7 on: January 03, 2003, 04:36:27 AM »
Sorry I was not clear enough about the error I had.
Just after the database configuration I had to change to the directory the contained configure.php for admin and catalog. Touch the file and change permissions. This was before getting to the catalog page and seeing the errors. Not a big deal it was easy to get through.

I did not find navigation of the osCommerce FAQ very easy. I know that sounds stupid cause it is laid out OK. I just like to search FAQ’s for what I am looking for and when I searched the FAQ I got back a bunch of results that I had to pick through. I thought that searching would have been faster but it was not.

I modified step 5 of your HowTo to add what I think might be nice. If you like my changes save the page and keep them, if you don’t like them you don’t have to do anything. ;-)
http://www.virtualsoftwaredemo.com/osCommerce-on-SME_5_5-how-to.htm


Tony P.

Craig Jensen

Re: osCommerce on SME How-to
« Reply #8 on: January 03, 2003, 05:34:31 AM »
Tony, See my updated how-to:

http://www.acenet-tech.org/cdj/osCommerce_on-SME_howto/osCommerce-on-SME_5.5-how-to.htm

And not the "step six" credit ;-)

Craig D. Jensen

Craig Jensen

Re: osCommerce on SME How-to
« Reply #9 on: January 03, 2003, 05:49:06 AM »
Tony....I am writing things much too quickly tonight.

Remove "not" and insert "note".

Wow.....I gotta chill for awhile.  Laters

Craig Jensen

Tony P.

Re: osCommerce on SME How-to
« Reply #10 on: January 03, 2003, 06:13:54 AM »
Craig,
Looks good to me.

I like how you broke it out as a few To-Do's.
Thanks for the credit. I never look to get it but its always nice :-).


Thanks,
Tony P.

Asgeir Asgeirsson

Re: osCommerce on SME How-to
« Reply #11 on: January 06, 2003, 02:09:28 AM »
I followed the how-to's but, the /admin/ does not work, says it cannot connect to database, what did I do wrong?

Regards
Asgeir

Peter

Re: osCommerce on SME How-to
« Reply #12 on: January 06, 2003, 06:52:15 PM »
I do have the same problem.
The catalog works exept the admin page.

Peter

Craig Jensen

Re: osCommerce on SME How-to
« Reply #13 on: January 06, 2003, 07:09:15 PM »
Two things to check first:

You didn't mention the actual error, etc...but

#1. for database errors
look at your /admin/includes/configure.php

these lines:
------------------------------------snip--------------------------------------------------
// define our database connection
  define('DB_SERVER', 'localhost'); // eg, localhost - should not be NULL for productive servers
  define('DB_SERVER_USERNAME', 'catalog');
  define('DB_SERVER_PASSWORD', 'password');
  define('DB_DATABASE', 'catalog');
  define('USE_PCONNECT', 'false'); // use persisstent connections?
  define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>
------------------------------------snip--------------------------------------------------
Make sure the database fields are exactly the same as what you used to setup your database...i.e.
grant all on store.* to catalog@localhost identified by 'password';

"catalog" and "password" being the key fields.

#2.
In this part of your configure.php
----------------------------------------snip------------------------------------
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
  define('HTTP_SERVER', 'http://www.your-domain.org'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
  define('HTTP_CATALOG_SERVER', 'http://www.your-domain.org');
  define('HTTPS_CATALOG_SERVER', 'https://www.your-domain.org');
  define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
  define('DIR_FS_DOCUMENT_ROOT', '/home/e-smith/files/ibays/store/html'); // where the pages are located on the server
  define('DIR_WS_ADMIN', '/store/admin/'); // absolute path required
  define('DIR_FS_ADMIN', '/home/e-smith/files/ibays/store/html/admin/'); // absolute pate required
  define('DIR_WS_CATALOG', '/store/catalog/'); // absolute path required
  define('DIR_FS_CATALOG', '/home/e-smith/files/ibays/store/html/catalog/'); // absolute path required
-----------------------------------snip--------------------------------------------

Make sure your paths are correct.  If you followed the howto to the "T" then your paths to /store/admin and /store/catalog would be as above.  If not, adjust with this as a baseline to compare from.

These are the most common causes of inability to access the "admin" pages.

Craig Jensen

Peter

Re: osCommerce on SME How-to
« Reply #14 on: January 06, 2003, 08:11:18 PM »
Thanx for the info, it worked for me
You had it complety correct wat my problem was.

Next Time i wil tell you the error ;)

Peter

olby

Re: osCommerce on SME How-to
« Reply #15 on: January 31, 2003, 11:47:30 PM »
Hi Craig Jensen.

Thanks so much for your How-To.

Got my shop up and running in now time on SME, but ....

I can't get the SSL to work with oscommerce.
My configure.php are setup like abowe, but I get this error:
The requested URL /bgnet/catalog/HTTPS_SERVER/bgnet/catalog/checkout_payment.php was not found on this server.

Have you any idea on that one too.

Thanks in advance.

Best Regards
olby

Craig Jensen

Re: osCommerce on SME How-to
« Reply #16 on: February 01, 2003, 12:13:13 AM »
Hello olby,

Are you able to access the /admin pages?  Did you check the choice of
'Enable SSL' during install?  If you did not already remove the
/install directory, you can still re-run the script... you may have to
chmod 706 the configure.php files first... *MAY*, try it first.

-------------------------------------------------------------

o> I can't get the SSL to work with oscommerce.

o> My configure.php are setup like abowe, but I get this error:

If you are unable to view other dirs with https enabled, let me know.

o> The requested URL
o> /bgnet/catalog/HTTPS_SERVER/bgnet/catalog/checkout_payment.php was not found
o> on this server.



--
Best regards,
 Craig                            mailto:cjensen@acenet-tech.org

olby

Re: osCommerce on SME How-to
« Reply #17 on: February 05, 2003, 01:27:11 AM »
Hi Craig.

Great job.

Lost my connnection for a few days, but I've finally got to test your RPM version 1.0-0.3.

It works, following your guidelines, and theres no problems on the catalog-side except, that the configure doesn't get set to 706. Easily handled though.

I'm not able to access the admin-site from my browser, Error 403 Not allowed to ...
In admin/includes the configure is set to 706.

After testing I'm left with these, maybe silly, questions:
How do I change the name - if I want 2 or more shops?
Can I set the RPM up to install another snapshot - e.g. ICW's from http://www.chainreactionweb.com/info/hosting/oscommerce-hosting.php?
How do I setup FTP-access to the store, and only the store?

Best Regards
olby

Craig Jensen

Re: osCommerce on SME How-to
« Reply #18 on: February 05, 2003, 02:10:13 AM »
Hello olby,

o> It works, following your guidelines, and theres no problems on the
o> catalog-side except, that the configure doesn't get set to 706. Easily
o> handled though.
Fixed in later rpm (same version, revised).

o> I'm not able to access the admin-site from my browser, Error 403 Not allowed

This depends on what version you installed, but try from https://
rather than http:// also, can you access from the server-manager link
"shopadmin"?

o> How do I change the name - if I want 2 or more shops?

You can do this, but not with the rpm (unless you install on seperate
machines), manually by installing either one or the other in
/primary/html and one in an ibay as per my how-to:
http://www.acenet-tech.org/cdj/osCommerce_on-SME_howto/osCommerce-on-SME_5.5-how-to.htm

Please be aware though that the rpm install and the how-to are
completely different and if you install BOTH on one machine, you will
break your store.

o> Can I set the RPM up to install another snapshot - e.g. ICW's from
o> http://www.chainreactionweb.com/info/hosting/oscommerce-hosting.php?

Funny you would ask ;-)
I have just created (works fine on SME 5.5 U3 and SME 5.6) an rpm with
this package.  E-mail me directly for the url (i am testing this one
and considering offering it commercially).  It is still considered
beta.


o> How do I setup FTP-access to the store, and only the store?
If you have an SME box, you can set to allow ftp access from
server-manager.  This gives you ftp access to /primary/html with an
admin login.


--
Best regards,
 Craig                            mailto:cjensen@acenet-tech.org