Building PHP Webserver on Nginx with PHP CGI
Doesn't like the Apache webserver, nginx didn't have the auto-configuration feature from PHP and library loading. The way to make nginx be a PHP webserver is passing the request to PHP CGI. How?
The first step must be installing the nginx and php5 package. For this post i'm using Ubuntu 10.04 LTS.
apt-get update nginx apt-get update php5
Check your nginx installation with start the service:
service nginx restart /etc/init.d/nginx restart
Now, if the nginx working, let's connect it to the PHP CGI. First, run the PHP CGI so that the PHP listen at 127.0.0.1 with port 9000.
/usr/bin/php-cgi -b 127.0.0.1:9000 &
Fixing Network Problems Ubuntu 10.04 on Dell Inspiron 14R N4010
A few days ago i bought a Dell Inspiron 14R N4010 notebook with pre-installed Windows 7 Home Premium 64-bit Operating System. But as a developer, i need to dual-boot this notebook with Ubuntu 10.04 Lucid Lynx. Although there are some bootloader problems with dual-boot Operating Systems, the Ubuntu installation was successful.
The problem come with the all of network interfaces, both of wired and wireless NIC wasn't able to be detected while installing and after installing the OS. For make it easier let's look what NIC that the Dell Inspiron 14R N4010 had:
- Wired LAN : Atheros AR8152 PCI-E Fast Ethernet Controller
- Wireless LAN : DW1501 Wireless-N WLAN Half-Mini Card (Broadcom)
Fix Bootloader Windows 7 and Ubuntu 10.04 using EasyBCD
Installing Windows 7 and Ubuntu sometimes make a mess to bootloader on some computers or laptops. After rebooting the PCs, the bootloader won't shown or some case the Windows choice didn't shown by bootloader or vice versa. One of the solutions is using application to rewrite the master boot record (MBR). One of the application that can be do this is EasyBCD, and it can fix the bootloader problems.

Then how to fix the problems using EasyBCD?
Matrix-Matrix Multiplication MPI C Source Code
Expanding from my previous post, "Matrix-Vector Multiplication MPI C Source Code". Now we create a program to calculate two two-dimensional matrices (array) with MPI. Same concept and algorithm with matrix-vector used to solve this problem, row-based operation.
Now the differences from matrix-vector just the array size and dimension.
#define AROW 3 #define ACOL 2 #define BCOL 3 #define MAX_VALUE 10
For proc_map() function please look at matrix-vector post, and here's the computational code for matrix-matrix multiplication.
Matrix-Vector Multiplication MPI C Source Code
Here's my first task for MPI Programming. Create a matrix-vector multiplication program using Message Passing Interface. Let's go directly to the source code and we can discuss it later if you want.
First, MPI with C language commonly use "mpi.h" and you still can use standard C library.
#include "stdio.h" #include "stdlib.h" #include "time.h" #include "math.h" #include "mpi.h"
Now, we need to define the size of matrices, A as [AROW x ACOL] and B as [ACOL x 1] so the result let's call it matrix C [AROW x 1]. Because the row of B must be equals with column of A and the result matrix C has row = AROW and single column. MAX_VALUE is the constant for defining maximum value of random number for matrices elements value.
#define AROW 3 #define ACOL 2 #define MAX_VALUE 10
proc_map() function is the function to map the each task to which process to do it.
/* Process mapping function */
int proc_map(int i, int size)
{
size = size - 1;
int r = (int) ceil( (double)AROW / (double)size);
int proc = i / r;
return proc + 1;
}
Google Search
Blogroll
- Alexander Rahardjo
- Andrew P. Goenardi
- Arlisa Yuliawati
- Inge Priangga Abadi
- Jeffrey Hermanto H.
- Lanang Adhitya Nugraha
- M Ulin Nuha
- Rahadian D. Dewandono
- Reza Adhitya Saputra
- Simson P. Situmeang
- Tobias Benito
Member Of
Miscellaneous
Categories
- Computer (49)
- Database (7)
- IDE (5)
- NetBeans (2)
- Samsung Smart TV SDK (3)
- Manufacturer (4)
- Networking (14)
- Operating System (9)
- Programming (37)
- C (10)
- C# (9)
- C++ (1)
- Java (9)
- Javascript (3)
- PHP (4)
- SmallBasic (1)
- Security (2)
- Games (2)
- ConsoleGames (1)
- FlashGames (1)
- WebGames (1)
- Life (3)
- International (1)
- National (1)
- Personal (1)
- Mobile Device (6)
- Android (3)
- Samsung (2)
- Sony Ericsson (2)
- Multimedia (1)
- Video (1)
- Travel (3)




