dio_open()和dio_stat()函数都不能使用,
提示Fatal error: Call to undefined function dio_stat()这个错误!!!
请各位大侠指教。。。。
注: 本扩展已被移动到 PECL 库中且自以下版本起不再被绑定到 PHP 中:5.1.0.
This extension is only available on Windows Platforms as of PHP 5.0.0
本扩展仅在Windows平台PHP5.0.0时有效
需求
要编译本扩展模块无需外部库文件。
注意一下你的版本!
Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) extension folders as well as the separate PECL DLL download (PHP 5). Be sure to appropriately set the extension_dir directive.
http://pecl.php.net/
http://php.morva.net/manual/zh/install.pecl.windows.php
先去下載再安裝
php.ini中做了如此配置extension=php_dio.dll
并且php_dio.dll这个库文件也在ext目录下,为什么还是不能使用那些函数?????
问题已经解决,需要php和pecl的版本一致。。。
文章来源:http://tw2.php.net/manual/en/ref.dio.php
Direct IO Functions
Table of Contents
* dio_close — Closes the file descriptor given by fd
* dio_fcntl — Performs a c library fcntl on fd
* dio_open — Opens a file (creating it if necessary) at a lower level than the C library input/ouput stream functions allow.
* dio_read — Reads bytes from a file descriptor
* dio_seek — Seeks to pos on fd from whence
* dio_stat — Gets stat information about the file descriptor fd
* dio_tcsetattr — Sets terminal attributes and baud rate for a serial port
* dio_truncate — Truncates file descriptor fd to offset bytes
* dio_write — Writes data to fd with optional truncation at length
(sorry for my English)
http://pecl.php.net/get/dio seems broken at the moment
to get dio extension follow these steps (steps 1.a and 1.b are equivalent):
1.a get source files using cvs (you may need cvsnt or similar):
(in shell run)
cvs -d :pserver:cvsread@cvs.php.net:/repository login
Password: phpfi
cvs -d :pserver:cvsread@cvs.php.net:/repository co pecl/dio
cd pecl/dio/
-- or --
1.b manually download all files at http://cvs.php.net/cvs.php/pecl/dio clicking on the revision number link
move to the destination directory
2. (in shell run)
phpize (if the system is missing the 'phpize' command see http://php.mirrors.ilisys.com.au/manual/en/install.pecl.phpize.php)
./configure --enable-dio --with-php-config=/path/to/php-config (usually /usr/local/php/bin/php-config or /usr/bin/php-config)
make
make install (you need root/admin privilegies)
php dot 5 dot gavinostlund at spamgourmet dot com
08-Dec-2007 12:36
You can manually build the dio extension for your version of PHP, or install an older version of PHP that still bundled dio. It's not that hard to build it yourself, just a bit of a process, and it helps if you're on linux, and have a build environment... which I would assume you have if you are doing some kind of development that requires direct device I/O... Just get the dio source from the cvs repo, compile it, and then add the extension to your php configuration...
tom at bitworks dot de
03-Nov-2007 01:41
to use mandatory locking on a linux system, the filesystem has to be well prepared.
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext3 errors=remount-ro,mand 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
For example here the ext3 partition has been prepared for mandatory locking. Otherwise no dio_function will work on the system.
richard d_0t cubek a_t example D0_t com
25-Sep-2007 08:13
IMPORTANT:
--enable-dio is NOT recognized as an option. After reporting a bug, i got following answer:
It is not bundled anymore. See http://pecl.php.net/dio to fetch the CVS version (being unmaintained, there is no release in pecl). Not a bug > bogus.
[b]如何编译dio_open 的so文件:[/b]
http://php.mirrors.ilisys.com.au/manual/en/install.pecl.phpize.php
摘录部分:
Compiling shared PECL extensions with phpize
Sometimes, using the pecl installer is not an option. This could be because you're behind a firewall, or it could be because the extension you want to install is not available as a PECL compatible package, such as unreleased extensions from SVN. If you need to build such an extension, you can use the lower-level build tools to perform the build manually.
The phpize command is used to prepare the build environment for a PHP extension. In the following sample, the sources for an extension are in a directory named extname:
$ cd extname
$ phpize
$ ./configure
$ make
# make install
A successful install will have created extname.so and put it into the PHP extensions directory. You'll need to and adjust php.ini and add an extension=extname.so line before you can use the extension.
If the system is missing the phpize command, and precompiled packages (like RPM's) are used, be sure to also install the appropriate devel version of the PHP package as they often include the phpize command along with the appropriate header files to build PHP and its extensions.
Execute phpize --helpto display additional usage information.
http://cvs.php.net/viewvc.cgi/pecl/dio/
提示Fatal error: Call to undefined function dio_stat()这个错误!!!
请各位大侠指教。。。。
注: 本扩展已被移动到 PECL 库中且自以下版本起不再被绑定到 PHP 中:5.1.0.
This extension is only available on Windows Platforms as of PHP 5.0.0
本扩展仅在Windows平台PHP5.0.0时有效
需求
要编译本扩展模块无需外部库文件。
注意一下你的版本!
Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) extension folders as well as the separate PECL DLL download (PHP 5). Be sure to appropriately set the extension_dir directive.
http://pecl.php.net/
http://php.morva.net/manual/zh/install.pecl.windows.php
先去下載再安裝
php.ini中做了如此配置extension=php_dio.dll
并且php_dio.dll这个库文件也在ext目录下,为什么还是不能使用那些函数?????
问题已经解决,需要php和pecl的版本一致。。。
文章来源:http://tw2.php.net/manual/en/ref.dio.php
Direct IO Functions
Table of Contents
* dio_close — Closes the file descriptor given by fd
* dio_fcntl — Performs a c library fcntl on fd
* dio_open — Opens a file (creating it if necessary) at a lower level than the C library input/ouput stream functions allow.
* dio_read — Reads bytes from a file descriptor
* dio_seek — Seeks to pos on fd from whence
* dio_stat — Gets stat information about the file descriptor fd
* dio_tcsetattr — Sets terminal attributes and baud rate for a serial port
* dio_truncate — Truncates file descriptor fd to offset bytes
* dio_write — Writes data to fd with optional truncation at length
(sorry for my English)
http://pecl.php.net/get/dio seems broken at the moment
to get dio extension follow these steps (steps 1.a and 1.b are equivalent):
1.a get source files using cvs (you may need cvsnt or similar):
(in shell run)
cvs -d :pserver:cvsread@cvs.php.net:/repository login
Password: phpfi
cvs -d :pserver:cvsread@cvs.php.net:/repository co pecl/dio
cd pecl/dio/
-- or --
1.b manually download all files at http://cvs.php.net/cvs.php/pecl/dio clicking on the revision number link
move to the destination directory
2. (in shell run)
phpize (if the system is missing the 'phpize' command see http://php.mirrors.ilisys.com.au/manual/en/install.pecl.phpize.php)
./configure --enable-dio --with-php-config=/path/to/php-config (usually /usr/local/php/bin/php-config or /usr/bin/php-config)
make
make install (you need root/admin privilegies)
php dot 5 dot gavinostlund at spamgourmet dot com
08-Dec-2007 12:36
You can manually build the dio extension for your version of PHP, or install an older version of PHP that still bundled dio. It's not that hard to build it yourself, just a bit of a process, and it helps if you're on linux, and have a build environment... which I would assume you have if you are doing some kind of development that requires direct device I/O... Just get the dio source from the cvs repo, compile it, and then add the extension to your php configuration...
tom at bitworks dot de
03-Nov-2007 01:41
to use mandatory locking on a linux system, the filesystem has to be well prepared.
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext3 errors=remount-ro,mand 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
For example here the ext3 partition has been prepared for mandatory locking. Otherwise no dio_function will work on the system.
richard d_0t cubek a_t example D0_t com
25-Sep-2007 08:13
IMPORTANT:
--enable-dio is NOT recognized as an option. After reporting a bug, i got following answer:
It is not bundled anymore. See http://pecl.php.net/dio to fetch the CVS version (being unmaintained, there is no release in pecl). Not a bug > bogus.
[b]如何编译dio_open 的so文件:[/b]
http://php.mirrors.ilisys.com.au/manual/en/install.pecl.phpize.php
摘录部分:
Compiling shared PECL extensions with phpize
Sometimes, using the pecl installer is not an option. This could be because you're behind a firewall, or it could be because the extension you want to install is not available as a PECL compatible package, such as unreleased extensions from SVN. If you need to build such an extension, you can use the lower-level build tools to perform the build manually.
The phpize command is used to prepare the build environment for a PHP extension. In the following sample, the sources for an extension are in a directory named extname:
$ cd extname
$ phpize
$ ./configure
$ make
# make install
A successful install will have created extname.so and put it into the PHP extensions directory. You'll need to and adjust php.ini and add an extension=extname.so line before you can use the extension.
If the system is missing the phpize command, and precompiled packages (like RPM's) are used, be sure to also install the appropriate devel version of the PHP package as they often include the phpize command along with the appropriate header files to build PHP and its extensions.
Execute phpize --helpto display additional usage information.
http://cvs.php.net/viewvc.cgi/pecl/dio/
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/2292/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2009-12-2 21:40
评论列表