OWFS SF.net project page New OWFS Website! by Paul H Alfille SourceForge.net Logo
OWFS Design
overview
components
naming
cache
arrays
performance

OWFS Features
cache
statistics

OWFS Software
Install instructions
Bootable CD
Filesystem (owfs)
Web Server (owhttpd)
Backend Server (owserver)
Perl bindings (owperl)
Python bindings (owpython)
PHP bindings (owphp)
Tcl bindings (owtcl)
Download
Daily Configured Package
CVS -- newest
CVS Statistics
FAQ
Examples & Usage
1-wire wireless
1-Wire Hardware
OWFS Project

owphp documentation

Name

owphp - OWFS library access commands for PHP

Requirements

Requirements for owphp are a running version of swig and that the program 'php-config' is in your path. Php-config should be contained by the standard php package.

Configuring and installing owphp

To enable owphp please run './configure --enable-owphp' in the owfs source directory, then run make. If everything runs well you should end up with a php library that can be included by a php program. For this to work, you'll have to copy the newly created library from '{OWFS-SOURCE}/module/swig/php/.libs/libowphp.so.0.0.0' to the php include directory (on my Debian system it is: '/usr/lib/php4/20020429/') and rename it to 'php_OW.so'.

Loading the owphp extension

Please take a look at the included 'load_php_OW.php' file. It will load the extension for you if you set the right name for the include directory. Initialize the bus in your php program using somthing like this:

     require "load_php_OW.php";
     init( "localhost:3001" );

Now your are free to do operations like 'get( "/$id/present" );' or 'put( "/$id/wiper", 255 );' or whatever you want to do. After you have finished your 1-Wire operations be sure to call:

     finish();

Synopsis

     init( "$options" );
     finish();
     get( "$path" );
     put( "$path", $value );

You can use the standard options for 'init', have a look at the other swig extensions to owfs.
© 2005 Paul H. Alfille and The owfs Team
Last modified: Tue Mar 29 18:20:58 CEST 2005