Portal Home > Knowledgebase > Articles Database > js and vpn network setup


js and vpn network setup




Posted by durangod, 09-28-2014, 09:15 AM
This one is a doozy folks... I have a client that got one of my mods, it works fine on every system it has been placed on other than this one system. And i dont understand it but i will try. First we have narrowed it down to the fact that my JS auto function is not working on their system. I know js is userside but i know it has to have something to do with the server side as well. It has to because the js from his system does not work not even for me, but mine works fine. What i mean is that i can run my script here and its fine, he runs it and nothing, i run it on his system from here in the usa and nothing, but yet i have people all over the world that have no issue. I placed some popups in the js to test the process on his side, and no popups occur and he says that he has no blockers. Thats the short of it, now here is the set up and i dont understand it at all. First the domain is vpnfreeway.net, he is french so you will need to translate it, open it with google and they have translate button in the top right corner, its easy. He is a supper young man and a really nice person and would love to take this stress off his back for him. he has apache 2 with whmcs and debianOS and thats it, no cpanel, no whm, nothing like that. And i dont know enough about it to even know how you sell vpn hosting on a system without whm. In very simple terms im guessing he is just selling disk space on a server just plane jane disc space. That might not be it but i dont understand it. Why am i saying all this, because i promised him even though it has nothing to do with my script that i would to help him out and i dont know enough about how he has it set up as i have never dealt personally with that kind of setup to know how and why js is not working as it should due to that system setup. I need a really smart network guy here for sure... The other question is why does js with whmcs work. My script uses a auto js call to reach out to his forum and that is the part that is not working. Would his VPN be able to specifically block local or remote js calls? And how do we address this issue, i want to tackle it for him but i dont know what to tackle lol.. Thanks Last edited by durangod; 09-28-2014 at 09:21 AM.

Posted by DWS2006, 09-28-2014, 10:51 AM
This probably isn't a VPN issue, unless your client uses a VPN to visit his own site or you're using a VPN to view it. The first thing to check is whether or not there's a conflict with Jquery, Bootstrap, or another JS script that's being loaded.

Posted by durangod, 09-28-2014, 11:44 AM
ok thanks, i did tell him about this thread hoping he will sign up and reply. Maybe together we can get it fixed and we can all learn something. That is always positive.

Posted by vpnfreeway, 09-29-2014, 11:13 AM
hi its me... i dont speak good english but i need to explain we sell vpn to user need to unblock TV from other country... yes we dont have or use whm... because for this moment we dont need this. my website is compiled on debian 7 64bit system with apache2 and php and mysql and mysqli that i know the rest i dont know but if i can help... my website is vpnfreeway . net if anything is required to watch... thank you for all

Posted by DWS2006, 09-29-2014, 11:32 AM
Have you tested the JS script in question on a blank page with no additional JS scripts loaded (if this is possible)?

Posted by durangod, 09-29-2014, 11:46 AM
Basically yes, if you mean submit the js directly yes. I made a test form in a new html file, with the exact data as is in the post value. Then i submitted that to the new file and it worked perfectly no issue at all it went thru the whole cycle including another file with the same setup down the process line. So we know the post is leaving, and i know the post is being received. But for some reason the system or maybe as you said jquery from whmcs possibly is not allowing this to execute. here is an sample of what is not executing on his system. I did this setup as a test to see if the echo would work over the js direct call. And i added the single quotes to test (as you can tell im reaching for answers there desperately lol) and i added the alert to test, but the alert goes off when i send the test via my test html manual submit, but the system auto js submit will not work, and i get no alerts when letting the system do the submitting. The real file has just the direct js call with no echo. along with no quote wraps of the js. but either way its not allowing the document.backtowhmcs.submit(); to execute. But this is the only system it is not working on, every other client has 0 issues and runs perfectly.. Last edited by durangod; 09-29-2014 at 11:56 AM.

Posted by DWS2006, 09-29-2014, 12:08 PM
Have you tested the script in Chrome with the console open? Sometimes JS conflicts will be visible there (worth a shot, at any rate). Also, do the successful installs generally run with Jquery loaded? Also, I notice that http://vpnfreeway.net loads jquery not once, but four times (a few different versions are loaded as well). Not sure if that has anything to do with the issue at hand, but load efficiency would definitely be improved by loading the library just once. Last edited by DWS2006; 09-29-2014 at 12:19 PM.

Posted by vpnfreeway, 09-29-2014, 12:28 PM
as i see yes it load jquery more than one time i count 4 on header i put here code (i dont know where is last version and good version too). {literal}

Posted by durangod, 09-29-2014, 12:40 PM
from what i have experienced in the past its not the first time these have conflicted with other items, i see topics in forums all the time about googleapis conflicts and google is known to be a resource bully. so i recommend and DWS2006 do you concur? that we disable all the jquery including as well as the custom theme jquery you have and just leave the jquery for whmcs is all. and then see if you get the popups, if so then we have a winner Do you concur DWS? ps. some of whmcs is funky i have told whmcs before that you dont have to load it with every tpl page, just stick it in the header, but they wont listen and so if you look at the tpl files in whmcs youll see the call in alot of files. I actually removed mine (commented them out) and put it in the header and it works fine. Some of them need it because of whmcs wacky coding at times but for the most part you dont.

Posted by DWS2006, 09-29-2014, 12:43 PM
For WHMcs installs I generally try to stick with the older version included by default (1.7.2 I think). I would start by commenting out versions other than "includes/jscript/jquery.js". If your player stops functioning, then I'd try loading the newer version. @durangod, I agree, the best place to start is by eliminating potential conflicts and reintroducing things one at a time if needed. I hadn't noticed jquery includes within tpl files - goes to look at tpl files Last edited by DWS2006; 09-29-2014 at 12:47 PM.

Posted by vpnfreeway, 09-29-2014, 12:45 PM
i cut the jquery from google api. i will test to create user.

Posted by vpnfreeway, 09-29-2014, 12:49 PM
i cut and try to create new customer account still dont work... need to cut other jquery?

Posted by durangod, 09-29-2014, 12:52 PM
yes please that way we can be 100 percent sure of conflict or not

Posted by DWS2006, 09-29-2014, 12:53 PM
I would try removing these as well: One version of Jquery is really all that should be loaded.

Posted by vpnfreeway, 09-29-2014, 12:55 PM
ok but wich? and wich i less

Posted by durangod, 09-29-2014, 12:58 PM
DWS in specific look at orderforms comparison tpl files almost all of them have it with a few exceptions from what i remember

Posted by vpnfreeway, 09-29-2014, 12:59 PM
done just one stay

Posted by durangod, 09-29-2014, 12:59 PM
vpn all but whmcs and then as DWS says do the lesser version as well

Posted by vpnfreeway, 09-29-2014, 01:03 PM
i test still not workd

Posted by durangod, 09-29-2014, 01:03 PM
test on ie too please i want to be sure its not just one browser

Posted by durangod, 09-29-2014, 01:05 PM
DWS do you use phpbb forum for your stuff as well

Posted by vpnfreeway, 09-29-2014, 01:10 PM
dont workd on ie too

Posted by durangod, 09-29-2014, 01:11 PM
are you sure your popup blocker is off

Posted by durangod, 09-29-2014, 01:14 PM
i am seeing this too could it be that the js itself is failing and so all js is not working

Posted by durangod, 09-29-2014, 01:18 PM
vpnfreeway . net/eclients/templates/RackHost/css/bootstrap.css bootstrap could also be a conflict, its another one that has a interesting reputation.

Posted by DWS2006, 09-29-2014, 02:46 PM
I don't run any forums at the moment. Like you said it could be a conflict with any of the JS scripts loaded (bootstrap or even one of WHMcs's JS files). I'm sure you've already tried this, but if you haven't, I would try stepping through the entire process with the java console open - hopefully you'll catch the error as it occurs.

Posted by durangod, 09-29-2014, 03:11 PM
Yes but i was not looking for conflicts with jquery, as i have only experienced jquery conflicts with other jquery but not with the way im using js. So now that i know alittle more about what to look for i will do that. Thanks DWS i really appreciate that. If that does not work ill just do the right thing and give him his money back and say well i guess it was just one of those anomaly's we hear about. I was just asking DWS about the forum as i was going to shoot you free copy for your help. Thanks so much again. You deserve a gold star by your name. @ VPN i still need to finish this current project im working on but prob on wednesday if that is ok i can run thru it and see if can see anything.

Posted by vpnfreeway, 09-30-2014, 02:03 AM
its ok for me im patient. i dont have popup blocker on IE and even if i have the popup blocker say one or more popup has been blocked... so that i will know. yes i have 2 error on my website i try to unblock them but still not worked... i can put code here if you want to try and have idea... but that i know i use javascript on my website for other process as you can see it and they work why this module still dont work?

Posted by vpnfreeway, 11-04-2014, 01:14 PM
hi are you here?

Posted by durangod, 11-09-2014, 02:09 AM
DWS i just didnt want anyone to think that i abandoned him, i have not. So i thought i would reply, i sent you a PM as to why i have not replied up until now. Out of many installs we have only had 2 issues and this is one of them. The other is a smart server person who figured out it was the mod_security rules (which he did some of his own from my understanding) that were intereferring with the js. Now my script works perfectly on his system. He did tell me that the solution should also help my other client and that he will have a report back to me soon on the issue so i can help vpnfreeway here. I could probably take a couple of stabs in the dark about what exacty it might be in MS but i will wait for the report. VPN i sent you a email letting you know this as well and i will be in touch asap. So now im on the edge of my seat



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
BurstNET as usual? (Views: 813)

Language: