php 解决BigBlueButton API - Uncaught TypeError:stream_get_Meta_data():参数#1($stream)必须是资源类型,bool给定

lvjbypge  于 5个月前  发布在  PHP
关注(0)|答案(1)|浏览(53)

我试图通过PHP API连接我的网站与我的BBB服务器。
我用https://mconf.github.io/api-mate/检查了密码和URL,它可以工作。但是当我在服务器上运行代码时,我遇到了这个错误。
我检查了服务器和所有的工作。
错误:Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, bool given in ***\vendor\bigbluebutton\bigbluebutton-api-php\src\BigBlueButton.php:465 Stack trace: #0 ***\vendor\bigbluebutton\bigbluebutton-api-php\src\BigBlueButton.php(465): stream_get_meta_data(false) #1 ***\vendor\bigbluebutton\bigbluebutton-api-php\src\BigBlueButton.php(249): BigBlueButton\BigBlueButton->processXmlResponse('https://bbb.mv-...') #2 ***\cal\cal.php(821): BigBlueButton\BigBlueButton->getMeetings() #3 {main} thrown in ***\vendor\bigbluebutton\bigbluebutton-api-php\src\BigBlueButton.php on line 465
下面是cal.php中的部分代码

putenv("BBB_SECRET=***");
putenv("BBB_SERVER_BASE_URL=https://bbb.***/bigbluebutton/");

$bbb = new BigBlueButton();
$response = $bbb->getMeetings();

if ($response->getReturnCode() == 'SUCCESS') {
   foreach ($response->getRawXml()->meetings->meeting as $meeting) {
  ...

字符串
我从BBB Github复制了代码,没有改变任何东西。
我只是试图添加一个会议,但仍然是相同的错误。
有人能帮帮我吗
谢谢你,谢谢

lfapxunr

lfapxunr1#

我发现了这个问题。php_xml没有初始化。Aufer inizialize pph_xml ist工作得很好。

相关问题