Koozali.org: home of the SME Server

after update no access to oscommerce anymore

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: after update no access to oscommerce anymore
« Reply #15 on: April 25, 2008, 11:59:20 AM »
Yezzz, I am root and the result of history | grep opt | grep rm is: 712 history | grep opt | grep rm
OK, than I do not know what wrecked your server exactly, but it sure is not nice. You mentioned phpadmin-multi shortly did you also update that one?

Are you using PuTTy to access the terminal from a client? If so that would be nice (as you can copy the screen output and post it here as well as copying commands to the terminal from the forums).

Perhaps we can try and install smeserver-oscommerce again, but we need to remove it first as it is still listed as installed, somehow:
Code: [Select]
rpm -e --noscripts smeserver-oscommerceVerify that it is no longer there:
Code: [Select]
rpm -q smeserver-oscommerceThat should output something like
Code: [Select]
package smeserver-oscommerce not installed
If it was removed we can now try and reinstall the contrib:
Code: [Select]
yum install smeserver-oscommerce --enablerepo=smecontribs
It would be nice if you could copy the output to the screen in this thread to see if something strange is happening.

After installation do
Code: [Select]
signal-event post-upgrade
signal-event reboot

Login as root again and verify that
  • you have an oscommerce folder in /opt
  • that the database is installed using the command listed in an earlier post
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: after update no access to oscommerce anymore
« Reply #16 on: April 25, 2008, 12:19:09 PM »
Amazing  :grin: oscommerce is back again. Everything ran fine!

Thank you!!! But how do I log in into phpmyadmin? Do you want to open a new thread?

Best regards
AlexG

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: after update no access to oscommerce anymore
« Reply #17 on: April 25, 2008, 12:21:54 PM »
Amazing  :grin: oscommerce is back again. Everything ran fine!

Thank you!!!
You're welcome. One word of advice: start making backups. :-)

But how do I log in into phpmyadmin? Do you want to open a new thread?
Please do so, but I guess we will have to use the same method as we did for smeserver-oscommerce.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: after update no access to oscommerce anymore
« Reply #18 on: April 25, 2008, 12:25:53 PM »
Ok, I will try it on my own (remove and install again). - Is there an instruction for a Backup (I mean a full backup)?

Have a nice day.

Best regards
AlexG

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: after update no access to oscommerce anymore
« Reply #19 on: April 25, 2008, 12:29:38 PM »
Ok, I will try it on my own (remove and install again). - Is there an instruction for a Backup (I mean a full backup)?
Yes do a a search on keyword backup in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline slords

  • *****
  • 235
  • +3/-0
Re: after update no access to oscommerce anymore
« Reply #20 on: April 25, 2008, 08:45:15 PM »
This is a perfect example of why we have always said:

"Don't do stuff in pre/post scripts"

In the postuninstall script on smeserver-oscommerce you have this:

Code: [Select]
echo "Restarting Apache..."
/sbin/e-smith/expand-template etc/httpd/conf/httpd.conf
/usr/sbin/sv t httpd-e-smith

echo "Deleting MySQL user and DataBase..."
mysql -u root -e "DROP DATABASE oscommerce"
mysql -u root -e "REVOKE ALL PRIVILEGES ON oscommerce.* FROM 'oscommerce'@'localhost';"
mysql -u root -e "DROP USER oscommerce@localhost;"
/sbin/e-smith/config delete oscommerce

echo "Removing install directory..."
rm -rf /opt/oscommerce

Well during an upgrade from one version to another you call this script.  So anytime you upgrade oscommerce you will wipe out your database and your directory.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: after update no access to oscommerce anymore
« Reply #21 on: April 26, 2008, 02:40:33 AM »
Hi

Can you explain please 'Don't do stuff in pre/post scripts" please. I don't know exactly what I have done wrong. Thank you
So, I will go on now and remove and install phpmyadmin again and will write the result in a new thread.

Best regards
AlexG

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: after update no access to oscommerce anymore
« Reply #22 on: April 26, 2008, 10:04:33 AM »
Hi

Can you explain please 'Don't do stuff in pre/post scripts" please. I don't know exactly what I have done wrong. Thank you
So, I will go on now and remove and install phpmyadmin again and will write the result in a new thread.
You ca not do anything about it as this is something the developer(s) of RPMs should think about, the pre/post scripts are code scripts invoked on installing/removing a package.

For users who want to upgrade smeserver-oscommerce in the future the following advice:

Do not upgrade immediately from smecontribs using yum. First we will make a backup of the database:

Code: [Select]
mysqldump --opt oscommerce > /tmp/oscommerce.sql
We will also dump the entry from the configuration database:

Code: [Select]
db configuration get oscommerce > /tmp/oscommerce.cdb
After that we will also backup the /opt/oscommerce folder and the configuration template

Code: [Select]
tar cvzf /tmp/oscommerce.tgz /opt/oscommerce/* \
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98oscommerce \
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60redir-oscommerce \
/tmp/oscommerce.sql /tmp/oscommerce.cdb

First remove the installed RPM with the following command that will prevent the invocation of the pre/post installation scripts (and therefore will not remove the folder containing the files or the database:

Code: [Select]
rpm -e --noscripts smeserver-oscommerce
Now you can safely reinstall a new version as we have the backup available for recovering data later.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)