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 https://xdebug.org/docs/install

Step 2 : php.ini Settings

[XDEBUG]
zend_extension = full\path\to\xdebug\extension
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=On

Step 3 : Eclipse Setup

      Set up as the highlighted fields in below screenshots

Step 3.1 : Setup PHP and xDebug executables

php-eclipse-setup1

 

Step 3.2 : setup Debug

php-xdebug-eclipse2

 

php-xdebug-eclipse3

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

WORKAROUND

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

 

Mobile device for updating a website

In my previous post , I shared a video by Douglas Crockford on history of computing.

Here I’m going to share my experience of using my nexus 5 to update a website
This afternoon my freelancing client called me for a small update in his website http://nittephysiocon.com
Basically the requirement was to add a button in the page clicking on which downloads a document . I was asked update this asap within an hour .

So I thought of doing this in my mobile .
I did as below
1) downloaded the original index.php from web hosting ftp site using ES File explorer
2) ES file explorer app has pretty good ftp client , downloaded index.php is modified to include new button html then uploaded back
3) uploaded the provided document to ftp site

All tasks are done using my nexus 5 ,
Thanks to mobile tec

hnologies