Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, 12 September 2016

PHP 7.0 ZendDebugger.so for 64bit Linux

It's really hard to find ZendDebugger.so for php7.0 linux, but here it is:


ZendDebugger.so PHP7.0

; Specifies the hosts that are allowed to connect (hostmask list) with Zend Debugger when running a remote debug session with Zend Studio
zend_debugger.allow_hosts=127.0.0.0/8,<YOUR IP ADDRESS>

; Specifies the hosts that are not allowed to connect (hostmask list) with the Zend Debugger when running a remote debug session with Zend Studio
zend_debugger.deny_hosts=

; A list of hosts (hostmask list) that can use the machine on which Zend Server is installed to create a communication tunnel for remote debgging with Zend Studio. This is done to solve firewall connectivity limitations
zend_debugger.allow_tunnel=

; The user ID of the httpd process that runs the Zend Debugger (only for tunneling)
zend_debugger.httpd_uid=-1

; A range of ports that the communication tunnel can use. This defines the minimum value for the range
zend_debugger.tunnel_min_port=1024

; A range of ports that the communication tunnel can use. This defines the maximum value for the range
zend_debugger.tunnel_max_port=65535

; Define whether to expose the presence of the Zend Debugger to remote clients
zend_debugger.expose_remotely=2

; The Debugger's timeout period (in seconds) to wait for a response from the client (Zend Studio) (units: seconds)
zend_debugger.passive_mode_timeout=20

; Enables fast time sampling which is dependent on CPU cycles and frequency, otherwise, the directive uses operating system timing (which may be less accurate)
zend_debugger.use_fast_timestamp=1

; Enable code-coverage feature, should only be true on local debugger
zend_debugger.enable_coverage=1

zend_debugger.xdebug_compatible_coverage=0

Zend debugger php 7 settings

Wednesday, 15 January 2014

Mutex's and Semaphores - The toilet Example.

Mutex:

Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When finished, the person gives (frees) the key to the next person in the queue.
Officially: "Mutexes are typically used to serialise access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A mutex object only allows one thread into a controlled section, forcing other threads which attempt to gain access to that section to wait until the first thread has exited from that section." Ref: Symbian Developer Library
(A mutex is really a semaphore with value 1.)

Semaphore:

Is the number of free identical toilet keys. Example, say we have four toilets with identical locks and keys. The semaphore count - the count of keys - is set to 4 at beginning (all four toilets are free), then the count value is decremented as people are coming in. If all toilets are full, ie. there are no free keys left, the semaphore count is 0. Now, when eq. one person leaves the toilet, semaphore is increased to 1 (one free key), and given to the next person in the queue.
Officially: "A semaphore restricts the number of simultaneous users of a shared resource up to a maximum number. Threads can request access to the resource (decrementing the semaphore), and can signal that they have finished using the resource (incrementing the semaphore)." Ref: Symbian Developer Library

Friday, 1 November 2013

Tar and untar files.

You need to use the tar command as follows (syntax of tar command):
tar -zcvf archive-name.tar.gz directory-name
Where,
  • -z : Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name
For example, say you have a directory called /home/jerry/prog and you would like to compress this directory then you can type tar command as follows:
$ tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog
Above command will create an archive file called prog-1-jan-2005.tar.gz in current directory. If you wish to restore your archive then you need to use the following command (it will extract all files in current directory):
$ tar -zxvf prog-1-jan-2005.tar.gz
Where,
  • -x: Extract files
If you wish to extract files in particular directory, for example in /tmp then you need to use the following command:
$ tar -zxvf prog-1-jan-2005.tar.gz -C /tmp
$ cd /tmp
$ ls -