Archive for the 'Uncategorized' Category

Install FontMatrix on Ubuntu 8.04 Hardy Heron

FontMatrix is a font manager available for Linux. It can be used to preview fonts installed on the System.
To install FontMatrix on Ubuntu 8.04 the deb file can be downloaded from :
http://www.getdeb.net/app/Fontmatrix

PATH_INFO, ORIG_PATH_INFO, APACHE and PHP

A little while back I was trying to make a router for my application which I had grouped into classes. So a url could be like this :
www.site.com/index.php/class_name/method?id=15
or
www.site.com/index.php/controller/action?id=15 in the MVC style
or
localhost/project/index.php/class_name/method?id=15

Enable Apache mod_rewrite on Windows

In httpd.conf file the following line should be uncommented :
LoadModule rewrite_module modules/mod_rewrite.so
by removing the # sign before it.
Then comes a section which looks like this :
<Directory "C:/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
[...]

List foreign keys in mysql

One interesting way of listing foreign keys is like this :

select
concat(table_name, ‘.’, column_name) as ‘foreign key’,
concat(referenced_table_name, ‘.’, referenced_column_name) as ‘references’
from
information_schema.key_column_usage
where
referenced_table_name is not null;

Create foreign key using Phpmyadmin

The innodb storage engine supports foreign keys in Mysql.
To create foreign keys in phpmyadmin :
1. Convert both tables into innodb.
2. View the structure of the table which will have a foreign key. Make the referencing field an INDEX.
3. Now come back to structure view and click Relation view. In the Relation view page the field [...]

Mysql View DEFINER and SQL Security

A little back I tried to backup a database from my webhost and restored it on my localhost mysql. It had a few views. On accessing the views in phpmyadmin mysql gave the error :
#1449 – There is no ‘projects’@’localhost’ registered

Email Hacking Facts and Fictions

Lots of newbies keep asking or search for techniques to hack someones email password like yahoo gmail msn etc.
First of all it should be noted that getting someone’s password out of a server is something impossible for the very simple reason that in most cases the password is stored no-where. Newbies think and make attempts [...]

Unicode UTF-8 characters in Wordpress Blog Title

Sometime back I was trying to put unicode characters(utf-8) in the title of a blog from wp-admin > settings > general. After saving it became like ?????????.
All pages had utf-8 in their meta tags so the issue was somewhere else. A working solution was found :

Draw Plot Graphs with PHP

Googling up for graph plotting solutions in PHP , found these free libraries :
1. PHPLOT – Can create Pie Charts , Bar Graphs , Line Graphs , Point Graphs etc.

Create AutoIncrement column/field in Apache Derby

While creating a table a particular column / field can be made autoincrement as :

CREATE TABLE students
(
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
name VARCHAR(24) NOT NULL,
address VARCHAR(1024),
CONSTRAINT primary_key PRIMARY KEY (id)
) ;