Setting Up MySQL - Database, Users And Sample Table

We discussed how to install LAMP in one of our previous articles. Some of you may be wondering how to create databases, users and tables on your newly installed MySQL server. This blog post introduces the preliminary steps to work with your new LAMP server.

We are going to learn the following:

  • Changing MySQL user password
  • Creating databases
  • Deleting databases
  • Creating MySQL user accounts
  • Deleting MySQL user accounts
Taxonomy upgrade extras: 

How To Install LAMP

how to install LAMPLAMP is an acronym which stands for Linux, Apache, MySQL and PHP. The letter P also stands for Perl and Python programming languages. LAMP is a free software stack which powers, primarily, web servers. Most GNU/Linux distributions bundle these packages in the install media and repositories. Let us take a look at how to install LAMP using Fedora. I will restrict the P in LAMP to PHP only for this article. Perl and Python fans, bear with me.

While installing Fedora you can choose to install "Web Sever" which contains these packages. You can install them later also. Let me walk you through the actual steps to get LAMP working on your computer. I assume you are running Fedora 8 on your computer.

1. Launch the terminal by clicking

Applications>System Tools>Terminal
Taxonomy upgrade extras: 

Are You Looking For .pidgin Directory?

Do you want to copy your pidgin settings from one computer to another? Do you want to fiddle with your pidgin settings? You are likely to look for a directory called .pdigin.

Pidgin stores its files in ~/.purple

Copy that directory to copy your pidgin settings on the new computer.

Taxonomy upgrade extras: 

How To Reset KWallet Password

The problem: You fire a KDE application, the application requires a password to continue, the KWallet window pops up asking for its password. You try your frequently used passwords. None of them work.

This happened to me when I tried to open a password protected PDF document with Okular. I knew I never set the KWallet password on this computer.

The solution: To reset your KWallet password, delete the kwalllet directory.
Type this in your command line:

rm -rf ~/.kde/share/apps/kwallet/
Taxonomy upgrade extras: 

Adding * To Required Zend_Form Field Using CSS

You want to add an asterisk to required fields, huh?

add asterisk to zend form required element

There are many approaches to accomplish this. One among them is setting the requiredSuffix option to the label decorator of the form element. Assuming $element is your Zend_Form_Element object:

<?php
$element
->getDecorator('label')->setOption('requiredSuffix'' * ');
?>

Another option is to add the * while setting the label.

<?php
$element
->setLabel('My Label *')
?>

The third, which I am currently using in one of my Zend Framework powered applications is adding * using CSS. The default label decorator generates the following mark-up.

FOSS Project: 
Content Type: 
Technology: 

Autocomplete Example With Zend_Dojo_Form_Element_FilteringSelect And Zend_Dojo_Data

Zend Framework AutoComplete example with Zend_Dojo_Form_Element_FilteringSelect
Zend Framework brings lot of user interface goodies with Zend_Dojo family of classes. In this article let us explore how to build a form element with autocomplete feature.

As a prerequisite you must be familiar with

  • Zend_Controller_Action
  • Zend_Layout
  • Zend_Form

Would it be nice if I tell you that you don't need any JavaScript knowledge? Zend_Dojo empowers PHP programmers to build dynamic and appealing forms without writing a single line of JavaScript.

This example has been tested with Zend Framework 1.7.0.

In this example, we will build a text element where the visitor can either select the user from the drop down list or type the username. While typing the username, the form element generates a drop down list filtering the data from user input. Take a look at the filteringSelect Dijit example to understand the type of form element we will be building.

FilteringSelect differs from Combobox Dojo widget in that, the value of the form element must be provided in the list. Also, you could display the username on the screen and set the 'user id' as the element value.

We will use the autoCompleteDojo action helper to send JSON data.

Let's start coding.

Programming: 
FOSS Project: 

Installation Of phpunit/PHPUnit Requires PHP Extension dom

So, you are trying to install phpunit/PHPUnit via pear and you got a message that PHP extension dom is required.

Here's how your resolve it.

pear channel-discover pear.phpunit.de

You would see output like:

Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded

Next, install phpunit/PHPunit

pear install phpunit/PHPUnit

Oops. It fails. Sample message below:

Taxonomy upgrade extras: 

Use Okular To View PDF Documents

Ever since I discovered Okular, a universal document viewer for KDE 4, I haven't used another PDF document reader. I just love the KDE user interface. You should also try it. I'm sure you will like it.

Lately, I have been working on a web application that generates PDF quotes on the fly. While writing the PDF document generator script, I have to run the script and see how the document formatting has appeared. With Okular, I open the document only once. Upon each successive write operation to the PDF file, Okular refreshes the document. How cool.

Taxonomy upgrade extras: 

Pages