Archive for October, 2007

SUN 350 Plan

Tuesday, October 23rd, 2007

Last Sunday me and my wife inquired about the SUN Cellular Php350 plan. Well basically the idea came from my friend Dhing whom is a SUN subscriber. According to the representative we talked to, Plan 350 features the following

  • Unlimited Call & Text SUN – SUN
  • Free 250 Text to other networks
  • Free Phonekit of your choice between

Sony Ericsson K310i,

sony ericsson K310i

Nokia 2626

Nokia 2626

Philips S660

Philips S660

Samsung SGH-X510

Samsung SGH-X510

The plan is really enticing and tempting because of the offers this plan is giving. But I’m more concern on the performance of the network. I tried bringing up this problem to the representative to see how they react and tried to twist this problem with their marketing wit. Well they succeeded, because they were able to convince me to give the 350 plan a shot. The deciding factor basically is that they told me that postpaid subscriber have more priority on their network and “Always Busy Network” nightmare will seldomly occur as they explain. I was trying to get just a single plan but the representative advise me to get 2 plans each for me and my wife. She told me that I would be easier to call and text postpaid to postpaid because of the priority SUN is giving to them. So again I was captivated by their marketing advise and finally got the 2 350 plan which is 700 pesos a month, whew! But before we decided to get these two me & my wife talked first on how much we really consumed on our prepaid subscription with G****, according to her we are consuming more or less 1000 pesos a month. So comparing all factors weve finally decided that the 2 plans are still reasonable considering our lifestyle. So in the end we got the 2 350 plan with the Samsung SGH-X510 free phone.

So hows the plan now?

On this date we are on the 3rd day of the subscription, well in fairness the representative was right, connection to SUN-SUN was an ease. I didn’t have to wait for some time till my call is connected unlike the prepaid subscription. Text messaging? no problem! I tried making a test on how long it will take the text to arrive, so approximately 5 seconds, not bad as I have told my wife. So last night I’ve decided to broadcast my new SUN number to all my friends, I’m going to use this as my primary number and will later say goodbye to my G**** prepaid number.

So whats the benefit?

In our lifestyle me working in Manila and my wife in Pampanga. Call and text thru cellphone are our only communication from Tuesday to Saturday. Approximately we consume more or less 1000 pesos worth of load with our prepaid subscription. In fairness with G**** the service is the best, but with an alternative as offered by SUN and the savings we can get every month, who will refuse to avail.

1st PHP Developer’s Conference – Registration

Tuesday, October 23rd, 2007

Last time I announced it here the 1st PHP Developer’s Conference which will be held this December 1, 2007. As promised I will be posting updates every now and then of the event’s details so I would like to post this which was originally from the phpugph forum.

Guys, I would like to announce that the online registration for our event – PHP Everywhere! this coming December 1 – is now available! For the meantime, you can access it at http://www.jotform.com/form/72883452322 while AJ’s still preparing our home page to embed the registration form on our website.Reserve your tickets early to avail our early bird promo and get a 50% off discount on the ticket price & ticket special promo!

- Student Tickets for Php 100 (Orig. Price: Php 200)
- Professional Tickets for Php 500 (Orig. Price: Php 1,000)
- Student Special Promo – Buy 2 Take 1 for Php 200 (Orig. Price: Php 400 )
- Professional Special Promo – Buy 2 Take 1 for Php 1,000 (Orig. Price: Php 2,000)

Promo ends on November 16, 2007. So, what are you waiting for? Hurry and secure your ticket now!”

As stated from the website, tickets were lowered as a promo for the early bird registration. The prices are reasonable having that we have student tickets which are just 100 pesos  as if you are just buying a meal from a carinderia or local fast food chain. For the professional tickets,  500 pesos worth of a once in a lifetime experience is still cheap. So why wait, register early so that you can still enjoy these lowered price tickets . You’ll never know tomorrow, tickets would be sold higher than this due to the number of attendees interested.

So hurry register now!!! here is the link http://www.jotform.com/form/72883452322

Again I’ll keep you all posted for other announcements.

1st PHP Developer’s Conference

Friday, October 19th, 2007

PHP User Group Philippines, Inc. (PHPUGPH) will be holding its first PHP Developer’s Conference on December 1, 2007 from 9am – 6pm. The said event will be attended by professional LAMP developers, freelancers and companies which are very notable in the field of IT. The event’s main goal is to spread the news of using OSS(Open Source Software) technologies to a wider audience like schools, universities and companies. Last April was a similar even that the group conducted which I was not able to attend, but definitely I will be here! Details of the event’s venue will be posted soon.

Why attend?

If you are a student taking IT related courses, this is good exposure for you. You will get the chance to see the real IT world in the Philippines and the real guys behind the scene of the sites you are surfing, either for fun, entertainment or education purposes. Well I also believe that learning is not always achieved inside the 4 corners of the classroom.

If you are a PHP programmer or even non PHP programmer whether professional, mid-level or novice one, this event is definitely for you. This is a ones in a lifetime experience to attend the 1st ever event, this is history in the making in the Philippine IT History. It always a good feeling to be the first isn’t it? Your grand children will read this in their history books and you will be proud to say to them, I was there! You will learn so much from the topic that are lined up. You can find the complete list in AJ blog site.

If you are a company or an entrepreneur, this event will directly benefit you, since most of the speakers are also entrepreneurs, and IT company CEOs which I’m definitely sure will give some tips how to run an IT related business. If I’m not mistaken the Tipidpc guys will be there to share how the site came to be. Ideas will be be scattering all over the venue and you’ll never know, the solution you are looking in your company will be revealed here.

Sponsorship?

Basically I’m not the person in-charge of the sponsorship thing, but I can be your mediator and tell the phpug top guys about your intentions.

Well what are you waiting for, start marking those calendars as if this is a Christmas countdown. I’m pretty excited about this event and I hope to see you all there!

Convert array to string

Friday, October 19th, 2007

Problem: You want to convert an array to string so that it is easier to print the result instead of looping inside the array and have this printed

Old Solution:

$aArr = array("Have you ever seen",
"the beauty of the world.",
"The wonderful creation of the Lord." );
foreach($aArr as $sString) {
    print $sString;
}

Other Solution:

$aArr = array("Have you ever seen",
"the beauty of the world.",
"The wonderful creation of the Lord." );
$sString = implode(" ", $aArr);
print $sString;

In Action: I want to execute a linux command via PHP and get its result and extract the desire content. The example below will try to extract the ip address from the ifconfig command

exec("ifconfig", $aOutput);
$sTempString = implode(" ", $aOutput);
preg_match("/inet\saddr:(.*?)\s/i", $sTempString, $aMatch);
print $aMatch[1]; //

Getting Mysql version on Linux OS

Friday, October 19th, 2007

Question: How can I determine the linux version installed in a Linux OS

Answer: To determine your Mysql version, we will be using the mysql command with the -V (capitalize) option.

[darwin@myserver]$ mysql -V
mysql  Ver 14.7 Distrib 4.1.20, for pc-linux-gnu (i686) using  EditLine wrapper

Your mysql version here is 4.1.2.0.

Getting Apache version installed in your Linux OS

Friday, October 19th, 2007

Question: How can you determine the version of your Apache Web Server on your Linux machine?

Answer: First determine the installation directory of your apache server. You can find this by issuing this command, but basically you can do better that this one in finding the installation directory of your apache.

[darwin@myserver]$ whereis apache
apache: /usr/local/apache

Once you know where the directory is we will try to execute the httpd command with the -v option

[darwin@myserver]$ /usr/local/apache/bin/httpd -v
Server version: Apache/1.3.36 (Unix)
Server built:   Jul 18 2006 14:34:00

And there you go your Apache version is 1.3.36.

Thanks again Mark.

How to get installed linux OS version

Friday, October 19th, 2007

Wondering how to get the Linux OS version installed on a server or PC? Here are some commands our system administrator taught me and wanted to share it with you.

Using dmesg command

[conai@myserver]$ dmesg | head -1
Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

Using uname command

[conai@myserver]$ uname -a
 Linux dugong.mbsautomotive.com 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST
2006 i686 i686 i386 GNU/Linux

Opening the /etc/issue file

[conai@myserver]$ cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m

Opening the /proc/version file

[conai@myserver]$ cat /proc/version
 Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

According to Rai and Mark, there are still other ways to do this but I think these are enough to get the information I need. Pick whatever suites your needs. Thank Rai and Mark for sharing this information with me.

Determining if a number is odd or even

Thursday, October 18th, 2007

Problem: We wanted to determine if a number is even or odd

Notes: We know that even number end with 0, 2, 4, 6, 8 and odd numbers ends with 1, 3, 5, 7, 9. So how will we know if a number given is an even or odd number in a program..

Solution:

<?
$magic_number = 123568;
if($magic_number % 2 == 0) {
    print "The number is even.";
}  else {
    print "The number is odd.";
}
?>

Explanation: In the program above we use the modulus division. Modulus division unlike the ordinary division (/) returns the remainder instead of the quotient. So we tried modulo dividing the given number by 2 to determine if it is divisible by 2.

My New Header Design

Thursday, October 18th, 2007

I got a new header design for my site today. This logo was made by my friend Dhing. The logo’s concept was about my journal to the programming world but focusing on PHP thats why I have the <?php ?> tag on the upper right corner of the logo. By the way Dhing is also a php programmer like me and a designer by night. He is currently employed in iRemit as a PHP programmer. So if you want some professional designing and programming on your site, just let me know and I’ll contact him for you. With this, I can help but to think ironically, that he being a programmer and good designer don’t even have a site of his own, (dhing sorry about this). Well I think this is a reality in our world, that the ones that are expert on a field are also the one that have the least asset on their expertise. Like a shoe maker don’t have any descent shoes, doctors sometimes cannot threat theirselves, barbers cannot cut their hair and Dhing being a programmer and designer don’t have a site… hahaha… sorry Dhing…

Before I ask my friend’s help I have been surfing the net for a couple of days, trying to find the perfect wordpress theme for my site. I was looking for simple and professional looking theme that made me go thru different wordpress theme sites like, themes.wordpress.net, www.wpthemesfree.com, www.wpthemespot.com and other sites that I can no longer remember. Although to be fair the themes from these site are awesome. Their themes vary from a simple looking appearance to a very graphical ones,. They cater from the ordinary type, professional type, artistic, pornographic type, environment featured types, animals and many others. But with these tons of themes to choose from, I cannot find the right one for me. So I decided to stick with the default theme offered by the default wordpress installation. But for the past days I find my site so boring thats why I ask the help of my friend Dhing, to be honest I’m bad at designing.. oppss. Well HE will not give you everything isn’t it? No one is perfect or else we don’t need to be here and I am not writing this blog in the first place.

Well, I am contented with the output of the design and I’m quite happy about it. Again tnx Dhing.

Filipino PHP Programmers

Wednesday, October 17th, 2007

Since my primary keyword in my blog is “filipino php programmer”, I would like to write this article that tackles how is the typical life of a Filipino PHP Programmer. I will try to describe bit by bit what are the things that we “filipino PHP programmer” are interested on. This article may be one sided because my basis is just my personal experience in the field of PHP programming. You may agree or disagree with the contents and examples that I will be giving throughout the discussion. You are free to add up your ideas, comments and suggestion after I have submitted this article.

DEVELOPMENT TOOLS

As a programmer in general, in order to develop applications, programs or scripts we need some tools to efficiently code and write down complex algorithmic php programs. As of this date there tons of PHP programming tools available on the net. There are IDEs, Database connectivity client, Code optimizer, code profilers and other tools that being use day to day by Filipino php programmers, may it be at work or at play(writing codes just for fun). But typically what kind of tools that we use? What environment are we working on? I would like to answer these questions by listing some of the tools I know that I am currently using.

1. Development Environment – I know that in order for you to start working on PHP programming you need PHP Engine primarily, the database engine (in my case I use MySQL) and a Web Server (if you wanted to apply your code on the web.) In early days we usually install these engine separately (PHP, MySQL and Apache) in order to start the development. What we try to do is download all 3 engines from their respective websites, read their README and INSTALL files, and follow their instructions there. I still remember those days of spending longs hours configuring Apache to integrate PHP into it, and these lines are still engrave in my mind.

LoadModule php4_module php/sapi/php4apache2.dll

AddType application/x-httpd-php .php

But fortunately today, development environment comes in packages already. Installation packages that comprises of all engines needed to run a full PHP application. Xampp is one of the nice package that I personally use. This cool development package is a one shot installation that comprises already the Apache web server, MySQL Engine, PHP and Perl interpreter. All you need to do is download the installation file or the zip file and run it on you PC, laptop or even server.

2. Editors - like MS Word, Notepad and Wordpad that are document or text editors, PHP programmer need editors to write down their codes. For some PHP programmer I have met and ask, usually have different preferences when it comes to editors. Mostly their choice of editor is their first editor when they started PHP programming. Their reason why sticking to their editor is that they are already adept with it, and changing it will change also their coding preferences and huge adjustment for them. On my personal survey these are the common Editors they are using

Macromedia Dreamweaver – commercial; can run on Windows and Mac

Zend Studio – commercial; can run on Windows, Linux, Unix and Mac; has 30 day trial

Nusphere – commercial; can run on Windows and Linux; has 30 day trial

Vi or Vim – freeware; can run onWindows, Linux and Unix

3. Database applications – database applications are softwares that enable programmer to manipulate database data directly. These database applications enable a PHP programmer to perform DML(Data Manipulation Language) or DDL(Data Definition Language) activity on the Database server. Some of these database applications may be in a web interface like PHP MyAdmin and client side like MySQL CC(not available anymore), MySQL Query Browser, Navicat, EMS, etc.

4. Resources – it is but natural for any programmer to have resources, whether offline or online. Resources are very useful when we are getting syntax of some functions seldomly use, or tags that we are not sure of their structure or even information we can use in our project or task as php programmers. Here are some of the offline resoures that I am using

PHP Help – in chm format

Ebooks – electronic ebooks like, PHP Cookbook, Web Development using PHP & MySQL

Some of the online resources that I usually go whenever I need extra help online are

w3schools – online tutorial on different language and technology which includes PHP, HTML, CSS, etc.

PHP.net - main site of PHP, for online manual

MySQL Reference – mysql reference

DevShed - useful PHP applications and tutorials

5. Other Development Tools/Resources – aside from the tools and resources that I mentioned above. I would like also to list down some important sites that directly or indirectly gives bits of information to my PHP programming life. These are

Digg – researching for latest news on the IT industry.

Sitepoint – gives some useful information on the latest trend on different IT related field like programming, SEO, etc

Mozilla Firefox - the browser itself and the many addons like Bugzilla, Web developers toolbar, Measure It, Colorzilla, and other cool extensions

INTEREST

In this section I would like to describe what are the interest of a typical Filipino PHP Programmer. These interest may or may not be related to programming. Basically these are hobbies, habits, liesure, addictions(non-drug or alcoholic) of some programmers that I’ve known.

Food and Beverages:

Soda – softdrinks in can preferably

Coffee – use to fight drowsiness and boost alertness

Cigarette – study shows that smoking while thinking boost up the ability of the brain to think(well not advised).

Burger – burger machine, burger king

Pizza – pizza hut preferably

Hobbies/Leisures:

RC – remote control cars

Pets – like dogs, fish, etc

Sleeping – no comment

Games – RPG, Online-games, PS2, PSP, Nintendo, Xbox, etc.

to be continued…