VICIdial Registration Form script
Posted: 7 Jul 2012, 21:32pm - Saturday
Few days ago, an online friend, Ruben Lacumba, ask some help to create a registration script for VICIdial. Though, I have a little background on VICIdial and Asterisk -- I still accomplished to create one. Yipee! Purpose: If you want to make your VICIdial server available to the public or you want to make money out of it by Rent Service, you can use this form for the registration process.

VICIdial Registration Form script v0.1.0

Enjoy the script! PS: If you have questions, suggestions and other related matters, please PM me. Download Version 0.1.0: vicidial_regform_v0.1.0_publish.zip Download Version 0.1.1: vicidial_regform_v0.1.1_publish.zip Change log:
  1. Version 0.1.0 - Initial Release
  2. Version 0.1.1 - Can add more agents (define by you); Can refresh/reload the captcha.
Zend Framwork: Accessing Database in different ways
Posted: 8 May 2012, 13:11pm - Tuesday
Assuming I declared some variables in application.ini named webbyConfig and initialized in Bootstrap.php;
$config = Zend_Registry::get('webbyConfig');
$this->_db = new Zend_Db_Adapter_Pdo_Mysql(array(
        'host'     => $config['db_host'],
        'username' => $config['db_user'],
        'password' => $config['db_passwd'],
        'dbname'   => $config['db_name'],
    ));

....

$sql = 'SELECT a.col1,b.col2 FROM tableA AS a, tableB AS b WHERE a.id = b.id AND a.id = 1';

$stmt = $this->_db->query($sql);
print_r($stmt->fetchAll());
and this is another way accessing the db...
$sql = 'SELECT a.col1,b.col2 FROM tableA AS a, tableB AS b WHERE a.id = b.id AND a.id = 1';

$db = Zend_Db_Table::getDefaultAdapter();

$stmt = $db->query($sql);
print_r($stmt->fetchAll());
That's what I know so far... I think there's more... still exploring ZF. :)
Zend Framework: Upload File Demo
Posted: 4 May 2012, 3:31am - Friday
I've came across in uploading file using Zend Framework (ZF)... Since ZF is new to me, its like I'm studying PHP just like when I started, I have to memorize the predefined variables and functions but in ZF, its their classes, defined variables and its functions. Here's my codes though its not perfect but its working.
<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        // action body
        $form = new Application_Form_Upload();
        $this->view->assign('form',$form);
    }

		private function getFileExtension($filename)
		{
			$fext_tmp = explode('.',$filename);
			return $fext_tmp[(count($fext_tmp) - 1)];
		}

		public function uploadAction()
		{
			$dest_dir = "uploads/";

			/* Uploading Document File on Server */
			$upload = new Zend_File_Transfer_Adapter_Http();
			$upload->setDestination($dest_dir)
						 ->addValidator('Count', false, 1)
						 ->addValidator('Size', false, 1048576)
						 ->addValidator('Extension', false, 'jpg,png,gif,pdf');
			$files = $upload->getFileInfo();

			// debug mode [start]
			echo '<hr />
							<pre>';
			print_r($files);
			echo '	</pre>
						<hr />';
			// debug mode [end]

			try
			{
				// upload received file(s)
				$upload->receive();
			}
			catch (Zend_File_Transfer_Exception $e)
			{
				$e->getMessage();
				exit;
			}

			$mime_type = $upload->getMimeType('doc_path');
			$fname = $upload->getFileName('doc_path');
			$size = $upload->getFileSize('doc_path');
			$file_ext = $this->getFileExtension($fname);
			$new_file = $dest_dir.md5(mktime()).'.'.$file_ext;

			$filterFileRename = new Zend_Filter_File_Rename(
				array(
					'target' => $new_file, 'overwrite' => true
			));

			$filterFileRename->filter($fname);

			if (file_exists($new_file))
			{
				$request = $this->getRequest();
				$caption = $request->getParam('caption');

				$html = 'Orig Filename: '.$fname.'<br />';
				$html .= 'New Filename: '.$new_file.'<br />';
				$html .= 'File Size: '.$size.'<br />';
				$html .= 'Mime Type: '.$mime_type.'<br />';
				$html .= 'Caption: '.$caption.'<br />';
			}
			else
			{
				$html = 'Unable to upload the file!';
			}

			$this->view->assign('up_result',$html);
		}

}
Below is the source file of whole project in Zend Framework for you to test it out... Enjoy! Source Code: uploadify.zip
Zend Framework: changing public to public_html for CPanel
Posted: 25 Apr 2012, 7:21am - Wednesday
In Zend Framework, the public files are located at public folder, but CPanel are located at public_html. What you will do is create a symlink.
ln -s public public_html
then this structure will work:
htdocs/
  myvhost.com/
    public/
    application/
    library/
    public_html # this is actually a symlink pointing to public
That's it... :)   Reference: http://stackoverflow.com/questions/3903127/hosting-php-zend-framework-application-on-shared-cpanel-server Thanks to: prodigitalson  
My Standard Firewall in CentOS Web Server (iptables)
Posted: 28 Jan 2012, 23:05pm - Saturday
Confidential Post!
My co-worker sent me a link and found it very true of most of the employers in Online Jobs. They maltreated Filipinoes as their virtual assistant, they want to do everything and finish it in a day or hour or a second. And I found it as stupidity tasks coz we are not Superman! I would like to re-post this good article by John Jonas.
When it comes to outsourcing your business (or yourself!) to the Philippines, there’s definitely a learning curve. Here are 7 ways you can guarantee failure for yourself : (Hint: Don’t do these things!)

1. Try To Hire Someone To Do Everything

Here’s an actual email I got this week So wait…you want a programmer, graphic designer, webmaster, who is fluent in english and likes to write, who can write sales copy, autoresponders, forum posts, ebooks, and reports. Oh yeah, sure, let me help you find that person! Oh wait, that person doesn’t exist. Hire someone to do a specific task! Then train them to be able to do everything.

2. Hire A Project Manager

Filipinos don’t know how to run your business for you. Don’t try to hire a project manager first along with 6 others, and expect that “project manager” to manage those other 6 and get things done. They don’t know how. YES! They’re very capable of being project managers, but very rarely will you find someone who has been involved in enough internet business that you can just turn a project over to them and have them manage other people for you. Eventually…yes! After you’ve trained them and they’ve seen how the business is supposed to work.

3. Hire Someone And Ignore Them

You have to train the person you hire. They don’t know how to run your super-niche internet marketing business. Don’t expect to hire someone and just let them go do everything themselves. Expect to spend some time working with them.

4. Ask Someone To Do Work Before You Offer Them A Job

This is my favorite. I get an email that says
Can you please tell me why I can’t successfully hire someone, they all keep disappearing. Here’s the email I send them: I want you to start by doing a trial task. Write 20 articles, submit them to article directories, do a bunch of directory submissions for me, build me a website and write all the content for it. Then, I’ll evaluate your work and see if it’s going to work out.
hahahahaha. Yeah right! They’re not going to do work until AFTER they know they have a full-time job working for you. Don’t give them a test task. Give them a job. Tell them the first month is a probationary period.

5. Expect Immediate Results

This is a long-term proposal here. I’ve been doing it for 4 years. You’re not going to see the same results in 4 days. Don’t expect it.

6. Search and Search and Search For The Right Person, Then Email Them

Hey John, I searched for 3 days and I found the perfect candidate. They can do everything you said wasn’t possible back up in #1 on this blog post. Why won’t they respond to me?
Why? Because they already have a job and they’re loyal to their current employer. Instead of trying to find the perfect person up front, try contacting 20 potential fits, see who responds, then sort through them.

7. Set The Wrong Expectations

When you hire them, don’t tell them you expect them to be totally self-directed and to work without supervision and to be able to figure everything out on their own. If you do, you’ll never hear from them again. Try telling them
I expect you to try to figure things out, but I understand that I’m going to give you tasks that you won’t know how to do, and sometimes there won’t be any way to figure it out. In these cases, please know that I’m here to answer your questions. I’m here to help you. Please don’t hesitate to ask me when you get stuck.
Otherwise, when they don’t know how to do something they get embarrassed and will never talk to you again. If you set the right expectation with them about asking for help, they’ll ask, you’ll help, and all will be happy and good. These aren’t hard things to avoid…you just have to know about them to avoid them. There’s more good stuff like this as a member of ReplaceMyself.com.
Author: John Jonas Article Reference: http://www.jonasblog.com/7-ways-to-fail-when-outsourcing-to-the-philippines
Party in the CIA
Posted: 24 Sep 2011, 8:09am - Saturday

Watching and listening the lyrics makes me laugh...

Just want to share.. :)

SEO Fart | XML-RPC Ping Tool
Posted: 4 Aug 2011, 6:31am - Thursday
As my latest creation which boost me up to create this desktop application are my SEO staff which they have been searching for a good ping tool for their SEO. So instead of buying a software, I created my own and let them use it for their SEO campaign. I call it XML-RPC Ping Tool and under a brand name of SEO Fart because most of us always fart in the office. Hahahhahaha!
XML-RPC Ping Tool - A made-easy tool that poke Search Engines via ping service websites that your blog or website has been updated. Capable of mass URL pinging and scheduled URL pinging to make your SEO tasks easy and fast.
However, in the office the application is for free but to other people, its for sale. Sweat and effort must be paid of course. :)
[Linux] Count Files and Delete Old Files
Posted: 15 Jun 2011, 10:41am - Wednesday
Here's the command to count the files inside a specific directory under linux environment:
ls -1 <target path> | wc -l
Here's the command to delete all files older than 60 days within specific directory:
find <target path> -mtime +60 -type f -exec rm -rf {} \;
Here a sample to delete PNG files after 3 days.
find /home/proj/public_html/cache/ -mtime +3 -name '*.png' -type f -exec rm -rf {} \;
It help a lot for file management combined with cron jobs.
HowTo: Reset MySQL root password
Posted: 12 Apr 2011, 9:58am - Tuesday
This is the way to reset MySQL server password in Centos Linux, steps below:
# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = '' WHERE User = 'root';
mysql> exit

# /etc/init.d/mysql stop
# /etc/init.d/mysql start
You may also use service to start and stop the mysql.
#service mysqld start
#service mysqld stop
Centos 6.2: PHP, MySQL and Nginx
Posted: 21 Jun 2012, 15:53pm - Thursday
I've been curious about the word nginx. A lot of posting about nginx. So I do a little research and found out its a HTTP server. So I tried my own research and experiment which all sample configuration can be found at nginx.org. For my experiment, I used Centos 6.2, PHP, MySQL and the Nginx. Here's you will do it to setup Web Server using Nginx; Download first the EPEL for Centos 6 (http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/repoview/epel-release.html or epel-release-6-7.noarch.zip) -- purpose for this is so you can install the per-requesites of Nginx like spawn-fcgi.
[root@server ~]# wget http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-7.noarch.rpm

[root@server ~]# rpm -ivh epel-release-6-7.noarch.rpm

[root@server nginx]# yum repolist
Loaded plugins: fastestmirror, protectbase, security
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * epel: ftp.cuhk.edu.hk
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
0 packages excluded due to repository protections
repo id                                                        repo name                                                                                              status
base                                                           CentOS-6 - Base                                                                                        6,294
epel                                                           Extra Packages for Enterprise Linux 6 - x86_64                                                         7,561
extras                                                         CentOS-6 - Extras                                                                                          6
nginx                                                          nginx repo                                                                                                23
updates                                                        CentOS-6 - Updates                                                                                     1,147
repolist: 15,031
Then install nginx.
[root@server ~]# yum -y install nginx
Install PHP, MySQL and other packages.
[root@server ~]# yum -y install php-pear-Net-Socket php-pear php-common php-gd php-devel php php-mbstring php-pear-Mail php-cli php-imap php-snmp php-pdo php-xml php-pear-Auth-SASL php-ldap php-pear-Net-SMTP php-mysql
Install spawn-fgi
[root@server ~]# yum -y install spawn-fcgi
Download and setup the spawn-fcgi to init.d (419.sh_.zip)
[root@server ~]# wget http://bash.cyberciti.biz/dl/419.sh.zip
[root@server ~]# unzip 419.sh.zip
[root@server ~]# mv 419.sh /etc/init.d/php_cgi
[root@server ~]# chmod +x /etc/init.d/php_cgi
Start PHP app server and check if running
[root@server ~]# /etc/init.d/php_cgi start
[root@server ~]# netstat -tulpn | grep :9000
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      1843/php-cgi
Configure nginx.conf for PHP based webserver for Wordpress, Drupal & Joomla (Download: nginx.conf_.zip).
[root@server nginx]# cat nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;

    server {
        listen 80 default_server;
        server_name .nginx.ph;
        access_log /var/log/nginx/nginx.ph_access_log;
        error_log /var/log/nginx/nginx.ph_error_log;

        index index.html index.php index.htm;

        root /home/camilord/public_html;

        location / {
           # if you're just using wordpress and don't want extra rewrites
           # then replace the word @rewrites with /index.php
           try_files $uri $uri/ @rewrites;
        }

        location @rewrites {
           # Can put some of your own rewrite rules in here
           # for example rewrite ^/~(.*)/(.*)/? /users/$1/$2 last;
           # If nothing matches we'll just send it to /index.php
           rewrite ^ /index.php last;
        }

        # This block will catch static file requests, such as images, css, js
        # The ?: prefix is a 'non-capturing' mark, meaning we do not require
        # the pattern to be captured into $1 which should help improve performance
        location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
                # Some basic cache-control for static files to be sent to the browser
                expires max;
                add_header Pragma public;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }

        # remove the robots line if you want to use wordpress' virtual robots.txt
        location = /robots.txt  { access_log off; log_not_found off; }
        location = /favicon.ico { access_log off; log_not_found off; }

        # this prevents hidden files (beginning with a period) from being served
        location ~ /\.          { access_log off; log_not_found off; deny all; }

        location ~ \.php {
                fastcgi_param  QUERY_STRING       $query_string;
                fastcgi_param  REQUEST_METHOD     $request_method;
                fastcgi_param  CONTENT_TYPE       $content_type;
                fastcgi_param  CONTENT_LENGTH     $content_length;

                fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
                fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                fastcgi_param  REQUEST_URI        $request_uri;
                fastcgi_param  DOCUMENT_URI       $document_uri;
                fastcgi_param  DOCUMENT_ROOT      $document_root;
                fastcgi_param  SERVER_PROTOCOL    $server_protocol;

                fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
                fastcgi_param  SERVER_SOFTWARE    nginx;

                fastcgi_param  REMOTE_ADDR        $remote_addr;
                fastcgi_param  REMOTE_PORT        $remote_port;
                fastcgi_param  SERVER_ADDR        $server_addr;
                fastcgi_param  SERVER_PORT        $server_port;
                fastcgi_param  SERVER_NAME        $server_name;

                fastcgi_pass 127.0.0.1:9000;
        }

       #location ~ \.php$
       #{
       #    root           html;
       #    fastcgi_pass   127.0.0.1:9000;
       #    fastcgi_index  index.php;
       #    fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;
       #    include        fastcgi_params;
       #}
    }
}
Restart Nginx
[root@server ~]# service nginx restart
I think that's it.. it should be working because its working on my CentOS linux box. :) Reference:
  1. http://www.cyberciti.biz/faq/rhel-fedora-install-configure-nginx-php5/
  2. http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/
  3. http://www.thegeekstuff.com/2012/06/enable-epel-repository/
  4. http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/repoview/epel-release.html
  5. http://wiki.nginx.org/ServerBlockExample
  6. http://kbeezie.com/view/nginx-configuration-examples/
 
I created some script in php, encrypting and decrypting my emails. but when I ran the script, got some issues. When I traced it, the php-mcrypt library is missing. I am using CentOS 6.2 at 64bit architecture. Some says I will move the libmcrypt.so.4 and  libmcrypt.so.4.4.8 from /usr/lib to usr/lib64 and /usr/lib/php/mcrypt.so to /usr/lib64/php/mcrypt.so but when I check the file, its not there. The files aren't there at the installed directory. to check this issues, cast php -v;
[root@mail lib64]# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mcrypt.so' - libmcrypt.so.4: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.3 (cli) (built: Feb  2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd.
If there's PHP Warning, then that means there are missing files... if more warnings, probably there's a problem during installation of your php. But in this guide, I will only discuss how to fix the php-mcrypt issues. First download the lacking files, which are;
  1. libmcrypt-2.5.8-4.el5.centos.x86_64.rpm
  2. php-mcrypt-5.3.3-1.el6.x86_64.rpm
You can download those files at rpmfind.net or rpm.pbone.net. Then extract the files inside the rpm pack by using the command rpm2cpio.
[root@mail ~]# rpm2cpio libmcrypt-2.5.8-4.el5.centos.x86_64.rpm | cpio -idmv
[root@mail ~]# rpm2cpio php-mcrypt-5.3.3-1.el6.x86_64.rpm | cpio -idmv
Then move the files that you just extracted to /usr/lib64 and after moving the files, restart httpd and cast again the php -v.
[root@mail ~]# php -v
PHP 5.3.3 (cli) (built: Feb  2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd.
[root@mail ~]#
This is the output you should get, no PHP Warnings and php-mcrypt should be working fine. That's it! Happy solving!
Securing Web Folders
Posted: 27 Apr 2012, 2:23am - Friday
Create or Add this to .htaccess
AuthType Basic
AuthName "Members Only"
AuthUserFile /home/user/public_html/secretfolder/.htpasswd
<limit GET PUT POST>
         require valid-user
</limit>
then execute the htpasswd command;
htpasswd -c /home/user/public_html/secretfolder/.htpasswd admin
That's it.. if you visit http://servername.com/~user/secretfolder/ -- it will prompt a username and password. So you have to enter admin as username and the password you entered. Enjoy~!
I'm been studying again about ZendFramework and its been a hassle for me to edit the hosts file from "C:\WINDOWS\system32\drivers\etc\" and the Apache httpd.conf file from "C:\Program Files\Apache Group\Apache2\conf\". So I created my windows application to auto-populate my ZendFramework project entry. To check how hassle in setting the configurations, see ZendFramework - Intro video and you'll know. :)  

  Here it is... Below is the download link of my windows application, you can use it also if you want. I am sharing it to the world for free and of course no warranty. :)   Requirements: .Net Framework 2.0 or latest version Download: zendify.exe
Today, I've been developing an oDesk-like activity monitoring application but for local network for my company, Innermax Support, and I came across with a problem of an errors:
  • An exception occurred during a WebClient request.
  • The remote server returned an error: (417) Expectation failed.
And during my search in Google -- from forums, MSDN and other developers' resources -- they face same problem. The common issue was the 100-Continue problem passing to a network with squid-cache. So there's a websites that I combined their codes and luckily it works. Just forgot the URLs, I can't credit thank-you's to them.. hehehe! The setup is like this... there's a firewall which has squid-cache in the local network and my server where I will upload my file/image is at the other network with public IP address. I will directly upload the file/image to my server using the assigned public IP address via PHP script. Here's my code to solve the problems;
public void uploadFile()
{
    try
    {
        // decleration of webclient
        ServicePointManager.Expect100Continue = false;
        System.Net.WebClient webby = new System.Net.WebClient();

        //initiate credentials
        webby.UseDefaultCredentials = false;
        webby.Credentials = new NetworkCredential("anonymous", "");

        //add headers
        webby.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.832)");
        webby.Headers.Add("Content-Type", "binary/octet-stream");

        //initiate upload file
        Byte[] result = webby.UploadFile("http://120.0.0.1/upload.php", "POST", @filename);

        string s = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);
        MessageBox.Show(s);
        webby.Dispose();
    }
    catch (Exception)
    {
        // do nothing...
        MessageBox.Show("Upload failed!");
    }
}
So far, it works fine with me and satisfied of my solution. Hope this will help your problem too... :)
Outsourcing in the Philippines: InnerMax Support
Posted: 22 Dec 2011, 17:20pm - Thursday
InnerMax SupportI've crossed  a good outsourcing firm in the Philippines, Innermax Support specializes in Web Development, Web Designing, SEO Services, Data Entry, Social Media Marketing, Inbound Phone Support, Outbound Phone Support. They are comparatively new to the industry, but with their management along with all their agent's combined knowledge, skills, and significantly valuable experiences; they surely can consistently turn every single task, great or small, highly distinguished more than any clients could wish for.
  • Innermax Support provides high quality services
  • Takes your business outsourcing to a new level with more leads and sales
  • Endows with the best services way beyond your desired results and expectations
  • Has assigned the best agents that fit every campaign you asked to be dealt with.
  • Gladly welcomes high level of engagement with the corporate stakeholders at your company.

Expect Quality Services

  • Exceptional results and return on assets
  • They never fail to keep our eyes peeled towards particular outcomes and circumstances of your campaign and in most instances; they most likely notice any sorts of any diversities and take action before such gets out of hand.
  • They are firmly committed to quality service and accommodation.
  • They are very knowledgeable by every inch and corners from tiniest to most immense aspects about e- marketing.
  • They never would hesitate to establish bountiful relationship and develop harmonious companionship with their valuable clients.
  • They live by the virtue of courteous and respectful demeanor to each of their clients.
  • They never would leave their clients oblivious about any current status of the relayed tasks.
  • And above all. They walk what they talk.
Developer's MySQL Auto-backup for Windows
Posted: 18 Sep 2011, 12:49pm - Sunday
2 days ago, my 7 years old computer motherboard, Intel Desktop Board DP965LT Classic series, died and as I replace with Intel Desktop DG31PR, I experienced with disturbing incident in MySQL databases. It got corrupted, some of the tables of .MYI and .MYD of the databases are missing. I tried to recover using REPAIR TABLE command in MySQL, got not luck. I tried using Stellar Phoenix Database Recovery for MySQL don't work well at all. So it means that I cannot recover my lost databases.

So I developed a software which protect my databases, this is to auto-backup all my MySQL databases to other drive or user-defined backup location. This application is for Windows XP, I haven't tested it in Windows 7 and other Windows OS yet. :) I called this software as "Developer's MySQL Auto-backup". The software is freeware or just totally FREE. You can use it but of course no warranty. :P Enjoy my software... :)
MySQL 5.5 changing data folder
Posted: 14 Jul 2011, 8:08am - Thursday
Today, I'm having problem with my MySQL. I bought new computer and want to transfer my databases from my old PC (using winXP) to new PC which is using windows 7. When I copied all my databases from data folder from my old computer and paste it to my new PC at "C:\Program Files\MySQL\MySQL Server 5.5\Data", and restart the MySQL, I can't see my databases. I found a solution from www.fossplanet.com and here's the step (I slightly modified the step since i have different problem...)
  1. create folder in "C:\MySQLData"
  2. copy all files from "C:\Users\All Users\MySQL\MySQL Server 5.5\data" to "C:\MySQLData"
  3. go to RUN and type services.msc and stop MySQL service
  4. at "C:\Program Files\MySQL\MySQL Server 5.5" -- edit the my.ini and change the datadir value to your new MySQL data folder which is "C:/MySQLData/"
  5. after changing the datadir, at Services window (services.msc) start again your MySQL
  6. then cast command in MySQL CLI "show databases" and you should get your migrated databases showing... :)
  ------------------- thanks to: Rolando A. Edwards MySQL DBA (SCMDBA)
HowTo: Jailbreak iPhone 4.3.2
Posted: 19 May 2011, 8:43am - Thursday
Today, I just jailbreak my iPhone4 with a firmware of 4.3.2. I use this as a guides;
  1. Jailbreak procedure - http://www.youtube.com/watch?v=NoIi6tLN2gs
  2. Jailbreak Failure when turn to recovery mode - http://jaxov.com/2010/05/recboot-iphone-recovery-mode/
  3. And I am using redsnow latest release (redsn0w 0.9.6rc16) - http://blog.iphone-dev.org/
  4. for firmware downloads -- http://www.felixbruns.de/iPod/firmware/
Note: using redsn0w 0.9.6rc16, you only need to perform once the DFU mode.
Linux Web Mail Server
Posted: 7 Apr 2011, 10:25am - Thursday
I've been managing web servers yet I haven't tried setting up web mail server. Today, this is my experiment.. Below is the steps or guides from Vincent Avelino, a friend of mine in C21. The scenario is running under CentOS 5.3. Part 1
  1. Postfix - http://wiki.centos.org/HowTos/postfix
  2. SPF - http://old.openspf.org/wizard.html
  3. DKIM/DK - http://www.howtoforge.com/postfix-dkim-with-dkim-milter-centos5.1 ; http://www.ijs.si/software/amavisd/ ; http://www.howtoforge.com/how-to-implement-domainkeys-in-postfix-using-dk-milter-centos5.1
  4. Clamav - http://www.linuxmail.info/how-to-install-clam-antivirus-centos-5/ || http://www.linuxmail.info/how-to-install-clam-antivirus-centos-4/
  5. Spamassassin - http://spamassassin.apache.org/
  6. Roundcube
Part 2
  1. DNS
  • http://www.dnswatch.info/dkim/create-dns-record
  • http://www.simpledns.com/kb.aspx?kbid=1092
  • http://palma-seo.com/setting-dkim-spf-domainkeys-dns-bind
Result and Conclusion: Can't proceed the experiment as of now.. too busy.. hahahaha..
Manage Apache Download Speed and Traffic Limits
Posted: 13 Jun 2012, 22:36pm - Wednesday
I've been experimenting on how I can limit the download speed via Apache configuration. This method is good for file-sharing website and for hosting servers. In my case, I am using Centos 5.5 and Apache 2.2.3 + mod_cband 0.9.7.5. So, here's what you will do... Assume you already installed the Apache.
  1. Install Apache Development libraries by casting "yum -y install apache-devel"
  2. Download "mod_cband" from http://dembol.org/blog/mod_cband/ or direct download link at http://dembol.org/downloads/cband/mod-cband-0.9.7.5.tgz
Follow steps (must be root mode)...
cd ~
wget http://dembol.org/downloads/cband/mod-cband-0.9.7.5.tgz
tar xzvf mod-cband-0.9.7.5.tgz
cd mod-cband-0.9.7.5
./configure
make
make install
To check if successfully installed, type just like below and must have same result:
[root@localhost ~]# cat /etc/httpd/conf/httpd.conf | grep mod_cband.so
LoadModule cband_module       /usr/lib/httpd/modules/mod_cband.so
Then add the code below at httpd.conf then save and restart apache.
CBandScoreFlushPeriod 1
CBandRandomPulse On
Next is add a "scoreboard"
mkdir /var/www/scoreboard
chown apache:apache /var/www/scoreboard/
Final steps is create an vhost entry at /etc/httpd/conf.d just like this (in my case, I created cband.com as my vhost);
[root@localhost conf.d]# cat cband.com.conf
<VirtualHost *:80>
    ServerAdmin webmaster@cband.com
    DocumentRoot /home/cband.com/public_html
    ServerName cband.com
    CBandSpeed 1024 10 30
    CBandRemoteSpeed 50kb/s 3 3
    CBandLimit 500M
    CBandExceededSpeed 128 5 15
    CBandScoreboard /var/www/scoreboard
    CBandPeriod 4W
    CBandExceededURL http://cband.com/exceeded.html

    <Location /cband-status>
      SetHandler cband-status
    </Location>
    <Location /cband-status-me>
      SetHandler cband-status-me
    </Location>

    ErrorLog logs/cband.com-error_log
    CustomLog logs/cband.com-access_log common
</VirtualHost>

[root@localhost conf.d]#
After you created the vhost file, restart your apache. You can check the status of certain vhost by accessing the URL: http://cband.com/cband-status or another status URL: http://cband.com/cband-status-me Further Explanation:
  1. CBandSpeed 1024 10 30 -- Overall apache performance. Max bandwidth speed is 1024bits per secs. 10 requests per secs. 30 max connections
  2. CBandRemoteSpeed 50kb/s 3 3 -- Individual apache performance. Max bandwidth speed is 50kb/s, max 3 requests/s and max 3 connections
  3. CBandLimit 500M -- 500MB max bandwidth limit
  4. CBandExceededSpeed 128 5 15 -- Bandwidth speed limit at 128kbps, 5 request/s and max of 15 connections
  5. CBandScoreboard /var/www/scoreboard -- scoreboard location
  6. CBandPeriod 4W - time to refresh
  7. CBandExceededURL http://cband.com/exceeded.html -- if bandwidth exceeded, redirect to the specified URL.
You can use the following units in the mod_cband directives:

Transfer speeds:

    kbps: 1024 bits per second
    Mbps: 1024*1024 bits per second
    Gbps: 1024*1024*1024 bits per second
    The default is kbps.

Transfer quotas:

    K: 1000 bytes
    M: 1000*1000 bytes
    G: 1000*1000*1000 bytes
    Ki: 1024 bytes
    Mi: 1024*1024 bytes
    Gi: 1024*1024*1024 bytes
    The default is K.

Time periods:

    S: seconds
    M: minutes
    H: hours
    D: days
    W: weeks
    The default is S.
Reference: Download mod_cband file:
AGILE introduction
Posted: 7 May 2012, 12:47pm - Monday
Watching this video will totally understand what is AGILE all about... :)
Fixing the error
Syntax error on line 293 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory
I already encounter this problem few years back yet I forgot the solution. As you know, its a basic thing to do that we will set users home and its directories right? And I'm done with it. yet the error keeps coming when restarting Apache.
[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
                                                           [FAILED]
This is actually the SELINUX causing this error. After you change the following;
[root@localhost home]# chmod 711 user
[root@localhost home]# chmod 755 user/public_html
You should disabled your SELINUX. In CentOS 5.2, you can simply type "setup", go to Firewall Configuration and select SELinux: Disabled But in CentOS 6.2, you can't find it at "setup", edit the file /etc/selinux/config and change the following from:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
to
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
Then reboot your machine/box! That's it! It should be working fine... You can use paths in users home. :)
ReCaptcha and SAJAX Integration
Posted: 18 Apr 2012, 18:17pm - Wednesday
It's been a while using this method and I'm posting this since my friends are asking how to integrate the Recaptcha and SAJAX. What to edit:
  1. Edit recaptchalib.php (ReCaptcha Library File), at line 106 or under recaptcha_get_html() function, add "id" attributes of both recaptcha_challenge_field and recaptcha_response_field.
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
	if ($pubkey == null || $pubkey == '') {
		die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
	}

	if ($use_ssl) {
                $server = RECAPTCHA_API_SECURE_SERVER;
        } else {
                $server = RECAPTCHA_API_SERVER;
        }

        $errorpart = "";
        if ($error) {
           $errorpart = "&error=" . $error;
        }
        return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '&hl=en"></script>

	<noscript>
  		<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
  		<textarea name="recaptcha_challenge_field" id="recaptcha_challenge_field" rows="3" cols="40"></textarea>
  		<input type="hidden" name="recaptcha_response_field" id="recaptcha_response_field" value="manual_challenge"/>
	</noscript>';
}
  Source Code: recaptcha_sajax.zip
DUMP/JUNK/TRASH SOPA/PROTECT-IP
Posted: 19 Jan 2012, 3:12am - Thursday
PROTECT IP / SOPA Breaks The Internet from Fight for the Future on Vimeo. Tell Congress not to censor the internet NOW! - fightforthefuture.org/pipa PROTECT-IP is a bill that has been introduced in the Senate and the House and is moving quickly through Congress. It gives the government and corporations the ability to censor the net, in the name of protecting "creativity". The law would let the government or corporations censor entire sites-- they just have to convince a judge that the site is "dedicated to copyright infringement." The government has already wrongly shut down sites without any recourse to the site owner. Under this bill, sharing a video with anything copyrighted in it, or what sites like Youtube and Twitter do, would be considered illegal behavior according to this bill. According to the Congressional Budget Office, this bill would cost us $47 million tax dollars a year — that's for a fix that won't work, disrupts the internet, stifles innovation, shuts out diverse voices, and censors the internet. This bill is bad for creativity and does not protect your rights. Biden on Internet Freedom = Anti-SOPA from Fight for the Future on Vimeo. americancensorship.org Joe Biden filled in for Hillary Clinton at the London Conference on Cyberspace (LCC) on November 1st, giving a speech on the importance of freedom in cyberspace and talking up the importance of freedom on the internet and not regulating the internet. Meanwhile, the Obama Administration stands with congress in full support of H.R 3261, the Stop Online Piracy Act, which would give copyright holders the ability to censor websites on the net. We need to stand up now and let Congress know that they shouldn't mess with the Internet!
HowTo? .htaccess SEO-friendly URL
Posted: 13 Oct 2011, 6:17am - Thursday
Today, its my 3rd time I created a SEO-friendly URL for a website... and its been a year since my last setup and forgot the procedure.. So I'm writing it down to my blog to remind me what I did... this time, I used different method coz I'm getting lazy using regex. hehehehe... I used .htaccess generator at www.myseotool.com and upload to the server.. I tested it out.. and it seems it won't work... I search for the solution and I found the solution of Eddie Ringle about his experience too. So I edited my httpd.conf , since I'm also the system/server administrator, I have full access on the server, and change from;
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
to
<Directory />
  Options FollowSymLinks
  AllowOverride All
</Directory>
then save httpd.conf new changes. Then restart httpd or apache. then I tested it out.. ...or other way that might cause the problem is, your mod_rewrite.so module in not enable. to do this, edit your httpd.conf; from
#LoadModule rewrite_module modules/mod_rewrite.so
change to
LoadModule rewrite_module modules/mod_rewrite.so
wallah! it works!
Gambas 2.x in Ubuntu
Posted: 12 Aug 2011, 16:49pm - Friday
Its been a while that I'm not using Linux especially Ubuntu. While reading in CDO Information Technology Group in facebook, one person ask about an opensource similar to visual basic and somebody answer that use GAMBAS. So I searched and found GAMBAS and its samples. I'm getting curious more. So install VMware 7.1 and downloaded Ubuntu 11.04. Also installed right away the GAMBAS after the OS installation.

 

Installing GAMBAS 2.x
Installing GAMBAS 2.x in Ubuntu

So after installation, as a first app -- the "Hello World!". so I start creating a new project and test typing lil' codes. Coding results below;

 

[caption id="attachment_574" align="aligncenter" width="576" caption="GAMBAS First App"]GAMBAS First App[/caption]

Conclusion: GAMBAS is just like MS Visual Basic with some little differences in coding. Hope GAMBAS will be fully developed and become mature, with this Linux Desktop Application Developer will raise (and I want to be one of the developers! hahahaha...).

Comments: I like GAMBAS.. so cute! hahahahaha... want to explore more about this software.

For more information about GAMBAS, please visit http://gambas.sourceforge.net/en/main.html

 

Load Balancing in Windows XP
Posted: 11 Jul 2011, 18:34pm - Monday
I have an small office in my house and got two internet connections. Yet I want both connections will be used. So I found a solution to tweak the system. So here's what we will do; Requirements:
  1. 2 NICs
  2. REGEDIT
Guidelines: Go to start menu and select RUN, then type "regedit" and a Registry Editor will appear. Go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters" and right click and mouse over to NEW then select DWORD value. Name the DWORD entity to RandomAdapter and change the value to 1 to make the selection of NICs randomly.  
System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters] Value Name: RandomAdapter Data Type: REG_DWORD (DWORD Value) Value Data: (0 = disabled, 1 = enabled)   Reference: http://www.pctools.com/guides/registry/detail/951/
[Rackspace] Backup web server files to Cloud Files using PHP API
Posted: 20 Apr 2011, 22:00pm - Wednesday
My latest task if to enhance our backup system that we currently have which all our backups are stored in the same server. Today, I managed to create an API integration to Rackspace Cloud Files and to transfer the generated backups of the web server to Cloud Files. Below is the guide for those who are having trouble using the API. HowTo:
  1. Download the Cloud Files API - https://github.com/rackspace/php-cloudfiles/tree
  2. Follow the steps in extracting the API files to your server, http://cloudfiles.rackspacecloud.com/index.php/PHP_API_Installation
  3. And you may start creating php script, read http://docs.rackspacecloud.com/files/api/cf-devguide-latest.pdf
Possible Problems you will encounter:
PHP Fatal error:  Uncaught exception 'BadContentTypeException' with message 'Required Content-Type not set ...
Solution:
  • Install the PHP PECL FileInfo
# yum -y install php-devel php-pecl php-pear

// if "sh: make: command not found" error OR "ERROR: `make' failed" occur, groupinstall the Development Tools.
# yum -y groupinstall "Development Tools"

// install fileinfo
# pecl install fileinfo
# service httpd restart
if still occurs, last resort is upgrade your php to php 5.3
  • Upgrade your PHP to 5.3
first, remove the current installed php and php-common
# yum -y erase php php-common
then install the PHP v5.3
# yum -y install php53 php53-devel php-mysql php-gd php-pecl php-pear php-common
#service httpd restart
and that's it.. your php script should be running... for my scenario:
[root@server backups]# ls
backup.logs                          mysql_03262011_0155.tar.gz  mysql_04042011_0155.tar.gz  mysql_04132011_0155.tar.gz  WebFiles_04-06-2011.tar.gz
backup.mail                          mysql_03272011_0155.tar.gz  mysql_04052011_0155.tar.gz  mysql_04142011_0155.tar.gz  WebFiles_04-13-2011.tar.gz
backupSQL.script                     mysql_03282011_0155.tar.gz  mysql_04062011_0155.tar.gz  mysql_04152011_0155.tar.gz  WebFiles_04-20-2011.tar.gz
backupSQL.script.11082010            mysql_03292011_0155.tar.gz  mysql_04072011_0155.tar.gz  mysql_04162011_0155.tar.gz  cronjobs.txt
backup.web                           mysql_03302011_0155.tar.gz  mysql_04082011_0155.tar.gz  mysql_04172011_0155.tar.gz  init.cdn.script
backupWEB.script                     mysql_03312011_0155.tar.gz  mysql_04092011_0155.tar.gz  mysql_04182011_0155.tar.gz  monthly.2011
cdn.backup.php                       mysql_04012011_0155.tar.gz  mysql_04102011_0155.tar.gz  mysql_04192011_0155.tar.gz  scripts
mysql_03242011_0155.tar.gz  mysql_04022011_0155.tar.gz  mysql_04112011_0155.tar.gz  mysql_04202011_0155.tar.gz
mysql_03252011_0155.tar.gz  mysql_04032011_0155.tar.gz  mysql_04122011_0155.tar.gz  WebFiles_03-30-2011.tar.gz
These files are my backup files, so I created a PHP script named cdn.backup.php, with initializer named init.cdn.script to upload the backup files to Cloud files. If I execute my script, this is the output:
[root@server backups]# ./init.cdn.script
. . . . . . . . . . . . . Uploadeding mysql_04202011_0155.tar.gz...
SQL backup completed!
. . . . . . . . . . . . . . . . . . . . Uploadeding WebFiles_04-20-2011.tar.gz...
Web files backup completed!
That's it... My files has been uploaded to cloud files. --- Source code:
<?php
if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get"))
@date_default_timezone_set(@date_default_timezone_get());

require('cloudfiles.php');

date_default_timezone_set('America/New_York');
$cfgAccount = array('user'=>'demo','keys'=>'fe01ce2a7fbac8fafaed7c982a04e229');

$auth = new CF_Authentication($cfgAccount['user'], $cfgAccount['keys']);

$auth->authenticate();

if ($auth->authenticated())
{
	$conn = new CF_Connection($auth);
	//$conn->ssl_use_cabundle();

	$container_name = "backups";

	// execute this if no container
	//$backup_obj = $conn->create_container($container_name);
	//echo $backup_obj;

	if (function_exists('systemxx'))
	{
		system("ls -t",$lines);
		foreach($lines as &$line)
		{
			echo $line . "\n\n";
		}
	}
	else
	{
		$backupSQLSent = 0;
		$backupFILESent = 0;
		$limit = date("j") - 7;
		for ($i = date("j"); $i > $limit; $i--)
		{
			$d = dir("/backups/");
			//echo "Handle: " . $d->handle . "\n";
			//echo "Path: " . $d->path . "\n";
			while (false !== ($entry = $d->read()))
			{
				//  mysql_04122011.tar.gz
				if ((preg_match("/mysql_".date("mdY")."/", $entry)) && ($backupSQLSent == 0))
				{
					$backup_obj = $conn->get_container($container_name);

					echo 'Uploadeding '.$entry."...\n";

					$tarballs = $backup_obj->create_object("cdn_".mktime()."_".$entry);
					$filename = "/backups/".$entry;

					// upload file in a hard way
					$fsize = (float) sprintf("%u", filesize($filename));
					$fp = fopen($filename, "r");
					$tarballs->write($fp, $fsize);

					// upload file in a convenience way
					//$tarballs->load_from_filename($filename);

					echo "SQL backup completed!\n";
					$backupSQLSent = 1;
				}

				// WebFiles_04-20-2011.tar.gz
				if ((preg_match("/WebFiles_".date("m-d-Y")."/",$entry)) && ($backupFILESent == 0))
				{
					$backup_obj = $conn->get_container($container_name);

                                        echo 'Uploadeding '.$entry."...\n";

                                        $tarballs = $backup_obj->create_object("cdn_".mktime()."_".$entry);
                                        $filename = "/backups/".$entry;

                                        // upload file in a hard way
                                        $fsize = (float) sprintf("%u", filesize($filename));
                                        $fp = fopen($filename, "r");
                                        $tarballs->write($fp, $fsize);

                                        // upload file in a convenience way
                                        //$tarballs->load_from_filename($filename);

					echo "Web files backup completed!\n";
                                        $backupFILESent = 1;
				}

				if (($backupFILESent == 1) && ($backupSQLSent == 1))
				{
					break;
				}
				echo ". ";
			}
			$d->close();

			// if backup sent, end loop
			if (($backupFILESent == 1) && ($backupSQLSent == 1))
			{
				break;
			}
			echo "\n";
		}
	}

}
else
{
	echo 'Unable to connect to Cloud Files!';
}

?>
--- Downloads:
  1. rackspace-php-cloudfiles-v1.7.9-0-gb5e5481.tar.gz
  2. cdn.backup.zip
I got Computer Vision Syndrome (CVS)
Posted: 20 Feb 2011, 10:06am - Sunday
Few days ago, I suffer of super itchiness of my eyes for excessive staring at the computer screen, coding of tiger look style to avoid errors. I thought I will go blind. But reading some articles, computer didn't do something wrong with my eyes but the surrounding like lights and air. I will quote this for you;
Can A Computer Screen Damage My Eye? Twenty years ago, few offices workers used computers, let alone had computers. However with the dramatic increase in home and office computer use,  complaints of eye fatigue and discomfort are commonplace. Many people assume increased computer use is the source of these complaints. But extensive testing in government and private laboratories has not produced scientific evidence that computer monitors will harm your eyes. Research has established that computer monitors emit little or no hazardous radiation, such as x-ray, or non-ionizing radiation, such as ultraviolet rays. While computers have no known harmful effects on eyesight, computer users do often complain of eye related symptoms such as eyestrain, headaches, fatigue, dry eyes, and difficulty focusing, These symptoms (Computer Vision Syndrome - CVS) however are caused not by the computer screen itself but rather by the conditions surrounding the computer screen, such as poor lighting or improper placement of computer equipment and computer furniture. In some instances, a pre-existing eye problem may be the cause.
And more info about CVS;
Until recently I had a problem of itchiness, redness and irritation in my eyes. Normally i confronted with this problem whenever i went my home since i spend most of my time in front the television to watch my favorite movies and at the other times when i tried to read continuously or while using computer. Then I consulted an ophthalmologist for an eye examination and she said it is nothing but Dry eye syndrome. I really got stuck with these heavy wordings and by seeing my situation doctor said it causes due to excessive strain on eyes. When i start reading or using computer, it stretches sometimes more than 4 hrs. While concentrating on a screen or a book, the eye tends to blink less and this results in drying up of the tears which are the natural lubricant lining the eye’s surface. This may lead to the non production of tears in the eyes. Dry eye syndrome is also called Computer vision syndrome. What are the symptoms of Dry eye syndrome?
  • The major symptoms related with dry eye syndrome are:
  • Redness and irritation
  • Itchiness and pain in the eyes
  • Discharge and watery eyes
  • Feeling of tiredness in the eyes and strain on the vision
  • Blurring of vision
How can we get rid off the problem of dry eyes? Prevention is better than cure. So we can take few steps to prevent the situation like:
  • After working or reading for 20-30 minutes at a stretch, we should look away from the screen or page and consciously blink which will  lubricates the eye surface by allowing the resurfacing of the tear film.
  • We can read in good light and choose correct font size and colors with good contrast and visibility to minimize the eye strain
  • Avoid exposure to dust
  • Avoid direct blast from AC or fan
  • Place the laptop screen at a comfortable level
  • Avoid excessive exposure to dust and pollution
  • Washing eyes with tender coconut water (my natural home remedy for dry eye syndrome)
What is the treatment available for Dry eye syndrome or Computer vision Syndrome?
  • Better to consult an ophthalmologist rather than doing self treatment for an eye examination.
  • Sometimes there may be refractive error, due to incorrect spectacle number which could be adding to the eye strain, can be sorted out by wearing a correction glasses especially while working on the computer.
  • We can use lubricating eye drops.
  • The best treatment is to keep on blinking to get rid off dry eyes.
-- Reference:
  1. http://www.pasadenaeye.com/faq/faq08/faq08_text.html
  2. http://kish.in/dry-eyes-syndrome/