Niland's Linux Pages

Were Ubuntu Linux Rules

The solution I found was;

Check the table index_process, delete the locks from there and also from var/locks and try again.

; but I only had to delete the files in var/lock to get it to work. I checked the table index_process and the column status was pending so that was OK, however if not then;

In the index_process table you should look for processes that have status “working” and change them to “pending”

Other then that you may have to check ownership and permissions with
chown [user:group] [path_to]/locks
chmod -R 777 [path_to]/locks
in ssh

Using SSH
The following is 100% safe to run from the directory where Magento is installed:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

If that is not working, try setting all directories to 777 by doing this:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+w var/.htaccess
chmod 550 mage

Return to 755 when done for safety

How to install oracle java 7 in ubuntu

Jun-23-2013 By nilands55s

First you need to remove openjdk for this run the following command from your terminal

sudo apt-get purge openjdk*

If you installed java 7 from any other PPA and you are having problem with java then you have to do following steps before installing the PPA menctioned here

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update

Install oracle java 7 in ubuntu 13.04/12.10/12.04
Open the terminal and run the following commands

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You are done

If you try to load too many items to Google shopping your Magento can get stuck on “Google Shopping synchronization process is running” with a rotating loading icon on the submit button. Some times the Google server is faster or slower than normal so it is hard to know what is too much. Anyway if it gets stuck it can time out your PHP session and be stuck for days on “Google Shopping synchronization process is running”. The solution is to change the database table core_flag and set googleshopping to 0. this can be done directly or with this update core_flag set state='0' where flag_code='googleshopping'; SQL. To keep it from timing out and getting stuck keep your upload quantity to 100 or less, I keep mine at 50.

Linux printer driver for Dell 1235cn

May-16-2013 By nilands55s

the Dell 1235cn printer I figured out a long time ago I made for them by Samsung. the Samsung CLX-3175 will work with this printer. The install is not fun and it creates a fold called cdroot (very generic). The files are UnifiedLinuxDriver_1.01.tar.gz, Smartpanel_1.01.tar.gz and PSU_1.01.tar.gz.

pagerank 3 backlinks

May-5-2013 By nilands55s

Pagerank 3 Backlink

For some odd reason, the Magento developers decided that an empty attribute should NOT be empty, but rather “No” or “N/A”, depending on its type. This is not just annoying, but in some cases can display wrong information which means confused visitors and potentially lost sales.

Fortunately, there is a fix that will solve the problem until the Magento developers fix this bug. Open the file /app/design/frontend/default/[theme name]/template/catalog/product/view/attribute.phtml in an editor and find the following lines:
<?php foreach ($_additional as $_data): ?>
<th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
<?php endforeach; ?>

If your template dose nmot use this file (like Templates-master) look in app/design/frontend/base/default/template/catalog/product/view/ attributes.phtml

Replace these lines with this:
<?php foreach ($_additional as $_data): ?>
<?php $_attribute = $_product->getResource()->getAttribute($_data['code']);
if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>
<th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
<?php } ?>
<?php endforeach; ?>

Save the file, upload it to your server and refresh the cache. Your “empty” attributes will now be hidden

Magento: Service Temporarily Unavailable

Dec-28-2012 By nilands55s

If you get an error in your Magento after installing an extension like:
Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Magento is a trademark of Magento Inc. Copyright © 2010 Magento Inc.”

To fix there is a file named maintenace.flag in your root of the website, delete this file and everything will work again

ISP-style Email Server

You surely know the big web hosters that allow you to rent a domain and use it to receive emails. If you have a Debian computer connected permanently to the internet you can offer the same service. You do not even need to have a fixed IP address thanks to dynamic DNS services like All you need is this document, a pot of delicious Coffee and a little time. When you are done with the setup your server will be able to…

  • receive and store emails for your users
  • let your users retrieve the email through IMAP and POP3 – even with SSL to encrypt to connection
  • receive and forward (relay) email for your users if they are authenticated
  • offer a webmail interface to read emails in a web browser
  • detect most spam emails and filter them out or tag them

This document is not a simple copy-and-paste tutorial. The intention is rather to make you understand the different components that you are using. There is deliberately no script that will do all the setup automatically. But in the end you will be skilled enough to debug problems yourself. If you feel you need help with your setup then read the hints on Troubleshooting. The setup in this tutorial has been tested very thoroughly by several people. Unlike many other Postfix tutorials on the Internet this is already the forth edition. Writing this tutorial took a month of work so these are not just quick draft notes thrown together but a consistent document guiding you.

The configuration described here is not very complicated but still needs to be done carefully. You are expected to have at least basic knowledge of:

  • MySQL (creating a database, granting access to users, basic SQL queries)
  • SMTP (what it is and what a basic SMTP dialog looks like)
  • POP3, IMAP (what they do and what the differences are)
  • basic Postfix configuration (understand the default settings in your, have read through the basic configuration document and know that your mail log file is at /var/log/mail.log)
  • Debian/Linux (general system administration, using a text editor, reading log files)

The Components

The configuration described here uses these components:

  • Postfix for receiving incoming emails from the internet and storing them to the users’ mailboxes on the harddisk. And for receiving emails from your users that are sent out to the internet (relaying)
  • Dovecot to allow your users to get their emails into their email client through POP3 and IMAP
  • Squirrelmail as a webmail interface (although any IMAP capable webmail interface will do)
  • MySQL as the database system that stores information about your domains, the user accounts and email forwardings
  • AMaViS for scanning incoming emails for viruses, spam and unwanted attachments

Read the rest of this entry »

ssh aggravation

Aug-6-2012 By nilands55s

When I first started out administering my website many of the directions came in the form of command lines as the assumption is there is no graphical interface to administer Ubuntu Linux server. At fist I was using Putty for my ssh client but I had to type too much as there was no copy and paste with Putty. Much to my relief I found you can start a terminal session on the desktop with a simple command ‘ssh [email protected] it will prompt for the password and you can paste it in too. Then just copy the sample command text and paste it in. Be sure to leave out the terminal prompt that is there in most sample code text. An example might be: # apt-get update && apt-get install aide. In the previous sample the prompt is # but mine is ~$