Thursday, October 27, 2011

Passport (Re)issue - chennai


The application for re-issue/new passport can be submitted online after creating a user account in the website mentioned below.
http://www.passportindia.gov.in

After submitting the online form then an appointment to the nearest PSK(Passport Seva Kendra)
can be made.  But the twist in this tale is the appointment for the desired date(in the available slots) can be booked between 6:00 pm - 6:05 pm. One can't book an appointment at any other time interval.


Avilable PSK's in chennai

PSK NameCityPSK Address
PSK AminjikaraiChennaiNavins Presidium, No. 103, Nelson Manickam Road, Aminjikarai, Chennai
PSK SaligramamchennaiNo. 1, Bhanumathi Ramakrishna Road, Saligramam, Chennai
PSK TambaramChennaiClaret Complex, Duraisamy Reddy Street, Tambaram, Chennai



Applying Online:

1. Submitting Application Online.


2. Completing Application Submission Process at PSK.



Passport Seva - Demo
http://www.passportindia.gov.in/AppOnlineProject/FlashDemo/shell_new.html



Saturday, October 8, 2011


Anatomy of a WordPress theme

Before getting stuck into the build process, it's important to know how WordPress themes work. If you've looked at any prebuilt theme, you'll notice that it's all contained in a folder, and there's around 12 core files. Some themes, including the Default WordPress theme, include more files which allow extra customisation, but aren't mandatory additions. Here's an overview of the main files you'll be working with:
  • header.php - Contains everything you'd want to appear at the top of your site.
  • index.php - The core file that loads your theme, also acts as the homepage (unless you set your blog to display a static page).
  • sidebar.php - Contains everything you'd want to appear in a sidebar.
  • footer.php - Contains everything you'd want to appear at the bottom of your site.
  • archive.php - The template file used when viewing categories, dates, posts by author, etc.
  • single.php - The template file that's used when viewing an individual post.
  • comments.php - Called at the bottom of the single.php file to enable the comments section.
  • page.php - Similar to single.php, but used for WordPress pages.
  • search.php - The template file used to display search results.
  • 404.php - The template file that displays when a 404 error occurs.
  • style.css - All the styling for your theme goes here.
  • functions.php - A file that can be used to configure the WordPress core, without editing core files.
Each of these files then contains a series of PHP template tags. These tags tell WordPress where to insert the dynamic content. A good example is the  tag, which pulls in the post title and displays it in your theme:
There's stacks of template tags available, and more often than not there will be one that does exactly what you want - It's just a case of finding it in theWordPress Codex. I've seen many themes that include some complicated PHP coding to achieve a function that's already available as a simple template tag, so remember to browse the WordPress Codex whenever you're stuck!
Bcompiler GUI - Free PHP bytecode compiler


Bcompiler GUI encodes and obfuscates your PHP code to make the output difficult to reverse engineer, using bcompiler as compiler. With this method you can distribute your software applications made in PHP without any worries at all. 


Requirements and first installation :
1) A webserver. 
An easy solution is to use Xampp or Lampp

a)Windows : Just download and install xampp (the installer).
When the installation is done, you will find XAMPP under Start - Programs - XAMPP.
You can use the XAMPP Control Panel(xampp-control.exe) to start/stop all server and also install/uninstall services.
b) Linux : Download the tar.gz file.
Now run the command from the console :
sudo tar xvfz xampp-linux-1.7.tar.gz -C /opt
Start lampp with : sudo /opt/lampp/lampp start
Stop lampp with : sudo /opt/lampp/lampp stop 
Now start apache and MySQL and test them by opening the browser at the address :
http://localhost/xampp
Hit the phpinfo() link in order to get important informations like the PHP version or just go with your browser at the address :
http://localhost/xampp/phpinfo.php

2) You have to enable bcompiler on your webserver. 
By default is not enabled 

a)Windows :
i)Install Xdebug
-Download Xdebug dll (notice that you have to know your PHP version from phpinfo)
-Open xampp\php\php.ini and make these changes :

[Zend]
;zend_extension_ts = "E:\YOUR_PATH\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "E:\YOUR_PATH\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;;zend_optimizer.license_path =
;; Local Variables:
;; tab-width: 4
;; End:

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="E:\YOUR_PATH\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="E:\YOUR_PATH\xampp\tmp"

-Do the same thing at the file xampp\apache\bin\php.ini
By doing this we disable the Zend optimizer and we are using Xdebug instead.
-Put the php_xdebug.dll at the
E:\YOUR_PATH\xampp\php\ext\php_xdebug.dll
If you have problems with apache (errors like dll not found) then you should download another version of xdebug.dll (always rename it to php_xdebug.dll) from xdebug.org
-Now stop and restart xampp (apache+MySQL).
Under http://localhost/xampp/phpinfo.php you should now find the xdebug. 
ii)Install bcompiler
-Go to xampp\php\php.ini and uncomment :
extension=php_bcompiler.dll
-Do the same for the file xampp\apache\bin\php.ini
extension=php_bcompiler.dll
-Now stop and restart xampp (apache+MySQL).
Under http://localhost/xampp/phpinfo.php you should now find the bcompiler too.
-Now you are ready to use Bcompiler GUI under Windows! 
b)Linux (Tested on Kubuntu) :
-Download and install these packets :
sudo apt-get install php5-dev
sudo apt-get install automake m4
sudo apt-get install libbz2-dev
sudo apt-get install re2c
sudo apt-get install php-pear

-Then do :
sudo pecl install bcompiler-0.8
bcompiler with this command should be compiled and inserted at this folder :
/usr/lib/php5/20060613+lfs
-Open the file
/etc/php5/cli/php.ini
and write
extension=bcompiler.so
in order to activate bcompiler
-Copy the
/usr/lib/php5/20060613+lfs/bcompiler.so
into the folder
/opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/bcompiler.so
-Open the file
/opt/lampp/etc/php.ini
and write
extension="bcompiler.so"
in order to activate bcompiler
-Now stop the server
sudo /opt/lampp/lampp stop
-Now start the server
sudo /opt/lampp/lampp start
-Under http://localhost/xampp/phpinfo.php
you should now find the bcompiler.
3) Firefox 3. 
Is needed for launching the script CompileScript.php under Linux.
Under Windows Firefox is not needed but it is always recommended to have it.

How to use :
1) Start apache and MySQL
2) Select your webserver root . Must be something like
/opt/lampp/htdocs/ (under Linux)
c:\xampp\htdocs\ (under Windows)
3) Select your PHP project to compile (website root).
This must be under the webserver root for example :
/opt/lampp/htdocs/mysite (under Linux)
c:\xampp\htdocs\mysite (under Windows)
4) Select your PHP files that you want to compile.
By default they are all selected.
Note that the Compiled project will be generated at :
/opt/lampp/htdocs/mysiteCompiled (under Linux)
c:\xampp\htdocs\mysiteCompiled (under Windows)
Notice that under Linux you have to CHMOD 777 the /opt/lampp/htdocs/mysiteCompiled directory and all the underneath subirectories too.
5) Press the Compile button.
6) You are almost done.
If you get a series of warnings like :
Warning: fopen(index.php).
Just make sure that /opt/lampp/htdocs/mysiteCompiled is CHMOD 777 and then just reload the webpage with firefox.
The url should be something like that :
http://localhost/mysiteCompiled/CompileScript.php
7) If you got a successfull compilation it is time to test your compiled site by going at :
http://localhost/mysiteCompiled/
(or just hit the link at the 'all done' page.)
8) If it everything alright then you must delete the CompileScript.php script.
9) All done !

Important Notes : :
The compiled version of your PHP product needs a webserver with bcompiler enabled.

Based On :
Bcompiler - A PHP bytecode Compiler


Whats new v.1.1 :
Problems with subpaths solved.
Now for example you can use as webpage root :
/opt/lampp/htdocs/test/mysiteCompiled (under Linux)
c:\xampp\htdocs\test\mysiteCompiled (under Windows)
Better interface (more intuitive)
Fixed some smaller Bugs
Whats new v.1.0 :
First official and public release. 


Bcompiler GUI screenshot



Download: Bcompiler GUI v. 1.1

Trustfm.Net
Win32 Version (Windows)

Trustfm.Net 
GTK 2 Version (Linux)