Jump to content

omniowner

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

omniowner's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just an idea.. while($row = mysql_fetch_array($res , MYSQL_ASSOC)) $rowpass=$row['pass']; { //for debug echo "$rowpass"; echo "$pass"; if($rowpass == $pass) {
  2. Why are you using strcmp? Pass the row value into a variable and compare the two?
  3. I just noticed you had it == 0 . So disregard.
  4. You have your strcmp backwards. if (strcmp($pw1, $pw2)) { // This returns false. // $pw1 and $pw2 are NOT the same. } else { // $pw1 and $pw2 are the same. } Try flipping it around and see what happens.
  5. I am using 2 VPS servers. I do not have access to a physical router, nor physical access to either server. I don't know if a router solution is going to help me much unless there is a way I can configure them without having physical access? Not sure as I don't know much about "router switching" (not sure if that is what its called) There is a way to do what I am trying to via Round Robin DNS. However this solution is not the best nor will it work for me in my specific case. Perhaps "load balancing" is something different and now what I am completely trying to do. It's all new to me. My main objective is to allow users to select which server they want to log into. If someone logs into server A, it will bring them to pages on server A, thus using server A's resources. If someone logs into server B, it will bring them pages on server B, thus using server B's resources. The real question is how do I make it if the domain name is the same for both A and B to tell the login script which server to go to? Some kind of connection method? I normally would just tell the login script to go to main.php but since main.php is the same on both server A and server B how will it know which one to choose? example (site.com/main.php on server A and site.com/main.php on server B .. how will it know which one to choose because they address's are identical??) This why I thought sub-domains might work. serverA.site.com/main.php will go to server A and serverb.site.com/main.php will go to server B. Of course, your solution about using a router to determine which one to use would work perfect. Is there a way I can do this remotely? Should I contact my host? Also, from what I know using the same domain on more than one server works fine. Anyone who knows DNS know how to do this? I plan to just add more name servers to the A record with different IPs.. that might work?? Maybe on server B i could do put serverb.site.com - IP address in the arecord and that will work okay? Not entirely sure because I haven't played with it Thanks for the suggestion and any more ideas/help welcome!
  6. Are you trying to sell something online? Are you using Paypal IPN? And cURL may be a solution here for what you are trying to do exactly, but I am not sure. More information on what you are trying to do may help response.
  7. I could be wrong but allowing remote access opens your database up to a much higher security risk. If this is not absolutely necessary I wouldn't go down this path if I were you. Otherwise you should simply be able to change the connection parameters depending on what server needs to be accessed. The server=1 would be using a GET variable to decide which connection parameters to use. The other way you would just be accessing a different page. Thanks for the quick response I am fairly certain that the method I am using to remotely connect to my database on Server A from Server B is secure. However, I will look into it. What I am wondering is how can I make it so that when someone chooses which Server to login to that only that Server's resources are being used. Using a get variable to identify the Server (server=A or server=B) would work fine. However I am not sure what I would actually code to make sure I was actually logging into Server A or B to make sure that only Server A or B's resources would be used (as both Server A and B will have the same domain name.) I am thinking.. if I made s1.site.com and s2.site.com (having the s1 subdomain on server A and the s2 subdomain on server B) that then I could just re-direct the user to either sub-domain depending on what they selected. Anyone think this might work? Any other suggestions?
  8. I currently have a website running (ex. www.site.com) and I want to add a second server for load balancing. What I would like to do, is when someone logs into my site.com they choose which server they would like to log into. Server A or Server B. I have seen this done on plenty of websites and I am just not sure how to go about it. Also, I would like to keep the domain the same but I would not mind using a sub-domain (server1.site.com) or I have also seen something like this (www.site.com?server=1). I am not sure what I have to add to my existing login page to do this and I am not sure how I should go about the DNS (a-record/nameservers.) Note: I know how to remotely connect to my database from another server, I managed to figure that out so far. I am just wondering how I can modify the code or whatever I have to do so that a user can simply choose which server they would like to login to. Any help would be greatly appreciated! Thanks in advance!
  9. Hey everyone, Just wanted to say hi to the community. I am an intermediate php programmer and was looking to help out and receive help from everyone! Nice to be here -Omni
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.