paintballrefjosh / MaNGOSWebV4

This is a continuation of the MaNGOSWebV3 project.
GNU General Public License v3.0
32 stars 48 forks source link

Shop bugs. #61

Closed Kageknight closed 6 years ago

Kageknight commented 6 years ago

As per with every release of this site ever made, the shop system still doesn't work.

Using SOAP, I get this error.

Sending Items, Please wait... Fatal error: Class 'SoapClient' not found in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 357

Using RA, I get this error. Warning: fopen(core/logs/RA_Debug.log): failed to open stream: No such file or directory in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 195 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 198 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 198 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 198 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 198 Warning: fclose() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 200

paintballrefjosh commented 6 years ago

I have tested RA and it does work. Try creating the directory c:\xampp\htdocs\testsite\core\logs and ensure your webserver has write access to it. Then try again and see if that helps. The logging is done suboptimally and I plan to change it soon.

Kageknight commented 6 years ago

I just set it to use Telnet instead of SOAP, I opened the 3443 port and made the change in my server config and tried it again. Now I just get this...

Sending Items, Please wait... Please contact an administrator as there is an error connecting or authenticating with the server. You will NOT be charged Web Points at this time

The log file says:


Ra Debugging Log for date: 2017-11-12 00:54:19 Connection to MyExternalIP @ 3443 Failed!


I rebooted all three of my realms and my logon server, now I just get this error on the site and nothing displaying in the logs...

Sending Items, Please wait... Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 72

paintballrefjosh commented 6 years ago

Ok have you tried to telnet to your external IP on port 3443 remotely with the proper username and password to verify it's working?

Kageknight commented 6 years ago

I don't know how to do that.

Kageknight commented 6 years ago

A friend of mine and I figured out how to check. Running CMD and using telnet I was able to pull a list of the accounts commands but, beyond that I don't know what to do.

paintballrefjosh commented 6 years ago

Ok and it connected just fine then I assume? As long as you have the server RA config setup properly then it should work with MWE. Is it behind a firewall or somehow going the wrong direction on your network?

Kageknight commented 6 years ago

I've disabled the windows firewall (as it's the only one I have at the moment) and I've disabled all my PC security software to try it and it still gives the same errors as before.

My worldserver.conf file for my WoW realm is set to use RA. I have opened port 3443. I have it bound to 0.0.0.0 to bind to all addresses on the LAN. I have my realm in the database set to my external IP as per the need of making the server public. I've even tried making my external the mask of my domain name. Nothing I try works.

paintballrefjosh commented 6 years ago

Ok this is most likely the reason it's not working. Your internet firewall won't let traffic go out, and then right back in. Temporarily to test it you could change the server IP to the local one and see if it works for you. I worked around it on my servers using DNS but I'm not sure if that's an option for you or not.

Kageknight commented 6 years ago

I set one of my realms to 127.0.0.1 and ran it like that and I get this error.

Sending Items, Please wait... Notice: Undefined index: char in C:\xampp\htdocs\testsite\inc\shop\shop.checkout.php on line 93 Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\testsite\core\SDL\class.rasocket.php on line 72

paintballrefjosh commented 6 years ago

I just double checked buying some gold on my test system here and it worked fine. Did you select a character name during the process or was the dropdown blank?

paintballrefjosh commented 6 years ago

image

paintballrefjosh commented 6 years ago

Ok I just tried it on an account with no characters and I got the same error as you. So it appears some logic needs to be added to disable completing the order if no characters are available:

image

results in this:

image

Kageknight commented 6 years ago

I ensured there was a character on the server. If the drop down was blank, then obvious it would return an error as it couldn't send to a character that doesn't exist... But, I made sure to select a character and send, but I still got the errors.

paintballrefjosh commented 6 years ago

Is your webserver publicly available so I could take a look? If so send me the URL and I'll poke around

Kageknight commented 6 years ago

http://www.cybergamingcorp.com/testsite/

Kageknight commented 6 years ago

Email me at "Genesis@cybergamingcorp.com" and tell me the username you register with and I will give you some points to play with on the site.

paintballrefjosh commented 6 years ago

I think I created an account "dev" it timed out I think because you may have not setup a captcha account yet. Can you unlock this account so I can login and add a few web points?

Kageknight commented 6 years ago

Account unlocked and I added 500 points for ya.

paintballrefjosh commented 6 years ago

Ok I'm in but I can't change realms or templates. Wondering if you have setup the basic site info yet? This may have issues with cookies, again another design change I want to make in the future.

image

Kageknight commented 6 years ago

I didn't make your account an admin. However, the cookie my site uses is "MaNGOSWebV4"... That couldn't really be the issue... Could it...?

paintballrefjosh commented 6 years ago

No that's fine, is the site URL and title set to something and not blank?

Kageknight commented 6 years ago

I ran the installer but... Other than that, I didn't really change a whole lot. I added the information for my databases but, that was pretty much it. Oh, and I changed "Web Points" to "CG Coins", but other than that, I didn't really do much else. I don't wanna get anymore involved in this project unless the Shop and Donate systems work because if they don't... I wont be using this site.

Kageknight commented 6 years ago

untitled

paintballrefjosh commented 6 years ago

Try changing site directory to /testsite let's see if that helps anything.

Kageknight commented 6 years ago

Done.

paintballrefjosh commented 6 years ago

Now it's letting me change the realm and template. Give me a few minutes to poke around at the shop.

Kageknight commented 6 years ago

Ay-ay captain

paintballrefjosh commented 6 years ago

Which realm has the remote access configured? And can you create me a character on that realm?

Kageknight commented 6 years ago

All 3 realms are setup to use the RA system. You should be able to create a character of your own... Right? O.o

paintballrefjosh commented 6 years ago

CG-Blizzlike seems to be offline: image

It's the only one I have an account on for some reason. Do your realm servers run on the same system as your web server?

Kageknight commented 6 years ago

Yes, right now the website and WoW server is all being hosted on my own personal PC. I know for a fact that all 3 realms are indeed online though...

Kageknight commented 6 years ago

Also... When you register... Your account is put into the auth database and all 3 realms look for accounts on that same database so your account should work for all 3 realms too...

paintballrefjosh commented 6 years ago

Ok and for the IP of those realms do you have 127.0.0.1 or the public IP? For this test I need the IP of the realms to be 127.0.0.1

Kageknight commented 6 years ago

The change has been made. All three realms have been changed to use 127.0.0.1 instead of my external IP.

paintballrefjosh commented 6 years ago

CG-Blizzlike timed out. Can you paste the output of the core/logs/ra_debug.log just the last 10-20 lines or so is fine.

Kageknight commented 6 years ago

The website just timed out for me too... But yea...

Well, I would but the log file is empty...

paintballrefjosh commented 6 years ago

Ok and you are able to telnet to 127.0.0.1 3443 from your local PC? Do you get something like this:

mangos@cmangos01:~$ telnet 127.0.0.1 3443 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Welcome to Mistvale's Vanilla WoW Server! Username:

Kageknight commented 6 years ago

Yes, that is what I got last time. Also, when I entered the username and password of the account I use for the RA system, it gave me a list of all available commands for that user.

paintballrefjosh commented 6 years ago

Can you snip the RA settings for CG-Blizzlike and paste it here. Something like this:

image

paintballrefjosh commented 6 years ago

Also, by chance, are all the realms listening on different RA ports since they are on the same host?

Kageknight commented 6 years ago

Yes. But, right now I'm just trying to at least get one of the realms to work for this...

untitled

paintballrefjosh commented 6 years ago

Which realm is this for? Did you do something like 3443 for CG-Blizzlike, 3444 for CG-Midrate and 3445 for CG-Funserver? If they are all listening on 3443 then I could see how we are having odd issues. This would need to be set in MWE web interface and also the mangos or similar conf file. Any changes to the conf file requires a restart of the realms.

Kageknight commented 6 years ago

I'm aware of the restarting. Each realm listens on the ports exactly as you guessed however... I just shut down the mid and fun realms until we figure this out.

Kageknight commented 6 years ago

This just showed up in the log.


Ra Debugging Log for date: 2017-11-12 08:35:15

Connection to 127.0.0.1 @ 3443 success! Loging in with account: SYSTEM Authorization return: Username: Authorization Success! Got Command: send money Kai "From the shop system" "Thank you for your purchase. Here are your items you have purchased via CG Coins" 10000 Server Response:


However, it's still timing out on my end. o.O

paintballrefjosh commented 6 years ago

Yep I noticed the same. Maybe because Kai doesn't actually exist for me. What core are you running? Mangos, Cmangos, Trinity, etc?

Kageknight commented 6 years ago

Trinity.

I checked the database and the character "Kai" is a match to your accounts user ID...

paintballrefjosh commented 6 years ago

Hmm I didn't create it unless you get a character by default.

Try logging in manually via telnet and then paste this command to see what output you get:

send money kai "From the shop system" "Thank you for your purchase. Here are your items you have purchased via Web Points" 10

Kageknight commented 6 years ago

I've tried 6 times now and it keeps saying connection failed... wtf... This was just connecting a little while ago...

Kageknight commented 6 years ago

Nevermind, I got it...

Using your command, the output returned

Mail sent to Kai TC>

Kageknight commented 6 years ago

I just sent a manual message to my own character and now I'm trying to login to my Blizzlike realm and now I'm getting the "Connected" loop...