-
Posts
769 -
Joined
-
Last visited
-
Days Won
124
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by DisposableHero
-
Schedule Search Broken After Server Migration
DisposableHero replied to OKCPilot's topic in Support Forum
Easier than building up a pagination logic Glad to hear you solved the problem. Safe flights -
Schedule Search Broken After Server Migration
DisposableHero replied to OKCPilot's topic in Support Forum
If the above page is just for searching, then maybe it needs to be re-designed and no results will be shown during initial load. Which will greatly reduce the amount of data loaded there, of course the search criteria should be altered and it should not allow both airports to use the "select all" option. With this trick, user will be forced to either select a departure and see all flights out of that airport (departure = ICAO , arrival = ALL) or he/she can pick an arrival airport and see all incoming flights. Results may need a pagination of course depending on the flights/schedules provided by the VA. If that page is directly loading all flights (like a timetable) and also allowing the user to search, pagination will be the key. Also if possible, you can reduce the initially loaded flights by loading the ones departing out from user's current location by default (this may need a pagination too). They can do a search afterwards. Good luck -
Hi, This is technically not a guide, but an overall explanation of v7 systems related to automation and why CRON is needed etc. What is CRON ? Basically CRON is the name of "Scheduled Tasks" in Linux systems. Imagine it like a person executing tasks in behalf of you, a helper or an automation. Why it is needed and important ? Well, if you want to execute every single script needed for automation then you do not need it, but most of us do not have that much free time, specially we can not be online 24/7 to click some links every single minute or at best every hour. So CRON is important because it does exactly this. It runs some scripts, at minimum every single minute to see if there is something needed to be done. If not it waits and then checks again, again and again without any problems. What will happen if I do not have a working CRON ? To be honest, in the first days you will notice nothing about it. There will be practically no visual clues, no problems, everything will look ok and you will think that your v7 VA is running fine. The truth is, no it is not running fine, it is just piling up some possible problems and they will hit you hard soon. Here is a simple list I can think of related with CRON in v7; Every hour it checks your bids and deletes expired ones Every hour it checks your SimBrief packs and deletes expired + non used ones Every hour it checks your live flights and deletes them if they are stuck/frozen etc Every hour it checks your pilot reports (pireps, flight reports) and delete cancelled/rejected ones Every night it re-calculates the stats of your pilots, corrects them if there is an inconsistency Every night it re-calculates the financial data of your airline(s) and pilots Every night it checks and executes your daily expenses Every night it checks your schedule and activates/deactivates flights for that day/date Every night it checks your pilots to determine if they are still active or not Every month it checks and executes your monthly expenses These were just for the core, also addons/modules may need CRON (for this I can only speak for my addons of course) but you can expect it to be extended easily with new addons/updates; Every hour it checks your fleet, fixes problems about aircraft state, grounds them if they somehow get stuck "in air" or "in use" Every hour it checks your maintenance records, releases aircraft back to service (or keeps them grounded) Every month it executes tasks for monthly flight assignments Also you can extend core CRON usage, for example it can organize sending mails in the background to speed up things and save you from mail server slowdowns etc. And of course it is possible to develop more functions to be handled automatically, image yourself doing database cleanup every week or month, or always executing same things in a timely manner, to automate all these task you need a working cron. Like in my setup, it does more than the list above, I am happy and focused on other things and enjoying flights etc. What is the minimum interval for CRON timing needed ? If it is not hurting your server and if it is allowed (some hosting companies limit this), set it to run every 1 minute or 5 minutes. If not possible use the minimum possible period, maybe 15 minutes or 30 minutes. This will not hurt v7 much, why 'because as you can see above it executes the main tasks mostly with one hour intervals. So what happens if you set your cron to run every single minute. Nothing harmful, it just checks the time and tasks then stops, when it is the correct time then it executes the tasks and then stops again. Same thing will happen if you set it to run every 30 minutes too. Only the checks will be less frequent that's all. BUT, if you are planning to use cron for e-mail scheduling, then this timing becomes more important. Imagine a scenario, you enabled cron for emails (check docs for details) and set it to run every 30 minutes; 10:00 > Cron runs, executes hourly tasks 10:03 > A new pilot registers, mail is placed in the queue and waiting 10:12 > One of your pilots send a pirep, mail is placed in the queue and waiting 10:30 > Cron runs, no hourly tasks available, so it sends the mails only 10:31 > You get mails from your system, go check and approve the pilot and reject the pirep, mails are placed in the queue and waiting 10:48 > Another pilot sends a pirep, mail is placed in the queue and waiting 11:00 > Cron runs, executes hourly tasks and sends the mails 11:02 > You get another pirep notification and so on How can I set the CRON ? This is normally done via the control panel you are using, it may be CPanel or Plesk or something custom. If you can not see anything named like CRON, CRONTAB, Scheduled Task etc in your control panel, please consult your hosting providers documents and/or support. Also you can find an example code at admin > maintenance page, but it is an EXAMPLE, it may or may not work. You can use that example as a starting point or maybe use it while speaking with your hosting support staff. How can I understand my CRON is working or not ? Simple, check your storage/logs folder. If it is working as expected you will have a log file named something like cron-2022-02-08.log , if that file is not there this is an indication of either it is not configured right or it is not working. To get more details now check your laravel logs, if you see something like `production.ERROR: The Process class relies on proc_open, which is not available on your PHP installation.` in the log then this means that the CRON is trying to work but it can not. So the setup is correct, but you are now facing a much bigger problem. Your hosting company is limiting things, you can speak with them for more details, some do help and let you proceed, some will not. *** Update ; With the improvement to development build, now it will be possible to have CRON system working with limiting hosting companies too. Please check the docs about latest changes. *** My hosting provider does not offer CRON, what can I do ? You can use the built in web cron feature of v7, there are lots of free/paid services offering you to run web based crons. If you are getting the error explained above, this solution will not work either, so do not expect miracles. I have hosting related CRON problems, what can I do to solve this ? You can write your own web cron compatible code to bypass your hosting companies limitations, but for this you need to have some php + laravel + v7 knowledge. This is nothing impossible, but it is not easy either. Honestly you are on your own there, but what you need is basically to study the core cron tasks, duplicate and enhance them for your own usage. Or you can find another host, switch to another package/service they provide, switch to VPS or rent your own server, whichever you prefer. Finally; Please remember, v7 will install and work without CRON but you will loose some of its important and really needed abilities and features. Safe flights.
-
When you click a link from a webpage (or from discord etc) if it does not download (instead a new tab appears and immediately closes), this is due to security settings your default browser has. Recently most of the chromium based browsers switched to this new logic (Google Chrome was the first to implement as expected). Anyway, if you want to use that link; A. Either you have to edit your browser's settings (to allow downloads the way you used before) B. Right click that link and choose "Save as.." And for general info (second part of your question), the link to latest development version is just there under the message. So if someone applies the "right click > save as..." trick (or if that someone's browser is already configured) that link works and always give you the latest build
-
Also you can check your laravel log, to see if any errors are being recorded during pirep being sent and gets accepted (at this moment expenses will be considered/calculated by the finance code). There we may find valuable clues about this. Good luck
-
What is the filename ? I think I explained it somewhere before, the filename and the class name should match and this is important Also you should not be using the same class name twice or more, it may cause problems (like it being skipped or worse, erroring out all process and stopping) Filename : HardLanding.php Class Definition : class HardLanding extends Listener class HardLanding extends Listener { public function handle(Expenses $event) { $expenses = []; $amount = 5000; if (abs($event->pirep->landing_rate) < 500) { return $expenses; } $expenses[] = new Expense([ 'type' => ExpenseType::FLIGHT, 'amount' => $amount, 'transaction_group' => 'Hard Landing', 'name' => 'Hard Landing Fee For Pirep='.$event->pirep->id, 'multiplier' => false, 'charge_to_user' => true ]); return $expenses; } } Rest looks ok though.
-
Error: There are no aircraft available for this flight
DisposableHero replied to NEAfly's topic in Support
Why should I take your mistakes or lack of reading capabilities "personal". You should NOT blame something/someone else for your own mistakes and then advise other people to calm down when they point this out kindly. Enjoy your day. -
Error: There are no aircraft available for this flight
DisposableHero replied to NEAfly's topic in Support
Little note ? It says to use latest dev at docs, specially at acars setup section. It says to use latest dev at GitHub where you downloaded the files (and it is not "little", in contrary it is bold and big) Download section here at this forum gives you latest dev. Using git pull and composer gets latest dev (if you want to use that path for installation) Several topics and guides at this forum advises to use latest dev. Yet you install beta.4 and then claim that here is a "little note" I think the problem is not that note's size. Enjoy latest dev and have safe flights -
Nope, if the listener is coded properly it will work. No need to add it to expenses or somewhere else. They are being checked when a pirep's finances are calculated (when it gets accepted and/or when you click recalculate finances button). What I can think of now is; 1. Either the code of the custom expense you developed is wrong (thus being skipped by the core) 2. Or it is fine but the conditions you defined in it is not met, so it is not being applied Hope this info helps
-
Probably you can't fix it 'cause looks like you are having a server side configuration problem. (Considering you followed the docs, defined the subdomain properly and your hosting company meets all requirements like php version + extensions, maria/mysql and apache version etc) The .htaccess and redirections defined in v7 core is ok, but this happens when the server config (either apache/nginx or any variant) is not correct. And by "not correct" I mean they can still work but they may have some custom, non compatible settings which are mostly defined by the hosting company (for some reason we may never know). If you are on a VPS service, you will have full control over your server side settings but in a shared hosting it is hard (almost impossible) to go that deep. Your only solution may be hoping that the hosting provider fixes those settings for you (which is hard 'cause it may effect other users on the same server etc). Hope you can figure out a solution. Good luck and God speed
-
Nice to hear that
-
Hi, Great news, glad to hear that There are only two modules at the moment capable of providing Tours. 1. FsTours Module (search from youtube. Payware) 2. Disposable Extended Pack (check Downloads section of this forum for details. Donationware) Also, some months ago, a user at Discord wrote that he is working on a new module for tours (payware), but we did not see any news or announcements about it after that day Best wishes and safe flights
-
Hello again Anselmo, Sorry I can not work like that for several reasons, if you can change the settings as I advised above and fix the wrong fields, I think it will work. UPDATE aircraft SET airport_id = 'LEMD', hub_id = NULL, mtow = NULL, zfw = NULL, fuel_on_board = NULL; * This query will place all your aircraft to Madrid and clean out other fields. Also, you can run above sql query within your database workbench (phpmyadmin or something similar) if you wish to fix the biggest problem regarding aircraft locations. But you still need to edit your settings, edit your subfleet fuel types and fix your airports. Having 27k airports is ok if you are flying to all of them. If you are not flying to an airport now, then there is no need to have it in your system. phpVms v7 can find/lookup and add airports automatically when needed. In the end it is your server and your system, you can even have 50k airports in that table and see how it effects your overall website performance Note; Fuel On Board field you see at aircraft table is just for display, you can not increase or decrease the fuel amount of an aircraft by changing that value. So editing it is not needed
-
xacars server implementation files
DisposableHero replied to federicoangelino's topic in General Discussions
Does it fully support latest phpvms v7 ? I think it should be the main question here. If it is compatible, you may not need any server side (web) modules for it to work. This depends on how it is working of course, how it handles the va rules, requirements etc. But for reading bid/flight data and sending a pirep back to phpvms, it can just use API calls without needing a web module, so it can work. -
Hi Anselmo, I watched the video You did not showed us the settings (most important part is missing), so it is impossible to understand what is going on or how you changed the settings at admin side, what is restricted, what is allowed etc. Even though from that video, what I see was; 1. Your aircraft data is corrupt, it will cause problems; airport_id (current location) MUST be an ICAO code of an airport , you have 1 hub_id (Aircraft Hub) MUST be an ICAO of an airport, you have 1 mtow MUST be full weight like 78500, you have something like 78 zfw MUST be full weight like 58300, you have something like 25.4 2. Your subfleet data is not good, not bad like the aircraft but it is not ok. fuel_type should be 1 for all those aircraft, they do use JET A1, not 100LL (Avgas) General Aviation fuel. You can remove the cargo and fuel capacities and gross weight, they are not used at all 3. Your airports does not look good, lots of the flags are missing and this happens when your airport data is not compatible with phpvms v7. Most probably your country values are not right to begin with, it will cause problems in future. Specially if you want to keep using Disposable addons. 4. Check admin > config > settings , at pireps section of settings Disable Restrict Aircraft to Ranks Disable Restrict Aircraft by Type Ratings Disable Restrict Aircraft at Departure Also spare some time, read the guides (they are here at the forum) and fix the problems I wrote above. Additional info: You do not need to have 27755 airports in your database, only have what you need for better performance and management. (details are explained in the guides) Good luck and God speed
-
<?php if (Auth::LoggedIn() == true) { ?> <div class="blueIce-block clearfix"> <div class="blueIce-blockheader"> <h3 class="t">Discord</h3> </div> <div class="blueIce-blockcontent" align="center"> <iframe src="https://discord.com/widget?id=937311209793912923&theme=dark" width="240" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe> </div> </div> <?php } ?> Something like this should do the trick.
-
if (Auth::LoggedIn()) { // User is logged in // Do anything you wish here } else { // User is not logged in, probably a quest visitor // Do another thing for quests if you need to } if (Auth::LoggedIn()) { // User is logged in // Do anything you need here } if (Auth::LoggedIn() == true) { // User is logged in // Do anything you need here } if (!Auth::LoggedIn()) { // User is NOT logged in // You can show a note here maybe like "Dear visitor, please Login or Register" } if (Auth::LoggedIn() == false) { // User is NOT logged in // You can show a note here maybe like "Dear visitor, please Login or Register" } Some examples
-
There is only one table which has "transactions" in its name I think it would be the table you are looking for.
-
Well, it really depends... You can have a code of your own, with one input field (to enter the amount) and one type selector (credit/debit) and maybe one dropdown to select the user. And then with the data you entered/selected you can call core code to record the transaction properly. Or (with the form logic explained above) you can have your own code there to insert the record to the database directly (which will be a waste of time to write it all, I would use the core method for this, it is already there). Or if you want, you can play with your database directly, insert either credit or debit records to the correct table with the correct data/format etc. Or you can have a flight, like a welcome test flight, set it to pay a fixed amount (admin > flights > pick one here > edit pilot pay and save). Then force new pilots to fly it only, when you accept their pireps they will be credited that amount. No coding knowledge or database tricks needed. Nice and easy, new pilots get their start up fee and get used to the system by doing a flight Hope it helps, safe flights clear skies.
-
What does the database count shows ? If you are importing 1900 rows without errors there should be 1900 records in your database. Some of them may not be active or visible, this may reduce the total you are getting at frontend. Also if you have 1900 rows in a csv file and if it is not generating a timeout and no errors, then you may have some duplicates in that file itself too. For example you may have the same flight number 10 times with different times and days maybe. This will result an update, so the final count will be 1890 not 1900. Check your database, if not able check admin > flights. You will see all of them there without any limitations and/or restrictions.
-
You are not missing something, it is not implemented (maybe because of the different finance logic used in v7) Only way to alter the amount of money someone has is by creating a transaction record (either credit or debit), directly editing a balance is not possible and this applies to both pilots/members and airlines.
-
It is basic html img tag usage, below link may help https://www.w3schools.com/tags/tag_img.asp If it is in a division or in a table cell, defining the width as percentage may help. Like making it <img src="..." width="90%" height="auto"> or maybe other styling tags can be used instead of pure html ones. In the end, in your example code, phpvms is responsible for providing the image url (src="...") and it works, rest is skinning or html styling. Good luck
-
It is both code and database structure related, unfortunately enough phpvms classic series fails on both Which makes fixes harder. In simple terms; Sending empty strings in sql queries is not possible (and not logical at all) with Strict Mode enabled (a server side setting, can not be disabled at user level and for this reasons hosting companies may simply deny any requests about it). Database structure should be ok for having "null" (empty) values for fields, if that field is not necessary or mandatory. So, what is happening at the moment with @ProAvia's v5.5.2.7.2 (and maybe all other older versions) is, for example when you try to insert a schedule manually; 1. Code (the backend code of phpvms) tries to send empty strings as field values (Not possible with Strict Mode) 2. Database itself is not configured to have "null" (empty) values for non-mandatory fields (Like the notes of a schedule, or the say for example the route or route_details fields) When you fix the code to not pass empty strings as field values, you hit the database side 'cause it waits for a value. Using INSERT IGNORE alone may be a solution as @Strider mentioned, even for long term it can be used. Or both code and database structure needs to be renewed. Of course it will take more time compared to just adding IGNORE to some statements but I think it would be the best way to handle it. https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict (Similar problems arise when MariaDB is being used, it may have different name in settings but it also has a Strict Mode logic pretty much the same others use) And another problem is, even if some crazy men fixes the core code of 5.5.2.7.2, make it compatible with latest php editions and database engines, there is a big risk about the addons around, if their code is not updated (or not properly written in the first place) may stop working and braking va functionality too. Anyway, just for fun and curiosity, I just fixed the manual schedule inserting problems and made 5.5.2.7.2 work with newer php versions but how can we go further I am not sure Considering it is way too old and too customized it may even not worth the effort for a complete overhaul at all.
-
Either you have missing files, a bad install or a bad/faulty server config. Most probably you have missing files (or a folder completely not there at all), mostly happens when you do not follow docs for a proper install. https://docs.phpvms.net/download
- 1 reply
-
- 1
-
-
As an addition to above; Due to their ongoing changes and incompatibilities with other addons, vmsAcars provides a pre-defined aircraft configmap for FBW. Which disables/ignores the light rules to be applied to it and fixes the flap detents reported back to phpvms. https://github.com/phpvms/configmaps/blob/main/FlyByWireA20N.xml For it to work, aircraft title should match the configmap, which is another problem 'cause I see lots of painters and users are releasing their work with strange titles in aircraft.cfg Safe flights