PHP DIO module
Posted: Sat 07 Jul 2018 11:43
I want to use PHP's Direct IO functions (http://php.net/manual/en/book.dio.php ) on my local PC. So I have downloaded it from PECL (https://pecl.php.net/package/dio/0.1.0) but Im having problems installing it. I wondered if anyone has any experience of installing PEAR packages under XAMPP on Windows 10? Essentially, I think the problem is that my installation of XAMPP possibly has some paths that PEAR is not expecting - or is it something more subtle? When I try to install the package I get ERROR: failed to mkdir C:\php\pear\tests\dio\tests. There are some hints in various onlin esupport groups about changing some of XAMPP's paths, but I thought Id ask here first before wading my way through them all.
Details of what I did are as follows.
Firstly, I ran the following tests - as suggested at http://pear.php.net/manual/en/installation.checking.php.
Installation meets the dependency requirements? (yes)
Location of config file...
Ran phpinfo() from web server, to see what the web server thought was happening...
Checked PHP's include_path setting on the command line:
Created a file (which I named as check_pear.php) containing...
and ran it from my localhost browser, producing an output of bool(true), which is correct. Also ran it from the command line and got the same answer...
Next, I installed the package, resulting in ERROR: failed to mkdir C:\php\pear\tests\dio\tests
Details of what I did are as follows.
Firstly, I ran the following tests - as suggested at http://pear.php.net/manual/en/installation.checking.php.
Installation meets the dependency requirements? (yes)
Code: Select all
C:\xampp\php> pear version
PEAR Version: 1.10.1
PHP Version: 5.6.15
Zend Engine Version: 2.6.0
Running on: Windows NT RED-LAPTOP 10.0 build 16299 (Windows 10) i586
Code: Select all
C:\xampp\php> php --ini
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: C:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
Code: Select all
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\xampp\php\php.ini
include_path C:\xampp\php\PEAR
Code: Select all
C:\xampp\php> php -c php.ini -r "echo get_include_path();"
C:\xampp\php\PEAR
Code: Select all
<?php require_once 'System.php'; var_dump(class_exists('System', false)); ?>
Code: Select all
C:\xampp\php> php C:\ [...] public_html\check_pear.php
bool(true)
Code: Select all
C:\xampp\php> pear install dio
No releases available for package "pear.php.net/dio" - package pecl/dio can be installed with "pecl install dio"
install failed
C:\xampp\php> pecl install dio
Failed to download pecl/dio within preferred state "stable", latest release is version 0.1.0, stability "beta", use "channel://pecl.php.net/dio-0.1.0" to install
install failed
C:\xampp\php> pear install channel://pecl.php.net/dio-0.1.0
downloading dio-0.1.0.tgz ...
Starting to download dio-0.1.0.tgz (36,960 bytes)
..........done: 36,960 bytes
ERROR: failed to mkdir C:\php\pear\tests\dio\tests