adding extension to PHP

From: Date: Wed, 05 Feb 2003 18:06:31 +0000
Subject: adding extension to PHP
Groups: php.dev 
Request: Send a blank email to php-dev+get-94038@lists.php.net to get a copy of this message
Hello, I am going to write a PHP extension on top of some libraries that I have developed over the past few years. The libraries are bunch of .so file and some of them are C++. If I am going to compile my extension against 4.3 code base, will it be ok to run this with other 4.x PHP install base? In addition, I found out that for some reason the following does not work: ifile = open("/etc/myapp.conf", O_RDONLY, S_IREAD|S_IWRITE); if (ifile != -1) { if (flock(ifile, LOCK_EX) != 0) { php_error(E_WARNING, "unable to flock file %d,err: %d", ifile, errno); } else flock(ifile, LOCK_UN); close(ifile); } I put the above in one of the test function in my extension, flock always failed with errno = 9 ( bad file descriptor ) but ifile is not -1. Any idea? TIA. Joe

« previous php.dev (#94038) next »