Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by web541

  1. The phpVMS Admin Center (although it can be skinned), was not made to be. It is using very old (and deprecated) jQuery and AJAX functions which are not compatible with most new templates out there. I have had somewhat success making one in the past, but it takes a huge effort getting around all the bugs and mishaps on every page which is why there aren't any available. Also note that unless you update all the js functions and their interactions, the most current version phpVMS needs is jQuery 1.8.3 (from memory) before things start breaking.

    The easiest thing is to use the default admin skin until phpVMS 7 is fully ready, then that will be much easier to customize.

    • Like 1
  2. Check your browser console. Also, there are a number of jQuery issues with the admin panel, so for instance the version cannot be higher than 1.8.3 because some of the default functions are not supported in later versions (you could change these and update them though, they're in adminfunctions.js from memory).

    I would say this is your problem, so either sort out the jQuery issues or revert back to the default template.

  3. kacars is being updated (so I've heard) when the v7 API becomes fully available. As for the DB, you can't just import your v2 ones into the v7 ones, the structure is completely different. A converter is being made to do the importing for you, but even this isn't completely ready yet. 

    For the templates, they are stored here and for modifying them you should look here and here

    But as flyalaska said, you shouldn't be worrying too much about v7 just yet, there's still a lot that needs to be done before it's production ready.

  4. 1 hour ago, mark1million said:

    I dont know what addons you have nut i have loads of them and custom coded and they will not work, i can run base install no problems but when i start adding addons its all goes to pot.

     

    I have just deployed a new server for testing and working out the new way of phpvms currently in dev, im not going to waste any more time on 5.3, 5.4,  5.5 or 5.6 compatibility, there is just too much work to get it all together.

    Yeah, my installation wasn't overloaded, it only had about 3 modules installed. They will probably cause issues as you stated, I didn't think of that.

  5. 18 minutes ago, shakamonkey88 said:

    Gah, I have this issue and am stuggling to add it to the correct line. Anyone shed any light? My admin/modules/PIREPAdmin/PIREPAdmin.php  seems to not line up with the above answers.

    Are you using 5.5.x? If so, check here

    https://github.com/DavidJClark/phpvms_5.5.x/blob/master/admin/modules/PIREPAdmin/PIREPAdmin.php#L136

    and here

    https://github.com/DavidJClark/phpvms_5.5.x/blob/master/admin/modules/PIREPAdmin/PIREPAdmin.php#L304

    that should do it

  6. 7 hours ago, mark1million said:

    Its not compatible with v7 or 7.1, first change your local config to use mysqli and then you have to debug the rest as you go, some common errors are filing a pirep it errors with no schedule add manually amoungst loads of other issues.

     

    I have not yet been able to run this as a viable option on php v7 or 7.1 I have something running but its far from being an option with all the different addons 

    I disagree, I'm running 5.5.x on a PHP 7.0 dev environment locally and I've only had two issues so far, one being that it requires PHP 5.x.x on install and the other being the reCaptcha class needs to be named __construct instead of the class name as it's deprecated in PHP 7.0+. This was only a base install with a few modules though.

    As for phpvms 2 on PHP 7.0, https://forum.phpvms.net/topic/24500-phpvms-legacy-support-for-php-7/ is about as far as I know for it. Check your folder permissions and error_log file for any further info.

  7. 17 hours ago, thefiercepilot said:

    I'm getting this on requesting for non-US charts:

    
    Warning: Invalid argument supplied for foreach() in /storage/ssd3/285/3946285/public_html/core/templates/aircharts/aircharts_chartslist.php on line 49

    US charts work fine

    Can you give me an ICAO that does this, their supported airports are listed here https://www.aircharts.org/

     

    4 minutes ago, ProAvia said:

    Thank you - works great!

    My basic understanding of the temporary SSL workaround is that it bypasses the SSL check - is that correct?

    Yes it bypasses SSL verification only for the charts, haven't figured out a way to use file_get_contents with SSL correctly (cURL could work). This is something I've never seen before. It's possible that their API doesn't support secure connections as of yet (hence why it says "Your connection is not private" when visiting their API)

    • Like 1
  8. 6 hours ago, ProAvia said:

    This module was working perfectly a week or two ago. Today I am getting the following errors when attempting to access an airport that AirCharts supplies charts for.

    
    Warning: file_get_contents(): Peer certificate CN=`nameitcreateit.com' did not match expected CN=`api.aircharts.org' in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40
    
    Warning: file_get_contents(): Failed to enable crypto in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40
    
    Warning: file_get_contents(http://api.aircharts.org/Airport/KLAS.json): failed to open stream: operation failed in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40

    Line 40 reads:

    
    		$obj = json_decode(file_get_contents($apiurl), true);

    It looks like the AirCharts site has the ability to use 'https' instead of 'http'. I tried changing the 'http' entries to 'https' in .../modules/Aircharts/Aircharts.php and received the same error.

    Also, looks like version 2 of the API was released (https://api.aircharts.org/). I tried changing the 3 $apiurl lines (17, 28, 39) in Aircharts.php to reflect this change and continued to receive the same error.

    The only item on my site that changed is we added SSL (https). But after getting that all set up, everything (including AirCharts) worked fine - until today.

    Any help is much appreciated.

    Go to the github link above and re-download the module, I have updated it to the API Version 2 and also have a workaround for the SSL Issue (temporary). It should work now.

    • Like 1
  9. For phpvms 5.5.x, go into core/modules/Pilots/Pilot.php and find this

    	public function index()
    	{
    		// Get all of our hubs, and list pilots by hub
    		$allhubs = OperationsData::GetAllHubs();
    		
    		if(!$allhubs) $allhubs = array();
    		
    		foreach($allhubs as $hub)
    		{
    			$this->set('title', $hub->name);
    			$this->set('icao', $hub->icao);
    			
                $pilot_list = PilotData::findPilots(array('p.hub'=>$hub->icao));
    			$this->set('allpilots', $pilot_list); # deprecated
                $this->set('pilot_list', $pilot_list);
    								
    			$this->render('pilots_list.tpl');
    		}
    		
    		$nohub = PilotData::findPilots(array('p.hub'=>''));
    		if(!$nohub) {
    			return;
    		}
    		
    		$this->set('title', 'No Hub');
    		$this->set('icao', '');
    		$this->set('allpilots', $nohub); # deprecated
            $this->set('pilot_list', $nohub);
    		$this->render('pilots_list.tpl');
    	}

    And replace it with this

    	public function index()
    	{
    		$allpilots = PilotData::getAllPilots();
    		$this->set('allpilots', $allpilots); # deprecated
            $this->set('pilot_list', $allpilots);
    		$this->render('pilots_list.tpl');
    	}

    Provided you haven't heavily modified the pilots_list.tpl/.php file, it should work.

    NOTE: This takes into account the nature of the post, to give a pilots list of every pilot in the database and order them by pilot id not by hub.

    If you want the default then do what shakamonkey88 said and go to the github repo and download the default file again.

  10. If you do want to fix this, you could try going into core/common/RSSFeed.class.php and replace this on line 23

    public function RSSFeed($title = '', $url = '', $description = '') {

    With this

    public function __construct($title = '', $url = '', $description = '') {

    PHP >= 7.0 has this deprecated (and phpvms 5.5.x was not made for 7.0 yet).

  11. I think some of the instructions there are a bit confusing for you.

    If you are installing it onto the same hosting as your phpvms installation, you may need to change the public_html with another folder just to make sure you don't stuff up that installation accidentally.

    Go to your files where it has the folder called public_html (should be a bunch there which you wouldn't normally touch).

    Create a folder here called phpvms (this is the name of the folder you will need to use when modifying the directories, make sure this is NOT in the same folder as public_html, but in its own folder above it).

    Now your folder structure should look like this

    home/.....
    	public_html
    	phpvms
    	...

    Inside the phpvms folder, upload the downloaded zip folder except for the public folder

    Still inside the phpvms folder, go into bootstrap/app.php and edit these lines

    $app->bind('path.public', function () {
        return __DIR__.'/../public';
    });

    to this

    $app->bind('path.public', function () {
        # This line needs to change to the folder the index.php lives in
        # Will be made as an option, so it doesn't get overwritten
        return __DIR__.'/../../public_html';
    });

    Now go into the public_html folder and upload only the public folder's contents

    From here, open index.php and find this line

    $path_to_phpvms_folder = __DIR__.'/../';

    Change it to this

    # Change line 13:
    $path_to_phpvms_folder = __DIR__.'/../phpvms/';

    And it should work with Nabeel's instructions (make sure that your folder permissions are set correctly and that your directory structure is the same as above). Using this method, a symlink to the storage directory may be needed.

     

    EDIT: Just saw Nabeel's last post, he'll be able to help.

  12. See if this works

    Find this on line 37

    <?php
    foreach($pireps as $pirep)
    {

    Replace it with this (deprecated function, but it works)

    <?php
    foreach($pireps as $pirep)
    {
    $schedule = SchedulesData::getScheduleByFlight($pirep->code, $pirep->flightnum);

    Find this

    <strong>Flight Time: </strong><?php echo $pirep->flighttime; ?> <br />

    Now the $schedule variable should be activated, so you should be able to read it like this

    <strong>Actual Flight Time: </strong><?php echo $pirep->flighttime; ?> <br />
    <strong>Scheduled Flight Time: </strong><?php echo $schedule->flighttime; ?> <br />
    <strong>Scheduled Aircraft: </strong><?php echo $schedule->aircraft; ?> <br />
    <strong>Scheduled Flight Level: </strong><?php echo $schedule->flightlevel; ?> <br />

     

    • Like 1
    • Thanks 2
  13. Try this

    <script type="text/javascript">
    <?php
    $allhubs = OperationsData::getAllHubs();
    foreach($allhubs as $hub) {
    ?>
    
    var hubLatLng = {lat: <?php echo $hub->lat; ?>, lng: <?php echo $hub->lng; ?> };
    
    var marker = new google.maps.Marker({
      position: hubLatLng,
      map: map,
      title: "<?php echo $hub->icao; ?>" + " - " + "<?php echo $hub->name; ?>"
    });
    
    <?php
    }
    ?>
    </script>

    Put it in acarsmap.php at the very end of the file.

    You can't mix javascript and PHP like you have done as it will fail to work.

  14. 4 hours ago, Nabeel said:

    The goal is going to be not requiring SSH. I'm going to have a packaged version that includes the /vendor directory already populated, so that should eliminate the need for running the composer install.

    In terms of needing to point to the phpvms/public directory... I've found that placing phpvms in the same directory as public_html, and then creating a subdomain (e.g, a www subdomain) and pointing it to the phpvms/public directory works. Then you can create a CNAME for the base domain to point to www. I think that should cover the install on a shared host. I'll be asking people to test this out in the alpha version. It is annoying, yes, but all modern frameworks are working this way now. The biggest advantage is security... especially with addons. With the code not being exposed, the chances for any attack are minimal. Luckily there haven't been any (except for a while ago due to a 3rd party library), but there are some that would definitely be vulnerable.

    If you have SSH access, you can create a symlink from public_html to phpvms/public, and then you don't need to worry about any CNAME stuff. One think I need to investigate is if you're able to do this from cPanel.

    If you can't do it from cPanel, you could possibly do it from a PHP script (just looking at their manual) http://php.net/manual/en/function.symlink.php

  15. ah ok I see the issue, you're using bootstrap version 1.4.0a and my module uses 1.3.7 (I think) so you would have to convert the templating over.

    First, change the links above back to what they were (only the js one, leave the css one out).

    Once the HTML shows back up, report back here.

  16. On 13/11/2017 at 5:30 PM, ncd200 said:

    In search_results.php, try removing

    <link rel="stylesheet" href="http://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/css/bootstrap.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    And in layout.php, try replacing this

    <script src="http://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/js/core/libraries/bootstrap.min.js" type="text/javascript"></script>

    With this

    <script type="text/javascript" src="<?php echo SITE_URL; ?>/lib/js/bootstrap.js"></script>

    and see what happens. From what I can see, it's a bootstrap conflict issue.

×
×
  • Create New...