Setting up SSH Agent (pageant) in Windows

  • Download and Install PLink
    • copy plink.exe into C:\windows\
  • Download and intsall Pageant
    • copy pageant.exe to a safer place . C:\windows\ is recommended
  • Running Pageant
    • Double-click pageant to start it. It will start minimized on the task bar and looks like this: .
    • Double-click the pageant icon the the task bar. You will see a list of any keys that are already loaded.
    • Use puttygen.exe to generate the ssh key-pair
      • puttygen.exe can be used to convert the private key generated from ssh-keygen to PKCS format
    • Click  Add Key. You will be prompted to provide the private key file.
    • Browse the Internal key file & click on Load.
    • Click  Open.
    • Enter the passphrase you supplied on key creation. The key appears in the main window list when loaded.
    • Close the window.
      NOTE: You need to restart Pageant and reload your keys every time you reboot your machine.
  • To use Git with pageant
    • set environment variable GIT_SSH=C:\Windows\plink.exe

xDebug PHP CLI Applications in Eclipse

I have some phpunit test cases which I need to debug in my eclipse .
I’m trying to explain the debugging setup in the following situation

  • Run PHPUnit from Command Line
  • Debug from eclipse

Step 1 :  Install xDebug

more comprehensive guide to install xDebug is here

Step 2 : php.ini Settings

zend_extension = fullpathtoxdebugextension

Step 3 : Eclipse Setup

      Set up as the highlighted fields in below screenshots

Step 3.1 : Setup PHP and xDebug executables



Step 3.2 : setup Debug




File Information is Cached by PHP

PHP Caches file metadata in status cache , causing wrong(cached) output from these file operation functions

stat(), lstat(), file_exists(), is_writable(), is_readable(), is_executable(), is_file(), is_dir(), is_link(), filectime(),fileatime(), filemtime(), fileinode(), filegroup(), fileowner(), filesize(), filetype(), and fileperms().

when i use filesize() function , I intend to get the correct size . I feel there is no valid reason behind caching this


call clearstatcache() before calling any of the above mentioned functions