Jump to content

Random IP addresses being blocked


nicky9499

Recommended Posts

G'day gents,

 

The past couple of weeks I have had multiple pilots report that they are receiving "500, server error" pages when trying to access phpvms v7.

I have checked multiple times with my web host and they are absolutely positive nobody is being blocked.

They have even tried to explicitly whitelist the IPv4 addresses of the users facing this problem, to no avail.

 

A workaround we have found is for these users to request a new IP address from their ISP or another connection (eg. mobile data or VPN).

However these options are not always available or possible for everyone.

Those that cannot change their IP address cannot access the pilot center and thus cannot fly.

Obviously, we have already asked them to try the usual "clear cache clear cookies try another browser".

 

They can access our main website fine (www.singaporevirtualairlines.org) but not v7 (beta.singaporevirtualairlines.org)

This seems like a phpvms-related issue. Can someone advise please, either a fix or diagnosis to find out more about this error.

 

Thank you.

 

photo_2022-01-08_23-16-54.jpg

Edited by nicky9499
Link to comment
Share on other sites

What does the actual error says @nicky9499 

 

Would you mind checking your laravel logs and provide error details instead of that useless "500 | Server Error" image/screenshot.

 

https://docs.phpvms.net/help

 

https://docs.phpvms.net/help#information-required

 

https://docs.phpvms.net/help#logs

 

Many times (maybe more than 1000 times) we wrote/told/explained that without error details, no one can help you :(

Edited by DisposableHero
Link to comment
Share on other sites

My apologies DH, thank you for pointing me in the direction to look for more information.

I appear to have been mistaken about the installed version. Below is what's listed in admin panel.

 

phpVMS version: 7.0.0-dev

However, the local files that I uploaded are from an archive named phpvms-7.0.0-beta.3.zip.

 

cPanel Version: 100.0 (build 7)

Apache Version: 2.4.52

PHP Version: 7.4.27

MySQL Version: 10.3.32-MariaDB

Architecturex86_64

Operating System: linux

Shared IP Address: 107.6.161.162

Perl Version: 5.16.3

Kernel Version: 3.10.0-962.3.2.lve1.5.49.el7.x86_64

 

 

Repro: Random, certain IP addresses are blocked, user sees error 500.

Screenshot: Attached to opening post.

Hosting: Shared (mid-tier, GreenGeeks EcoSite Pro)

 

Laravel logs:

https://drive.google.com/file/d/197bAj1NkkLZNgRQ38KyFIsOuVxSZO5QV/view?usp=sharing

cPanel error log:

https://pastebin.com/gXs9Bwp6

No recent suEXEC events exist for your domain: singaporevirtualairlines.org

 

The remaining stuff (apache and export data) are a litle out of my depth.

Please let me know if more information is needed and I will work on those.

Link to comment
Share on other sites

Hi @nicky9499

 

However, the local files that I uploaded are from an archive named phpvms-7.0.0-beta.3.zip.

 

This is a really clear indication that you are using beta.3 :( Which is really not good 'cause lots of things changed since that file is released for download. I mean, we call beta.4 old and it is marked by the developer himself  as "DO NOT USE", so you are using something older. If you have uploaded something different while using v7, that file may be misleading.

 

What we can do now is, checking some changes visually maybe and try being sure about the version you have.

 

1. Go to admin side, left side at the bottom you will see "version 7.0.0-dev" text, clicking on it opens up a popup with the full version.

2. While you are at admin, please check if you have "addons/modules" and "type ratings" links under config section

 

admin_check.thumb.png.056e1dbf2b6ce3712431f670c18a8590.png

 

According to your laravel log, you are using vmsAcars and up to my knowledge it is not compatible with beta.3 or beta.4 fully. So you may be using a much newer version than you imagine (or worst you are trying to use something not designed for beta.3/4 at all)

 

Again according to your logs, you are using an old version of Disposable Theme (v2), beside this info you have some errors about your ranks which is recorded.

 

[2022-01-24 16:21:00] production.ERROR: Trying to get property 'image_url' of non-object 
(View: /home/singap08/public_html/beta/resources/views/layouts/Disposable_v2/users/table.blade.php)

 

That "image_url" comes from the rank of a user, which I assume is deleted somehow and not there anymore. But a user is still at that rank (defined manually maybe or you forgot to fix your user ranks when you edited your ranks etc).

 

You also have other errors with the api interface regarding pirep filing.

 

Again another error regarding users

 

[2022-01-24 14:35:18] production.ERROR: Undefined variable: fielsdsdd 
(View: /home/singap08/public_html/beta/resources/views/layouts/Disposable_v2/users/table.blade.php)

 

This is most probably something you added during editing things 'cause I do not recall using something like "fieldsdsdd" in that file.

 

[2022-01-24 14:36:51] production.ERROR: View [pagination.jjdefault] not found. 
(View: /home/singap08/public_html/beta/resources/views/layouts/Disposable_v2/users/index.blade.php)

 

This is again something not from Disposable Theme v2 "pagination.jjdefault".

 

[2022-01-24 15:01:21] production.ERROR: Method App\Http\Controllers\Frontend\UserController::index does not exist.

 

[2022-01-24 15:09:16] production.ERROR: Call to undefined method Illuminate\Database\Eloquent\Builder::psaginate()

 

[2022-01-24 15:09:49] production.ERROR: syntax error, unexpected 'return' (T_RETURN) 
{"exception":"[object] (ParseError(code: 0): syntax error, unexpected 'return' (T_RETURN) at /home/singap08/public_html/beta/app/Http/Controllers/Frontend/UserController.php:54)

 

[2022-01-24 15:32:37] production.ERROR: Order direction must be "asc" or "desc". 
{"userId":782,"exception":"[object] (InvalidArgumentException(code: 0): Order direction must be \"asc\" or \"desc\". at /home/singap08/public_html/beta/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1984)

 

[2022-01-24 16:23:18] production.ERROR: Method App\Http\Controllers\Frontend\UserController::userRepo does not exist. 
{"userId":782,"exception":"[object] (BadMethodCallException(code: 0): Method App\\Http\\Controllers\\Frontend\\UserController::userRepo does not exist. at /home/singap08/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:68)

 

At this point I literally stopped checking your logs, sorry :(

 

The way you are trying to do changes and edits on a live server while your pilots are flying on it, is not acceptable at all and with all those terrible edits you are trying (even it is not clear what you are trying to do), no one can help you. There are more errors in just one log (from 24th Jan) which you or some other admin is causing, any of them will lead to a 500 | Server Error and none of them are related to a user's ip or an ip block !

 

Same goes for your older logs from 22th and 23th Jan.

 

So in short;

 

Until you fix all those problems you caused (edits, deleted ranks, deleted airlines, missing airports etc) and provide a log with the error you mentioned while opening this topic it will be impossible to find the cause and help you to solve it.

 

A friendly advise;

  • None of my addons are compatible with beta.3/4, including the old theme and modules, they were designed for newer development versions. So to have a better view of what is going on, you can switch to the default theme and see if it works there.

 

Another friendly advise;

  • If you are using a newer development build, I highly suggest using theme v3 and new module pack (instead of the old ones) to get support when needed.

 

Good luck and God speed.

 

Link to comment
Share on other sites

Hello DH,

 

Thank you, sincerely, for your effort in going through some of the logs and the resulting advice.

The pop-up box says, in full, my version is 7.0.0-dev. That is the whole build number. Is this outdated?

I do have "addons/modules" and "type ratings" in the menu.

I just popped by the Downloads section to grab the latest build, which also happens to be in an archive named phpvms-7.0.0-dev.zip

 

What I didn't mention earlier (as it didn't seem significant then) was that our VA recently had a team member suddenly depart without a proper handover. He was the only one working on modifications to the phpVMS/Disposable pilot site right after an upgrade from v5 to v7 which was also pushed through by him even though we were not necessarily fully ready. These errors started happening around the same time he left which coincided with hosting outages, so we initially thought the latter was the cause. Your investigations reveal thus far we may have had placed a little too much trust in his competency and trustworthiness. I'll try to chip away at these faults one at a time and post back for advice on specific issues if necessary.

 

Once again thank you.

 

Edit: so, just to be clear what I'm dealing with here - I have (possibly) the latest version of phpVMS, working alongside vmsACARS which is compatible but also Disposable Theme v2 which is technically incompatible with this build of phpVMS. Hence my first course of action would be to try to upgrade Disposable Theme to v3....?

Edited by nicky9499
Link to comment
Share on other sites

Yeah the latest dev file is always named like that :)

 

http://downloads.phpvms.net/phpvms-7.0.0-dev.zip

 

or

 

http://downloads.phpvms.net/phpvms-7.0.0-dev.tar.gz

 

Both are same, always give you the latest development build.

 

Hope you figure out the problems, and if you are suspecting illegal/unauthorized access to your files or server, control panel etc. first thing is to do is changing all your passwords (hosting control panel, ftp access, database passwords all together at the same time). And be sure only one person knows the latest ones (preferably you), do the updates, see everything working, take a backup from hosting control panel if possible. Then you can consider expanding the access to other users/admins if needed.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, nicky9499 said:

Edit: so, just to be clear what I'm dealing with here - I have (possibly) the latest version of phpVMS, working alongside vmsACARS which is compatible but also Disposable Theme v2 which is technically incompatible with this build of phpVMS. Hence my first course of action would be to try to upgrade Disposable Theme to v3....?

 

Yeah, if you are on a newer latest dev build, you may try installing Disposable Theme v3 directly. At least you will have something working in your hands, of course it will not reflect your va colors or logo images etc but we will be sure that the core theme files are intact and ok. Then you can slowly work on it, by following duplicating procedure (explained in the readme and here at the forum), you can have your own copy of DT v3, edit only the pages you need, have your own stylesheet for coloring etc.

 

All this may be hard on a live server while your pilots are flying on it, but at least it will be better than having lots of errors around.

 

Hope you figure this out, maybe you can send an email to all your pilots or a discord notification to stop flights for one/two hours while you are doing the update, installation of new theme and module pack etc. At least your logs will be clear, server will not be dealing with getting pirep updates / accepting them etc. Or you need to find a good time, maybe when all your pilots are sleeping :) You will be awake and working on the update.

 

It is still not good to do all these on a live server but looks like you have no choice at the moment.

 

If I were in your situation I would probably;

 

1. Stop all flights

2. Switch to default theme

3. Make a database backup

4. Clean cache manually (explained in docs, update section)

5. Update to latest dev build

6. Test if it is ok (with default theme, check every single page it offers)

7. Install Disposable Theme v3 (latest release)

8. Switch to it, check if it is working ok too

9. Have a duplicated theme based on DT v3 (explained in readme and here at forum)

10. Switch to it, check if it is ok too (no edits at this stage)

11. Install Disposable Basic Module v3 (latest release) and test

12. If all is ok, let pilots fly again, slowly work on the duplicated theme to have your va colors, background image etc back, one step at a time.

  • Thanks 1
Link to comment
Share on other sites

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...