-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] $args returning null #2
Comments
ok let's take one at a time and see where we get: the message "Empty argument!" is because you need to run a command such as "/ws test test1 test2" from the minecraft server. <?php
global $CONFIG;
$CONFIG['checkpass'] = "PutYourPasswordHere";
$CONFIG['hashAlgorithm'] = "sha512";
$json = websend_connect();
// get the command arguments and return them to the console:
$arguments = $_POST['args'];
websend_command('PrintToConsole', 'you sent the arguments: '. implode(",", $arguments)); You can get the full file with this change here: The above change however won't do anything unless you execute the command with arguments on the console of the minecraft server (or as a player). Please try the latest version, this should make debugging this specific issue easier: |
I was always using arguments with the /ws command, but I tried it again anyway with the altered code you suggested. Here are my logs: PHP
Minecraft
The password is the same in all Websend files, and the hash is sha512 in all of the files (hash was left as default, I only changed the password, which was copy and pasted to each file). It certainly shouldn't make a difference, but for clarity, I'm using an alphanumeric password with no special characters, and the password is greater than 16 chars in length. N.B. Ignore the time discrepancy, I have a remote hosted Minecraft server which uses a different timezone to the one I'm in. ** Results after updating files from https://github.com/uncovery/Websend/releases/tag/5.1 ** No PHP error. Minecraft
New error sending PHP -> Spigot PHP
|
ok so if the spigot->php does not show errors, is it working now? if not, can you post a " regarding the php->spigot, I have to dive into the debug on the websend side there. Since I only took over the project from someone else, and it works for me, I never looked at that in detail. Will let you know if I find some code to improve. |
Spigot->php is working now, after updating the files as you suggested. But php->spigot is throwing a
(Obviously with the proper password and host) |
ok, great, then let me check if I can get more debug messages into it. btw I assume that |
No, no spaces |
Ok, please try the new release 5.2 and
|
Minecraft Output
PHP Output ExternalTimeSet.php
Error Log
var_dump($ws)
EDIT: added config.txt contents (if it helps)
|
can you please use the new .php files from the zip that has all the error reporting on and paste those errors here as well? as of now I can only assume that your port is not actually open, maybe iptables or another firewall is blocking it? thanks! |
No other errors are showing. I've double checked that the port is definitely open, but I'll delve into it a bit more and if I get it working then I'll post the solution here. My server is running Linux. |
check this one here to make sure the port is used by websend: |
The $args param is always returning as null.
I get the
[Websend] The server responded to the request with a 2xx code. Assuming request OK. (OK)
message on my Minecraft server console, but theEmpty argument! Don't just call ws/websend, add more arguments.
string on the minecraft.php URL, and aFailed to connect
error when trying to go PHP -> Spigot using the ExternalTimeSet.php test script.Spigot seems to be reading the php page because any additional input I put on the page is included on the Minecraft console log, but my website is, seemingly, not receiving or sending data.
Any ideas?
EDIT: I'm using an additional port on my Minecraft server which is definitely open, and the php script is using the open port. Minecraft version: Paper 1.16.2. Websend version: 5.0.
The text was updated successfully, but these errors were encountered: