Life of a Geek Admin

The Daily adventures of a true geek administrator

Life of a Geek Admin - The Daily adventures of a true geek administrator

How To Fix LibreOffice Spell check

If you are a user of LibreOffice you probably have run into the issue after an upgrade where your spell check has stopped working. Uninstalling and reinstalling doesn’t seem to do the trick.

This issue happened to me after I had installed LibreOffice 3.5.5 and 3.6.0. After a bit of digging around found a solution that worked.

Close LibreOffice (+ Quickstarter, if enabled and running)
Open Windows Explorer

Windows XP
Go to ‘…\Documents and Settings\<user name>\Application Data\LibreOffice\3\user\extensions\bundled’
Rename the folder ‘bundled’ to (example ‘bundled_old’)
Restart LibreOffice

Windows Vista / 7
Go to ‘…\Users\<user name>\AppData\Roaming\LibreOffice\3\user\extensions\bundled’
Rename the folder ‘bundled’ to (example ‘bundled_old’)
Restart LibreOffice

The restart will rebuild the bundled directory and files and fix spell check.

Install OpenDb on CentOS 5.5

The Open Media Collectors Database (OpenDb) is a PHP and MySQL based inventory application that allows you to easily catalog and lend out your stuff. Its primary purpose is to catalog media related items, such as DVD’s, Books, CD’s etc, but its so flexible you can use it to catalog pretty much anything.

Opendb ships with many media related (DVD, VCD, CD, VHS, games, books, and laser discs.) item type definitions, or you can download a user contributed item type or create your own. Currently the application is at version 1.5.0.7 and there is active development in the SVN.

Requirements

To install the Open Media Collectors Database (OpenDb) on your site, you will need the following:

  • WebServer (Apache 1.3, 2.x, IIS,…) – Apache is recommended, but IIS should work too.
  • PHP 4.3.0+, 5.X
    • track_vars must be enabled.
    • register_globals can be enabled/disabled. You should really have this disabled for security reasons anyway!
    • php-mysql or php-mysqli module must be installed, so that PHP can access MySQL.
    • php-gd module for image thumbnail generation.
  • MySQL Database 4.X, 5.X
  • SMTP server or PHP email configured. If this is not possible, be sure to set the email configuration Mailer to ‘none’. The borrower functionality is severely restricted without email functionality.

Installation

The current version for OpenDB is 1.5.0.7 and can be found at http://sourceforge.net/projects/opendb/. Download the file to your server. The downloaded file is in zipned format which will require unzip to open. Our destination for the files is /var/www/html/opendb, for which we will need to create the directory and unzip the file contents.

$ sudo mkdir /var/www/html/opendb

$ sudo unzip OpenDb-1.5.0.7.zip -d /var/www/html/opendb

Change a few directory permissions for the installer to be able to work correctly.

$ cd /var/www/html/opendb

$ sudo chmod ugo+w ./log ./include ./importcache ./itemcache ./upload ./httpcache

Now that the files are in their final destination we can run the OpenDb installer. Run the OpenDb installer, by opening the install.php in your browser. Use a URL something like http://<your_server>/opendb/install.php

I attached an OpenOffice Doc with more detail OpenDb Installation

php-Inventory on CentOS

Found a simple PHP /MySQL solution for tracking Inventory parts to fit a need to track spare computer parts.

PHP Inventory is free, open-source, web-based inventory tracking solution, designed to provide small businesses the efficiency of large companies.

Inventory Control reduces costly inventory errors, improves customer service, and will increase the value of your business. PHP Inventory is easy to use and implement without the cost or complexity of larger inventory tracking systems.

Download the zip file from http://www.phpwares.com/content/php-inventory to your server and unzip to /var/www/html.

$ cp php-inventory_1.2.zip /var/www/html/
$ sudo unzip php-inventory_1.2.zip
$ sudo mv php-inventory/ inventory/

Php-inventory requires MySQL database to be setup. To keep with good practices we should setup an MySQL user and make that user the owner of the database.

Open a terminal and connect to the MySQL database. The passwords are made up and you should use your own.

$ mysql -u root -p
mysql> CREATE DATABASE `inventory` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER 'phpinv'@'localhost' IDENTIFIED BY 'phpMy1nv';
mysql> CREATE USER 'phpinv'@'%' IDENTIFIED BY 'phpMy1nv';
mysql> GRANT ALL ON `inventory` . * TO 'phpinv'@'localhost';
mysql> GRANT ALL ON `inventory` . * TO 'phpinv'@'%';
mysql> exit

Now that we have a database created and permissions set we need to run the supplied sql code. This is easiest to do this with phpMyAdmin or at the command line with MySQL. For ease of use I will be using phpMyAdmin.

Login to phpMyAdmin and click on the inventory database. Open site.sql with a text editor and select all , copy the text. Click on the SQL tab in phpMyAdmin and paste the contents in and click on the Go button. You should see a message stating your code executed successfully and on the left you will now see 7 new tables.Open site.xml and edit the database section with your database details.

<database type="mysql">
<server>localhost</server>
<login>phpinv</login>
<password>phpMy1nv</password>
<default>inventory</default>
</database>

Change the title of the system edit line 8 of templatesadminlayout.htm between the <title> tags.

Open a browser and go to http://localhost/inventory/index.php and login with username of admin with a password of test, after login be sure to change the passwords for the admin and regular user.

Add this to your “.htaccess” file to prevent viewing of the xml config file.
</Files ~ ".xml">
Order allow,deny
Deny from all
Satisfy All
</Files>

Note: They are currently working on a version 2 of the code and are looking for testers.

phpmyfaq on CentOS 5.5

Recently I ran into the need to create a Knowledgebase on my local network, basically a Faq that I could post how I have resolved issues with different hardware and software issues with my company. With a search on Google I came across phpmyfaq that runs on PHP with MySQL. The current version will not run on CentOS due to the requirement of PHP 5.2.x or higher which is not available in the stable repositories for the current CentOS release. However I was able to find 2.0.17 supports PHP 5.1.x series which is available.

Download 2.0.17 tar.gz file from phpmyfaq 2.0.17 tar to your server.

$ sudo su -
# tar zxvf phpmyfaq*.tar.gz -C /var/www/html/
# cd /var/www/html
# mv phpmyfaq-2.0.17/ faq/
# cd faq/

Create some sub-directories needed by the application.
# mkdir directory attachments
# mkdir directory data
# mkdir images/Image
# mkdir pdf
# mkdir xml

Set a few directory permissions for the installer to create the files it needs.

# chmod -R 755 attachments/
# chmod -R 755 data/
# chmod -R 755 pdf/
# chmod -R 755 xml/
# chmod -R 777 inc/
# chmod -R 777 images/

Exit as root and revertback to your user id. Create blank MySQL database and faq user and grant access For this example we are creating a user called faq with the password pHpmyf8q and a database called phpmyfaq and granting the faq user all rights to the database.

$ mysql -u root -p
mysql> CREATE DATABASE `phpmyfaq` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER 'faq'@'localhost' IDENTIFIED BY 'pHpmyf8q';
mysql> CREATE USER 'faq'@'%' IDENTIFIED BY 'pHpmyf8q';
mysql> GRANT ALL ON `phpmyfaq` . * TO 'faq'@'localhost';
mysql> GRANT ALL ON `phpmyfaq` . * TO 'faq'@'%';
mysql> exit

Now we are ready to open the installer web page and set the database settings and admin user account to finish the installation. Open a web browser and type http://<your_server_name>/faq/install/installer.php.

You will be presented with a page asking for database type and connection information as well as admin user and id. Using the information from this example

SQL Server: MySQL 4.x/5.x/6.x (PHP 4/PHP 5)
SQL server host: localhost
SQL username: faq
SQL password: <super secret pasword>
SQL database: phpmyfaq
Table prefix: knowledgebase (if you plan to have more than one Faq you need to put a value here, otherwise leave it blank)

Fill in the information in the phpMyFAQ information and click on Install phpMFAQ 2.0.17 now! and you are done.

phpMyFAQ is now running and is just in need of a few users with rights to post. Access the admin page at http://<your_server_name>/faq/admin/index.php and supply the credentials you setup. Once you are in, you can add users. To access the faq http://<your_server_name>/faq/.

Switch to our mobile site