Koozali.org: home of the SME Server

OsCommerce

Offline devtay

  • *
  • 145
  • +0/-0
OsCommerce
« on: December 30, 2014, 06:08:48 PM »
I have been reading about the OsCommerce contrib and am thinking of attempting an install. Has anyone actually used this obsoleted contrib on an SME 8.1 box on a production basis? I did search the forum and was not able to find any instructions or success stories for SME 8.1. I'd appreciate it if anyone has any words of wisdom for me before I get started.

http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smecontribs/i386/RPMS/

http://forums.contribs.org/index.php/topic,50793.msg256388.html#msg256388

Thanks.
You can't stop what's coming. It ain't all waiting on you.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: OsCommerce
« Reply #1 on: December 30, 2014, 07:22:10 PM »
I'd appreciate it if anyone has any words of wisdom for me before I get started.
Please Go ahead, take notes, try after to upgrade the application in the /opt, think to set the correct ownerships (www for apache) on all php files,  cross your fingers, and when all will work without issues then you could ask to build a rpm.


some questions ?
« Last Edit: December 30, 2014, 07:24:10 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #2 on: December 30, 2014, 08:03:46 PM »
Since it's been obsoleted, I think I'll just download it with wget and do a localinstall and see how things go. I was thinking about just using the instructions on the OsCommerce site at first. I don't think I will though because it's not going to put the files in /opt.

Thanks for the encouragement. I appreciate it. I'll post results as I get them.
You can't stop what's coming. It ain't all waiting on you.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: OsCommerce
« Reply #3 on: December 30, 2014, 10:16:25 PM »
If you install it from the current version of oscommerce, then you have to install it in an Ibay and create the Mysql Database by hand, If you install it with the rpm, normally the mysqldb is automatically created and all php files go to the /opt/oscommerce (or something like that)
I know some cases where it was possible to simply update php files....need to be tested.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: OsCommerce
« Reply #4 on: December 30, 2014, 10:43:35 PM »
devtay

There is no special or essential reason to put contribs or add ons into /opt.
If you download the generic package from osCommerce site, you can unpack/install it wherever you want eg in /opt/shop or in ibay .../shop
For both initial setup & future maintenance, IMO you are better off to put a contrib like osCommerce into a ibay
eg named oscommerce or shop or onlineshop or as you prefer.

The main thing is to set ownership access rights on that ibay so that regular LAN users do not have access to it, & that is typically best achieved by ALWAYS creating a different group or groups who will own certain ibays, & then make the admin user or users for the osCommerce site a member of the group that owns the shop ibay (& disallow other users from having LAN access). This of course does not affect web access which is open to anyone.

Then download the generic latest version tar.gz file into the ibay & follow the generic Linux install instructions.
You want the latest version (that is compatible with the version of CentOS that sme is running (eg 8 or 9) so as to avoid the many security flaws etc that earlier versions of the contrib version has.

IIRC osCommerce has quite a good setup routine so follow the instructions carefully, & somewhere in the process make sure the MYSQL database is created.
You will also need to tweak ibay access php settings etc using some db commands, refer wiki.

Remember osCommerce is a BIG FULL FEATURED program, & there will be a big learning curve for you.
Think "system" when creating various components etc within osCommerce & think ahead when adding items etc re the best (or better for you) way to do things.

Similar concepts as above apply to any/most web programs/contribs/add ons for sme server.

I strongly advise you to subscribe to osCommerce security mailing list, & that way you are informed immediately of any security issues & bug fix releases & can update the osCommerce version you have installed on SME server regularly.
Keep your osCommerce version & SME server updated to avoid getting hacked.

Lastly, if you want to use add ons such as osCommerce, then I STRONGLY advise you to upgrade to SME 9.0 first, then run yum update to get latest packages etc, then install osCommerce.
That way you get the latest good quality server base system & will be able to install the latest stable version of osCommerce.
It is much better to have a very secure system when using php type web apps & SME 9.0 is the best starting point IMO.
There are many new features in SME9/CentOS6.5 that allow you to use different (multiple) versions of packages to best suit default packages vs contribs vs system stabiliity
eg
For Software Collections (versioning)
http://forums.contribs.org/index.php/topic,51223.msg259763.html#msg259763
&
http://wiki.contribs.org/Software_collections

For Docker see
http://wiki.contribs.org/Docker
« Last Edit: December 30, 2014, 11:00:15 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #5 on: December 30, 2014, 11:48:37 PM »
stephdl and janet,

Thanks so much for the assistance. I think I'll start looking into the upgrade to SME 9 before starting this project. I'm going to have to experiment with the upgrade process as I don't currently have a test server, just the production one. I can't afford to down the enterprise while I play so I guess it's server shopping time.

I like the idea of using the iBay to hold OsCommerce versus the /opt directory. I got the /opt directory idea from a post here a while back. I also like the fact that I can update it using the instructions on the OsCommerce wiki. Where I always get messed up when I install third party software is the config db and the templated config files. I'm afraid I'm going to monkey something up by not using instructions directly from this site. Fingers crossed.

I'm taking all of this advice to heart. Thanks so much again for the assistance. Invaluable as always.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: OsCommerce
« Reply #6 on: December 31, 2014, 12:12:15 AM »
devtay

Upgrade to sme9 is ONLY via backup & restore process, & it should go smoothly.
A basic server with users, ibays & settings from the backup should be running straight away.

As always the recommendation is to remove custom templates, & reconfigure them for SME9 after the install & restore is done.
The amount of extra effort on post upgrade reinstallation of contribs & "retweaking", will depend on how many contribs & tweaks you have made to your sme8.1 server.
Check the wiki for availablility of compatible contribs, not everything is working correctly on SME9 as yet, but good progress has been made & many contribs work OK.

Re osCommerce etc, there are a few db settings particularly re PHP that you will need to configure, & some for ibay access & file size issues, easily done with db commands though.
Ask again when the time comes or read the Wiki.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #7 on: December 31, 2014, 04:46:31 AM »
I'm mostly worried about my 50gb worth of email and my custom php web app making it through the upgrade. I have also yet to be 100% successful with a usb backup.

Last time I did an upgrade and restore I used affa and one other contrib that listed the contribs I had installed on the old server and didn't have on the new one. I'll have to do some reading on the forums to get a good handle on the process from 8 to 9. Thanks for pointing out that I need to check for v9 compatibility of my installed contribs. I neglected to remove my custom templates last time too. That was a headache.

Truthfully, I've been waiting for an excuse to play with v9 anyways. Thanks again.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: OsCommerce
« Reply #8 on: December 31, 2014, 06:11:49 AM »
devtay

All user email is included in a backup.
Also included are all files in ibays, so if your web app is in an ibay it will be backed up & restored.
All mysql databases are backed up & restored too (ie mysql db for your web app).
Things in /opt are not backed up by default so you need to add /opt to the backup inclusion list, refer Backup server config Howto.
You might have to tweak php settings for your web app to suit SME9, but any settings configured in SME db system will be backed up & restored.

So far it sounds OK.

I would stick with the built in backup to USB done in the console menu (login as admin to server). It should work fine & you can use that backup to restore to SME9 during the first reboot.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: OsCommerce
« Reply #9 on: December 31, 2014, 07:38:24 AM »
Near Off Topic, but I would add it, with SME you can Install phpvirtualbox and test your dev directly on the server, the developer of phpvirtualbox has released a new version, and I hope (we have exchanged some emails) that the development will come again.

Anyway that solution is not comparable to a proxmox solution where the sme is virtualized but it allows you to get on the same server, your sme and other virtual servers.

My 2C if you want to reinstall and buy a new server.
« Last Edit: December 31, 2014, 07:46:47 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #10 on: December 31, 2014, 02:43:36 PM »
Thanks Janet, I'm going to try the backup today and see how it goes. Once I have a good backup I can play some. I appreciate the advice.

devtay

All user email is included in a backup.
Also included are all files in ibays, so if your web app is in an ibay it will be backed up & restored.
All mysql databases are backed up & restored too (ie mysql db for your web app).
Things in /opt are not backed up by default so you need to add /opt to the backup inclusion list, refer Backup server config Howto.
You might have to tweak php settings for your web app to suit SME9, but any settings configured in SME db system will be backed up & restored.

So far it sounds OK.

I would stick with the built in backup to USB done in the console menu (login as admin to server). It should work fine & you can use that backup to restore to SME9 during the first reboot.
You can't stop what's coming. It ain't all waiting on you.

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #11 on: December 31, 2014, 02:47:30 PM »
stephdl,

phpvirtualbox looks promising. I'm going to check out the tutorial and mess with it some. Great suggestion. Thanks.

Near Off Topic, but I would add it, with SME you can Install phpvirtualbox and test your dev directly on the server, the developer of phpvirtualbox has released a new version, and I hope (we have exchanged some emails) that the development will come again.

Anyway that solution is not comparable to a proxmox solution where the sme is virtualized but it allows you to get on the same server, your sme and other virtual servers.

My 2C if you want to reinstall and buy a new server.
You can't stop what's coming. It ain't all waiting on you.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: OsCommerce
« Reply #12 on: December 31, 2014, 06:38:04 PM »
I spoke about the phpvirtualbox contribs http://wiki.contribs.org/Phpvirtualbox
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline devtay

  • *
  • 145
  • +0/-0
Re: OsCommerce
« Reply #13 on: December 31, 2014, 11:23:42 PM »
I know you guys are probably not interested but I was able to get OsCommerce Online Merchant 2.3 installed and running on SME 9.0. It wasn't as bad as I thought and I don't believe I could have done it as quickly as I did without the invaluable help from this forum. Thanks Janet and stephdl.

I ended up using some old hardware to install SME 9 on. Everything went pretty well except my KVM locks up on reboot. Going to work on that later. I got my development box and that's the important thing. After install, did a yum update to get everything updated. Installed phpmyadmin and sme9admin, configured remote access and started working through it.

I ended up creating an iBay to install OsCommerce in called shop as Janet suggested. Here are the details for the iBay setup:

iBay name: shop
Group: select the group created above from this list
User access via file sharing or user ftp: Write = Group, Read = Group
Public access via web or anonymous ftp: entire internet (no password required)
Execution of dynamic content (CGI, PHP, SSI): Enabled
Force secure connections: Disabled

The rest of the install was pretty much per the instructions on the OsCommerce wiki here: http://library.oscommerce.com/Online&en&oscom_2_3&getting_started&requirements

I created a database from the console with:
create database <databasename>;

I created a user for the database with:
grant all on <databasename>.* to username@localhost identified by 'password';
flush privileges;
quit;

After that I gathered all of the configuration information so I had it to copy and paste in the setup pages. Then connected to the server with filezilla and uploaded the catalog folder from the OsCommerce zip file to the shop iBay html folder.

The only tricky part was getting the file permissions right. When the iBay is created filezilla shows the permissions to be 660. I went to the console and chmod all of the files in /home/e-smith/files/ibays/shop/html to 755 and went to http://www.domain.com/shop and ran through the install procedure. Pretty easy so far. They have strict instructions in the wiki to change the permissions on a few files and delete a folder. I'm working through the security issues that the wiki points out now so there are a few things to do before I'm done with the install.

I did create a user account and make sure I could get into the site. Email notification is working and all is good after a reconfigure and reboot. I'm probably going to wipe this server out and do some more testing and reinstalling before I'm done, but it looks to be working so far. I haven't tried to test anything for security just yet so there may be more changes down the road.

Thanks guys for all the help. Time for a long weekend. Happy New Year everyone.
You can't stop what's coming. It ain't all waiting on you.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: OsCommerce
« Reply #14 on: January 02, 2015, 10:01:52 AM »
You should start a wiki page in the Howto Section, it is a good way to record informations and the detail of all needed commands

Concerning the ownership of the Ibay, you don't need normally to setup them manually, a similar approach could be done like this http://wiki.contribs.org/OwnCloud#Version_7.0.4

But I guess that if you let the admin to be the owner of the Ibay with permission 'wr-group-rd-everyone' (write by group, read by everyone), that should do the trick. In fact the specific permissions that you set, will go when you will reconfigure your server, or the Ibay

for the Mysql DB, either you could do by CL or by phpmyadmin, both are valuable.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!