nginx + Xdebug + PhpStorm = 404 error? - nginx

The last few days, I've successfully installed and set up Xdebug and PhpStorm to work properly with several remote servers at my new job. However, one server is giving me problems and I'm not sure what I'm doing wrong. The difference between this server and the others is that this is the only one running nginx instead of Apache.
Normally I SSH in to the server, get everything set up on that side, then follow steps in the PhpStorm menu, starting with the validation. This is where the problem is. When I try to validate, I receive the following:
Here are my PHP settings:
I'm not too knowledgeable about Linux just yet so it's possible that I'm missing something stupid, but at the moment I'm very perplexed. I'm able to upload/modify files with PhpStorm so it's not like the program isn't able to get in at all, it's only with the validation and xdebug.
If there's some data you need me to show, let me know and I'll add it when I get back in on Monday.

Related

Next.jsā€”unable to set up proxy

I am trying to make a blog using Storyblok(v2) and Next.js(v13). I've gone through this exact tutorial before, and I was able to get the proxy up and running multiple times. Here is the tutorial for the blog, and here is what I've been using to set up my proxy (on macOS).
The last time that I went through this tutorial, I was using the same versions of Storyblok and Next. I have no problem at all running those commands re: setting up the proxy, and my terminal does say that it's up and running, https://localhost:3010 -> http://localhost:3000.
When I visit both https://localhost:3010 and http://localhost:3000, I get Error: {"message":{}, "status":401, "response":"Unauthorized"}.
Before I created the proxy, everything was working as expected, so I believe that the errors are definitely related to the proxy. Any ideas on what I might be doing wrong here?

ACORE API, assistance with errors and deployment

I'm having trouble with setting up ACORE API's and then having them work on a website.
Background:
Azerothcore running 3.3.5 on a debian standalone server, this has the Database, Core files and runs both the world and auth server basically a standard setup that is shown in the how-to wiki.
I also have a standalone web server, on the same subnet, but it's a separate server running linux and normal web server stuff, this has a wordpress installation with azerothcore plugin for user signup etc.
I'm trying to add the player map (https://github.com/azerothcore/playermap) and the ACORE-API set of functions (server status, arenastats, BG que and wow statistics) (https://github.com/azerothcore/acore-api)
Problem:
I understand the acore-api must be run in a container (docker or whatever) on the server, which I have done and it binds to port 3000, I can then go to the local ip:3000 and it brings up this error. (all db's etc are connecting and soap is working)
error 404 when navigating to IP:3000
I do get a few errors when running NPM install seen here: I'm not sure if they would be causing any issues or not.
screenshot of NPM errors on install
But further that, when I put say 'serverstatus' on the webserver (separate server) and configure the config.ts file I can't seem to get anything to display.
I'm not sure what I'm doing wrong but is the same scenario for all of the different functions for the acore-api
How are these meant to be installed and function? I feel I'm missing a vital step.
Likewise, with PLAYERMAP I have edited the comm_conf.php and set the realmd_id, but when loading the page, I do get the map, but the uptime is missing and no players are shown?
Could someone assist if possible?
Seems like an issue with NodeJS version. Update your NodeJS to latest LTS version 16.13.0 (https://nodejs.org)

xdebug.start_start_with_request=yes WITHOUT error if the debug client is not listening

I used to have the following configuration with Xdebug 2:
xdebug.default_enable=1
Xdebug did not slow down execution when no debug client was listening but when I needed to debug something then I only had to enable the listening in PhpStorm and refresh the page. No browser extension was needed for this. The same applied for debugging CLI applications, it just worked.
I tried to achieve the same with Xdebug 3 with the following configuration:
xdebug.mode=debug
xdebug.start_start_with_request=yes
It works the same BUT every time when I disable debug listening in PhpStorm and run a CLI command I get the following message with error severity:
Xdebug: [Step Debug] Could not connect to debugging client. Tried: 172.17.0.1:9003 (through xdebug.client_host/xdebug.client_port) :-(
This is something that I could live with but it also makes PHPUnit tests fails beStrictAboutOutputDuringTests="true" is enabled.
The upgrade guide suggest to use xdebug.module=develop if I used xdebug.default_enable=1 but that is not a valid replacement.
Completely silencing ALL Xdebug logs or even disabling error reporting in PHP suggested by this comment looks a dirty hack to me with possible drawbacks instead of a valid solution.
How can I keep the expected behavior without this message?
Xdebug 3 now warns when it is instructed (through xdebug.start_with_request=1 or with a COOKIE, or GET parameter) and it can not connect to your IDE. Previously a lot of people were having issue with getting Xdebug to work, and having this warning is really useful to them to point out that something is going wrong.
The correct way of not showing an error message is to not instruct Xdebug to make a connection to your IDE at all.
I recommend to use xdebug.start_with_request=trigger and then use either a browser extension as a trigger (https://xdebug.org/docs/step_debug#browser-extensions), or by exporting export XDEBUG_SESSION=yourname on the command line.
Setting xdebug.log_level=0 means you hide all warnings and errors, which makes it impossible to debug anything. Don't do that.
thanks for sharing your thoughts about this Derick.
Setting xdebug.log_level=0 means you hide all warnings and errors, which makes it impossible to debug anything. Don't do that.
I do not want to do this at all, but currently I do not see an another way around to keep the old behavior as I explained in the issue description.
Previously a lot of people were having issue with getting Xdebug to work, and having this warning is really useful to them to point out that something is going wrong.
I totally understand the motivation behind this new behavior and I also see it could be useful for many people. Although, the fact that this warning cannot be suppressed can cause problems to those who knows what they are doing.
Well, "what they are doing" is maybe an inappropriate phrase, what they want is probably better...
We had a workflow in our company with xDebug 2 that did not require any additional browser extension or environment variable (see above), just the listening to xDebug connection had to be enabled in the IDE and magic... It is a documented solutation and our Docker based developer stack made sure that xDebug worked OOTB for every developer. (Again, without any additional dependency)
Are you suggesting that this workflow is not supported anymore in xDebug 3?
Is there any chance to add a new configuration to xDebug 3 that would allow suppressing only these new warnings and enabling "expert mode"?

HTTP command not giving me forwarding URLs

Trying to use *grok to test out retrieving web hook requests from a third-party vendor, but when I try to use:
ngrok http 5001
I do not even get any UI response from ngrok. I have checked around this site, and other articles, and all of them were getting their forwarding URLs to use.
I tried working with the --log and --log-info arguments, but still nothing outputting in bash.
Okay, I'm on a Windows 10 machine when doing this, and it seems like the Git BASH terminal does not seem to work well. Though, the command prompt did worked well. Perhaps because the file was an .exe might explain it.

Meteor Environment - Blank and Everything Broken

I got to a point where Meteor seemed to just stop working, no HTML would load but the port was open, throwing basic console errors indicating that the most basic parts of the program weren't getting read.
After a lot of troubleshooting (clearing the database, restarting, logging out, using different ports), I just created a new Meteor project and copied and pasted my .html and .js files and the new project worked where the old project didn't.
So, question - how can I troubleshoot this in the future? Something was going on in the Meteor folder because the old and new files were exactly the same.
After a day, the error is happening all the time now and I can't create a single project. I tried uninstalling and reinstalling Meteor with no luck.
Also, the problem seems to be isolated to one port. I can open projects in other ports, but not in 3000.
Why is one port "breaking"? What can I do to fix this?
--Edit--
The HTML and CSS are loading, but in the default port 3000, the console reads
Uncaught ReferenceError: Package is not defined
It shows this code as the first error point:
/* Imports */
var Meteor = Package.meteor.Meteor;
Below is the Terminal:
--Edit--
So this is embarrassing, it seemed to be a cache problem. I cleared the cache, and I'm assuming it refreshed the .js files and now it works.
If anyone can answer why the errors were being thrown in the first place and how to fix besides creating an entirely new project, that would be hugely helpful!
please post your terminal so we have more clues to help you.
You definitely can run other ports, perhaps your port 3000 is used by another program.
Also, never run a meteor app as root.
Run meteor on a high port number. The default is 3000 when you don't give a --port argument. Connect to it via the URL printed in the console - e.g.
meteor --port 3001
http://localhost:3000/.
If you have settings.json then run meteor --settings settings.json

Resources