国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

GatewayWorker在Windows中的啟動問提,請老師們給個指點

hedada

配置好之后,啟動提示錯誤!proc_get_status()expects parameter 1 to be resource,null given file 路徑。報錯1365以及1393位置處。
1365處代碼:

        $process     = proc_open("php \"$start_file\" -q", $descriptorspec, $pipes);

1393處代碼

            $status = proc_get_status($process);
  public static function forkOneWorkerForWindows($start_file)
    {
        $start_file = realpath($start_file);
        $std_file = sys_get_temp_dir() . '/'.str_replace(array('/', "\\", ':'), '_', $start_file).'.out.txt';

        $descriptorspec = array(
            0 => array('pipe', 'a'), // stdin
            1 => array('file', $std_file, 'w'), // stdout
            2 => array('file', $std_file, 'w') // stderr
        );

        $pipes       = array();
        $process     = proc_open("php \"$start_file\" -q", $descriptorspec, $pipes);
        $std_handler = fopen($std_file, 'a+');
        stream_set_blocking($std_handler, 0);

        if (empty(static::$globalEvent)) {
            static::$globalEvent = new Select();
            Timer::init(static::$globalEvent);
        }
        $timer_id = Timer::add(0.1, function()use($std_handler)
        {
            Worker::safeEcho(fread($std_handler, 65535));
        });

        // 保存子進程句柄
        static::$_processForWindows[$start_file] = array($process, $start_file, $timer_id);
    }

    /**
     * check worker status for windows.
     * @return void
     */
    public static function checkWorkerStatusForWindows()
    {
        foreach(static::$_processForWindows as $process_data)
        {
            $process = $process_data[0];
            $start_file = $process_data[1];
            $timer_id = $process_data[2];
            $status = proc_get_status($process);
            if(isset($status['running']))
            {
                if(!$status['running'])
                {
                    static::safeEcho("process $start_file terminated and try to restart\n");
                    Timer::del($timer_id);
                    proc_close($process);
                    static::forkOneWorkerForWindows($start_file);

我用Linux可以正常開啟,但是換成Windows之后就報錯,請問是什么問題,本人小白一個,求助一下,看看有沒有遇見過的。

3475 2 0
2個回答

six

報錯一般看第一行
proc_open函數被php.ini禁用了,到 php.ini 里吧disable_function一行注釋掉試下吧

  • 暫無評論
hedada

謝謝,已經解決了。

  • 暫無評論
年代過于久遠,無法發(fā)表回答
??