Neobux

Saturday, June 28, 2008

DIY Macro Photo Studio

Last Monday, when I was surfing the internet I find out about macro photo studio from viNcee in Low Yat forum. At first, I have no idea what it was but after a few reading, I realized that I already built it before but the set up was much simpler than at strobist.

A few years ago, I was selling some items on lelong.com.my. To attract buyers I had to take picture of all of my items. So, this was my first time experiencing macro photography. But with small budget, I only  used point and shoot (PnS) camera, a Canon Power A610.

Previous Set Up

The set up was so simple. I use 2 boxes and a few sheets of A3 paper. I use room light and camera flash as the lighting. The outcome was acceptable but because the source of light was minimum, I had very tough time to get a clear picture. Most picture were dark. Even with photoshop, I couldn't correct them.

When I read the guide in the Strobist and also some posts by forumers in Canon Digital Photography Forum, I found that their pictures are superb with their own design of Mini Studio. There are a lot of design. If I'm not mistaking, the price of those light box can easily reach thousand hundred ringgit base on the material and also the size. However, in strobist blogspot, they claimed that the cost of their macro mini studio are no more than $10. Is it true?

So I forked out my RM20 and go to the nearest stationary shop. I will not use "used box" because I will try to make my own box from scratch.

Friday, June 13, 2008

Part 6 - Installing PHPMyadmin

6.0 Installing and configuring PHPMyadmin

  1. Extract the downloaded file into E:\ server\.
  2. Change the folder name from phpMyAdmin-2.6.2-pl1 to phpmyadmin or any other name you like.
  3. If you had followed step by step from the tutorial, your E:\server directory will look like this.
    E:\server
    +Apache2
    +mysql
    +php
    +phpmyadmin
    +www --> default directory
  4. Because phpmyadmin folder is outside of our default directory, we cannot display or get any files or information from this folder when we typed http://localhost/phpmyadmin.
  5. Now, open httpd.conf file.
  6. Add this line:
    Alias /phpmyadmin "E:/server/phpmyadmin/"

    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
  7. The first line is to point /phpmyadmin as E:/server/phpmyadmin/, so every time we type http://localhost/phpmyadmin, we will be point to E:/server/phpmyadmin.
  8. Line in is for security reason. Phpmyadmin can only be open by localhost which have IP 127.0.0.1. (This IP if I’m not mistaken is especially for localhost, so other computer cannot open this directory).
  9. Restart your Apache2.
  10. Open your browser and type http://localhost/phpmyadmin, http://127.0.0.1/phpmyadmin, http://***.***.***.***/phpmyadmin (type your ip address).
  11. Previously, we had assign a password for our MySQL database. We cannot connect phpmyadmin to our database because by default phpmyadmin assume our administrator user ‘root’ has no password.
  12. Now we need to edit config.inc.php located in phpmyadmin folder, again by using our powerful notepad. If you can’t find this file, try to search config.sammple.inc.php and change to config.inc.php.
  13. Make these changes:
    From To
    $cfg['blowfish_secret'] = ' ';
    Only if you type auth_type=cookie
    $cfg['blowfish_secret'] = '(type anything, ex. jhgjhUAsAGjJS)'
  14. Log in using your mysql username and password.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Part 5 - Editing httpd.conf

5.0 Editing httpd.conf

  1. You can open httpd.conf in two ways.
    • Start Menu --> Programs --> Apache HTTP Server --> Configure Apache Server --> Edit the Apache httpd.conf
    • Open folder [Drive]:\server\Apache\conf\httpd.conf

Running PHP 5 as an Apache Module

  1. Add following line in the file (can copy and paste to the end of httpd.conf):
    LoadModule php5_module "e:/server/php/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

Configuring the Default Index Page

  1. Find DirectoryIndex. And add index.php.
    From -->DirectoryIndex index.html index.html.var
    To -->DirectoryIndex index.html index.html.var index.php
    This line tells Apache which file names to use when it looks for the default page for a given directory.
  2. Save your file and restart Apache by click Start --> All Programs -- > Apache HTTP Server 2.2 --> Control Apache Server --> Restart or by right-click the icon in the system tray and select restart.
  3. If all is well, Apache will start up again without any error.
  4. If Apache cannot start, try Start Menu--> Apache HTTP Server --> Configure Apache Server --> Review Error Log and see what are the problem.

Configuring Document Root

  1. I prefer to set my Directory Root other than default htdocs in Apache folder.
  2. Find DocumentRoot "E:/server/Apache/htdocs" and change to other folder. I pick e:\server\www\.
    From --> DocumentRoot "E:/server/Apache/htdocs"
    To --> DocumentRoot "E:/server/www"
  3. Do the same for,

Testing the PHP.

  1. Make a new file named phpinfo.php by using any text editor.
  2. Type this in the file.
  3. Put the file in the E:\server\www\ (--> because previously we had assigned this directory as default).
  4. Open your favorite web browser and type http://localhost/phpinfo.php.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Thursday, June 12, 2008

Part 4 - Installing PHP

php.gif

4.0 Installing and configuring PHP

  1. Extract the zip file (php-5.2.6-Win32.zip) to [Drive]:\server\php.
  2. Find the files called php.ini-recommended and rename it to php.ini.
  3. Open php.ini with text editor. (I prefer to use Notepad ++)
  4. Find ;extension=php_mysql.dll and delete “;”.
  5. Find ;extension=php_mcrypt.dll and delete “;”.
  6. Find extension_dir = "./" change to extension_dir = "./ext"
  7. Right click My Computer --> Properties --> Advance Tab --> Environment Variable. In system variables select Path and press edit. Add your php folder in the list e.g. E:\server\php. (optional)

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Tuesday, June 10, 2008

Part 3 - Installing MySQL

logo_mysql_sun.gif

3.0 Installing and configuring MySQL

  1. Unzip the downloaded file and run the setup.exe file.
  2. Click --> Next.
  3. Because we want to install in different folder, select Custom setup. Click --> Next.
  4. In the next windows, select MySQL Server and click Change…
  5. Change folder to [Drive]:\server\mysql. Click OK.
  6. Click --> Next.
  7. We are ready to install. Click --> Install.
  8. After finish installing, some MySQL.com advertisement will come out. Click Next and Next. And in the next dialog box, tick Configure the MySQL Server now. Click Finish.
  9. Click --> Next.
  10. Select Standard Configuration for fresh installation. Click --> Next.
  11. Check Install as Windows Service and Launch the MySQL Server automatically.
    Leave the Service Name as MySQL.
    Also check the Include Bin Directory in Windows PATH (optional).
    Click --> Next.
  12. Write your root password.
    For security, your password should have mixed-case letters and alphanumeric.
    Check the Enable root access from remote machine.
    Click --> Next.
  13. Click --> Execute.
  14. Now we have finish using the wizard.
  15. Click --> Finish.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Part 2 - Installing Apache

apache_logo_medium_2.png

1.0 Before you begin

Please download this software

Apache 2.2.8 [win32 binary] http://apache.leakage.org/httpd/binaries/win32/
(apache_2.2.8-win32-x86-no_ssl.msi)
MySQL 5.0.51b [Windows (x86)] http://dev.mysql.com/downloads/mysql/5.0.html#win32
(mysql-5.0.51b-win32.zip)
PHP 5.2.6 [windows binaries] http://my.php.net/downloads.php
(php-5.2.6-Win32.zip)
phpMyAdmin 2.11.2 http://www.phpmyadmin.net/home_page/downloads.php
(phpMyAdmin-2.6.2-pl1.zip)

I’m using Windows XP with sp2.

2.0 Installing Apache 2.2

  1. Double-click the Apache installer file (apache_2.2.8-win32-x86-no_ssl.msi) to launch the Apache automated installer.
  2. Click --> Next
  3. Select “I accept the terms in the license agreement" and click Next.
  4. Click --> Next
  5. Example if your url is www.somenet.com (this is not important because we only want a personal webserver).
    Network Domain :
    somenet.com
    Server Name : www.somenet.com
    Administrator’s Email Adress : webmaster@somenet.com (your admin email address)
    Select for All User, on Port, as a Service – Recommended
    Click --> Next.
  6. Select Custom setup. Click --> Next.
  7. I want to install all my server program in different location. So, select Apache HTTP Server 2.2.8 and click Change.
  8. Type [Drive]:\server\Apache to change installation folder. This is depending on what folder you want to install. In this case, I want to put all installation of Apache2, MySQl, and PHP in the same e:\server\ folder.
    Click --> OK --> NEXT.
  9. We are ready to install. Click Install.
  10. Installing... After some time, some DOS windows will appear and disappear.
  11. If everything going well, we can see this window. Click --> Finish
  12. To check your installation, open your favorite browser. Type http://localhost/ or http://127.0.0.1. If you see It Works! text, it means you installation is correct.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Sunday, June 8, 2008

Part 1 - Web Server

Introduction

Now I decided to learn more about some of Open Source Content Management System (CMS) like Joomla, Drupal, CMS Made Simple and e107. These CMS and also most of the CMS require PHP (server-side HTML embedded scripting language) and MySQL (open source database), and most importantly a webserver.

Click here to see the list of the CMS.

When I said webserver, it doesn’t mean those expensive server offered by our country webhosting company. What I means is your normal Personal Computer, equipped with require programs and services installed which listens to HTTP (and other web requests) and serves content. Now day, setting up a webserver is easy.

Hardware requirement?

My test machine is 5 years old PC with this specs:

Athlon XP 2500 (1.8Ghz)
256Mhz DDR Ram
Windows XP SP2

So, anything newer than this PC can work properly.

Software?

Automatic Installation (Packages)

Currently, there are a lot of webserver package or also known as all-in-one webserver. These packages are a bundle of apache, mysql and php. Most of the packages also include phpmyadmin, a web based database management system. User only need to install the package and it will automatically install and setup your computer.

This is the list of the webserver package (please give comment to add other):

  1. EasyPHP
  2. XAMPP
  3. Abyss Web Server
  4. WAMP (Windows)
  5. MAMP (Machintosh)

Some of the package offered Lite version. This Lite version is a small version of the package with basic function but still can serve as a webserver. Some of the Lite version can be save and run in a thumbdrive like XAMPP Lite. They are ready-to-run webserver, no installation required.

Wednesday, June 4, 2008

My DIY steel cabinet

Last Saturday (a week before school holiday), I was planning to tidy up my store room. Just for preparedness for school holiday. My relative might come to visit us.

Actually this room is a normal bedroom. But lots of things from my single life to my wedding gifts (glasswares etc.) to my old Lerun mountainbike were scattered on the floor until I can't enter the room. No more empty space! Even if I tidy up the room, it still a mess.

Fixed cabinet is not an option because it costly and I'm not the owner of the house (yeah.. this is a rent house). So I decide to make a steel cabinet. Easy to assemble, disassemble and reassemble for my new house (when I get one).

~~~~~

Plan

My first draft

The room has 10 fts wide and 10 fts high. So I decide to have 8 fts high cabinet with total of 5 compartments including bottom (floor) and top. The width is fixed to 2fts and length is 4~5 feet. My budget was only RM200.

I use the 4fts X 2fts X 8fts dimension for minimizing the cost. After calculating all possible dimension plus to maximizing the use of all 10fts steel angle, I found that this is the best solution.

I need to buy only 8 pieces of steels. From the draft picture, I need 4 X 8fts, 8 X 4fts and 8 X 2fts of angle steel. 4 pieces will be cut into 8fts and 2fts and another 4 will be cut into 4fts, 4fts and 2fts. So, if you calculate, I get all the steel I need.

For the plywood, I need only one 8fts X 4fts plywood and cut into 4 parts.

Actually I am planning to build 2 cabinets with total length of 8fts but as this is my first time making a steel cabinet, I sticked to only one cabinet. This is a trial and error project.

~~~~~

Tools

tools

a. 10fts angle steel
b. Hand socket (1/2)
c. Spanar (Drive) No. 13
d. Nut and bolts (1/2)
e. Washer (optional)
f. Steel step ladder

(p/s: I'm not a tool man so please correct me with the name of the tools)

Cost

I surveyed a few hardware shops.

Items 1st Shop 2nd Shop 3rd Shop 4th Shop
10fts Angle Steel (Large) RM18 RM20 RM19 RM20
Plywood RM42 RM42 RM43 RM44
Cutting Service (Steel) none Free RM1/cut none
Cutting Service (Plywood) none RM6 RM10 RM5
Nut and bolts - RM4 for 20 pieces - -

This is the comparison of price among hardware shop near my house. I summarize into only 4 shop. I don't know the cheapest price for all the items but with limited choice, I had to accept want they offered.

The price of plywood is almost the same with all shop but the cutting services may differ. So the cutting service must be add to the total cost for a plywood. Be aware that some small shops don't have the service.

After a small talk with some of the shop owner they all said that the price of steel increase RM2~RM4. Last time, the price of 10fts Angel Steel is only RM17~RM18 for large angle steel, and RM15 for small.

For angle steel, not all shop have the cutting service. From all the shop I surveyed, only 2 have the cutting tool and other asked me to wait (they send to other shop to cut) or asked me to cut at other shop (surely I will not buy from this shop). Actually the cutting tool is so simple and small, I wonder why not all shop have it?

So at the end I picked shop number 2 because of it free cutting service and luckily the nearest.

Total cost

  1. 10 X 10fts angle steel --> RM20 X 8 = RM160
  2. 1 X plywood + cutting = RM48
  3. Nuts and bolts --> RM4 X 2 packets = RM8

Total --> RM216

RM16 more than my budget.

~~~~~

The set up

The set up is very easy but take time. I start cleaning up my store room at 11:00 pm and finish set up and tidy up at 2 a.m. May be if only setting up the steel cabinet will only take less than an hour.

Finish products

Finished

The finish products. Just ignore the old curtain behind :).

As a reminder, when buying the angle steel please ask the cutter to cut a bit for both ends of 4fts and 2fts steel. If not, you have problem when assembling the cabinet. This happen to me, and it give me really a hard time hammering the steel to fit into place.