phpbigbluebutton

BigBlueButton Api - Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, bool given


I was trying to connect my website with my BBB Server over the PHP Api.

I checked the secret and the url with https://mconf.github.io/api-mate/ and it works. But when i run the code on my Server I have this error.

I checked the Server and all works.

Here is the error: 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

Here is the Part of Code in the 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) {
  ...

I copied the code from the BBB Github and changes nothing

I just tried to add a Meeting programatically but is still the same error.

Can someone help me?


Solution

  • I have found the issue. php_xml was not inizialized. After inizialize php_xml it works great.