如題
截圖截全一點(diǎn)吧,family后面看不到了。
另外把你的index.php貼下。
錯(cuò)誤:Warning:socket_import_stream():unableto obtain socket family [0]:在非套接字上嘗試一個(gè)操作。
in D:\web\school_pay\new\Workerman\Worker.php on line 669
index.php
/**
ini_set('display_errors', 'on');
use Workerman\Worker;
// 檢查擴(kuò)展
// if(!extension_loaded('pcntl'))
// {
// exit("Please install pcntl extension. See http://doc3.workerman.net/install/install.html\n");
// }
// if(!extension_loaded('posix'))
// {
// exit("Please install posix extension. See http://doc3.workerman.net/install/install.html\n");
// }
// 標(biāo)記是全局啟動(dòng)
define('GLOBAL_START', 1);
require_once __DIR__ . '/Workerman/Autoloader.php';
// 加載所有Applications//start.php,以便啟動(dòng)所有服務(wù)
foreach(glob(__DIR__.'/Applications//start*.php') as $start_file)
{
require_once $start_file;
}
// 運(yùn)行所有服務(wù)
Worker::runAll();
?>
錯(cuò)誤:Warning:socket_import_stream():unableto obtain socket family :在非套接字上嘗試一個(gè)操作。
in D:\web\school_pay\new\Workerman\Worker.php on line 669
index.php
/**
ini_set('display_errors', 'on');
use Workerman\Worker;
// 檢查擴(kuò)展
// if(!extension_loaded('pcntl'))
// {
// exit("Please install pcntl extension. See http://doc3.workerman.net/install/install.html\n");
// }
// if(!extension_loaded('posix'))
// {
// exit("Please install posix extension. See http://doc3.workerman.net/install/install.html\n");
// }
// 標(biāo)記是全局啟動(dòng)
define('GLOBAL_START', 1);
require_once __DIR__ . '/Workerman/Autoloader.php';
// 加載所有Applications/*/start.php,以便啟動(dòng)所有服務(wù)
foreach(glob(__DIR__.'/Applications/_/start_.php') as $start_file)
{
require_once $start_file;
}
// 運(yùn)行所有服務(wù)
Worker::runAll();
?>
你的windows版本的Workerman代碼和線上的不一致,
669行沒有socket_import_stream的調(diào)用。
https://github.com/walkor/workerman-for-win/blob/master/Worker.php#L669
重新下載一份代碼試下。
windows版本正確的啟動(dòng)姿勢是參見 http://wtbis.cn/windows。
不是啟動(dòng)你的index.php