Giter Club home page Giter Club logo

php-inotify's Introduction

PHP Inotify

Inotify bindings for PHP 5, PHP 7, and PHP 8

This extension exposes the inotify API and some additional functions.

Install

  • PHP 8: pecl install inotify
  • PHP 7: pecl install inotify
  • PHP 5: pecl install inotify-0.1.6

Documentation

Documentation is available at https://php.net/inotify

Goal

The goal of this extension is to expose the raw inotify API to PHP, while being memory safe and preventing resource leaks.

Streams

As the C inotify API returns file descriptors, this extension returns PHP streams.

This is useful for the following reasons:

I/O Polling

The streams can be used with polling mechanisms such as stream_select() or event loops such as ReactPHP or AMPHP. It's also possible to make the streams unblocking with stream_set_blocking().

Resource management

As the inotify file descriptors are owned by PHP streams, they are managed by PHP. This ensures that the file descriptors are eventually closed, which prevents descriptor leaks.

php-inotify's People

Contributors

adoy avatar arnaud-lb avatar pierrejoye avatar realflowcontrol avatar remicollet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-inotify's Issues

Error installing inotify

I get an error trying to install the extension:

➜  handle git:(develop) ✗ pecl install inotify
downloading inotify-2.0.0.tgz ...
Starting to download inotify-2.0.0.tgz (8,836 bytes)
.....done: 8,836 bytes
3 source files, building
running: phpize
/usr/local/Cellar/php70/7.0.6/bin/phpize: line 61: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/Cellar/php70/7.0.6/bin/phpize: line 62: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/Cellar/php70/7.0.6/bin/phpize: line 63: /usr/local/Library/ENV/4.3/sed: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
/usr/local/Cellar/php70/7.0.6/bin/phpize: line 155: /usr/local/Library/ENV/4.3/sed: No such file or directory
autoheader: error: AC_CONFIG_HEADERS not found in configure.in
ERROR: `phpize' failed

on

PHP 7.0.6 (cli) (built: May 25 2016 15:30:30) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

Compatibility with PHP7.4

Hi!

Is inotify compatible with PHP-7.4? When I compile and enable it for PHP 7.4 I get segmentation faults. With 7.3 it all works fine.

PHP missing functions

Hi,
I would like to use inotify, but after installing, inotify functions are not visible in PHP.
In my phpinfo I can see that PHP module inotify 2.0.0 is loaded.
And function_exists('inotify_init') will always return false.
My OS is Centos. My kernel is 3.1.x,, I installed also inotify-tools, but no help. My PHP is 7.0.x
What is the problem?

Php 5.5, install command

Just one small change, only below command worked for me

sudo pecl install -Z inotify-0.1.6

as there is no 0.6.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.