Jump to content

Sim Brief for phpvms


Vangelis

Recommended Posts

  • Administrators
4 hours ago, Paulevans1 said:

Hi im having a problem in which ive not seen after reading through every comment in this thread,

 

I have uploaded all files and changed all relevent information.

when i click the generate SimBrief button i DO  get the pop up and the progress bar does go across. i DONT get any errors. once its completed my page reloads but its just blank?

 

any advice?

 

Using Crew Centre

Tried multiple version of PHP from 5..4 up to 7.4 still the same

 

What version of phpVMS?

What version of PHP?

What version of MySQL or MariaDB?

Do you have a simBrief API key? If so, is it entered in the correct location on your site?

Have you attempted to use simBrief with the default crystal skin?

Link to comment
Share on other sites

  • 7 months later...

Greetings everyone, I have taken all the steps in the read me file and even attempted some of the modifications suggested in the forums. I still continue to get the following errors. Any help would be appreciated. I am running PHP Version 5.6 on a modified version of phpvms 5.5.X. Skin is a modified combination of the Mark Sawn and Stisla Crew Centers.
 

Quote

 

Warning: simplexml_load_file(https://www.simbrief.com/ofp/flightplans/xml/.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /public_html/crew.airboundvirtual.net/core/modules/SimBrief/SimBrief.php on line 12

Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://www.simbrief.com/ofp/flightplans/xml/.xml" in /public_html/crew.airboundvirtual.net/core/modules/SimBrief/SimBrief.php on line 12

 

 

 

Edited by Shadesb181
Link to comment
Share on other sites

  • Administrators

What are the contents of line 12 in the .../modules/SimBrief/SimBrief.php file?

 

What do you mean by a "modified version of phpvms 5.5.x"? What exact version? Look in the lower right corner of the admin panel.

 

What version of MySQL or MariaDB?

Link to comment
Share on other sites

Quote

@ProAvia

What are the contents of line 12 in the .../modules/SimBrief/SimBrief.php file?

 

What do you mean by a "modified version of phpvms 5.5.x"? What exact version? Look in the lower right corner of the admin panel.

 

What version of MySQL or MariaDB?

 

This is the complete code for the SimBrief.php

Quote

<?php

    class SimBrief extends CodonModule
    {


        public function index()
        {


            $url = 'https://www.simbrief.com/ofp/flightplans/xml/'.$this->get->ofp_id.'.xml';
            $xml = simplexml_load_file($url);
            $this->set('info', $xml);
            $this->render('SimBrief/SimBrief.php'); 
            //print_r($xml);
        }
}

 

Line 12 is 

Quote

$xml = simplexml_load_file($url);

 

I am running simpilot phpvms 5.5.2 and a MySQL Server version: 5.7.33-cll-lve - MySQL Community Server - (GPL). When I say modified version I am referring to skins and modules, not the platforms themselves.

Link to comment
Share on other sites

  • Administrators

Be sure url_fopen is set to ON in php.

 

Seems the XML file is unable to load/import.

 

Did you customize any portion of the simBrief addon? If so, revert to default. Or maybe try when using the default "crystal" skin.

 

One other thing it may be.... check your Windows regional settings are set to "en-US" and that your decimal separator is set to a period and not a comma. simBrief uses a period and will error if a comma is used - even if region is en-US.

 

 

Link to comment
Share on other sites

On 9/28/2021 at 8:21 PM, ProAvia said:

Be sure url_fopen is set to ON in php.

 

Seems the XML file is unable to load/import.

 

Did you customize any portion of the simBrief addon? If so, revert to default. Or maybe try when using the default "crystal" skin.

 

One other thing it may be.... check your Windows regional settings are set to "en-US" and that your decimal separator is set to a period and not a comma. simBrief uses a period and will error if a comma is used - even if region is en-US.

 

 

 

@ProAviasorry on the delay, and thanks for the continued support. I can confirm that url_fopen is on. I am also using the all default files for the SimBrief module pulled directly from GitHub. Added by credentials and website as directed of course. I also attempted your suggestion and changed to crystal theme. Same result.

Link to comment
Share on other sites

@ProAviaI thought I should share the full error log when the .../SimBrief page is loaded.

 

Quote

 

[03-Oct-2021 01:52:12 UTC] PHP Warning: simplexml_load_file(https://www.simbrief.com/ofp/flightplans/xml/.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /public_html/crew.airboundvirtual.net/core/modules/SimBrief/SimBrief.php on line 12

 

[03-Oct-2021 01:52:12 UTC] PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity &quot;https://www.simbrief.com/ofp/flightplans/xml/.xml&quot; in /public_html/crew.airboundvirtual.net/core/modules/SimBrief/SimBrief.php on line 12

 

[03-Oct-2021 01:52:12 UTC] PHP Warning: Invalid argument supplied for foreach() in /public_html/crew.airboundvirtual.net/core/templates/SimBrief/SimBrief.php on line 27

 

[03-Oct-2021 01:52:12 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character' in /public_html/crew.airboundvirtual.net/core/templates/SimBrief/SimBrief.php:64 Stack trace: #0

 

/public_html/crew.airboundvirtual.net/core/templates/SimBrief/SimBrief.php(64): DateTime->__construct('@') #1

 

/public_html/crew.airboundvirtual.net/core/classes/TemplateSet.class.php(238): include('/home/hhn5rom3k...') #2

 

/public_html/crew.airboundvirtual.net/core/classes/TemplateSet.class.php(181): TemplateSet->getTemplate('SimBrief/SimBri...', false, true, false) #3

 

/public_html/crew.airboundvirtual.net/core/classes/Template.class.php(82): TemplateSet->showTemplate('SimBrief/SimBri...') #4

 

/public_html/crew.airboundvirtual.net/core/classes/CodonModule.class.php(92): Template::show('SimBrief/SimBri...') #5

 

/public_html/crew.airboundvirtual.net/core/ in /home/hhn5rom3k2gz/public_html/crew.airboundvirtual.net/core/templates/SimBrief/SimBrief.php on line 64

 

 

I am guessing the template errors are a result of the XLM files not loading. On a side note, all other modules load up just fine. SimBrief is the only troublesome one at the moment.

Edited by RedKingOne
Link to comment
Share on other sites

On 10/3/2021 at 2:20 AM, Vangelis said:

What is your website address? i can have a look at it 

Hey @Vangelis thanks for the help. You can access my crew center at http://crew.airboundvirtual.net using the following credentials.

 

User: demo@airboundvirtual.net

Pass: ABC123

 

I haven't linked the simbrief page yet. You will need to add the .../SimBrief manually.

Edited by RedKingOne
Link to comment
Share on other sites

  • Administrators

I am pretty sure you are seeing that error because you haven't fully integrated simBrief into your website. I believe the error is that it isn't getting the flight info from your site to actually populate the form and be able to send the flight data to simBrief.

 

You may wish to check the installation details of the simBrief module again. There was also an addition download that helped with integration - maybe this one...

https://github.com/andyhughes73/phpvms-simbrief-options-form

Link to comment
Share on other sites

  • 6 months later...
  • Administrators
10 hours ago, simtom said:

@VangelisI tried downloading the addon from the website linked, but I get a 404. Any possibility to download it from anywhere else?

 

 

I see you also posted in the Discord phpVMS v7 channel about simBrief.

The module here will NOT work with phpVMS v7.

 

Be aware, there are several different versions of phpVMS. This addon module will work in phpVMS 5.5.2 (and 5.5.2.72 with a small modification) and may also work in phpVMS v2.x.

 

phpVMS v7 is a totally new program. Modules written for previous versions will NOTwork in phpVMS v7. And simBrief is already integrated into phpVMS v7 - for flights that are listed in the DB. If you want to use it for other flights in v7, you either need to use it as a stand-alone or write your own module to integrate it.

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, ProAvia said:

If you want to use it for other flights in v7, you either need to use it as a stand-alone

 

Where can I find that stand-alone version? Our plan is to have SB capability for free flights as well (since we're not planning on adding many routes ourselves).

Link to comment
Share on other sites

  • 3 months later...

Good morning, I have a website with phpvms 5.5.2 with stislaskin skin and I put the simbrief module and configure the api key and the parameters in simbrief in the lib/js folder, but it happens that when I click on generate OFP the popup loads. up of the simbrief but it tells me that missing parameters and the loading bar of the simbrief is red, can someone guide me to solve this?

 

error.JPG

Edited by ariel8407
Link to comment
Share on other sites

  • Administrators
1 hour ago, ariel8407 said:

Good morning, I have a website with phpvms 5.5.2 with stislaskin skin and I put the simbrief module and configure the api key and the parameters in simbrief in the lib/js folder, but it happens that when I click on generate OFP the popup loads. up of the simbrief but it tells me that missing parameters and the loading bar of the simbrief is red, can someone guide me to solve this?

 

error.JPG

 

Sounds like something is wrong with your install. Some required parameters aren't being passed to SB.

Change back to the default skin - be sure SB module is installed in core or for the crystal skin -and try again. This will determine if SB is working or not. From there, you will know whether its in the Stisla skin or with the SB module itself.

Link to comment
Share on other sites

  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...