Announcement

Collapse
No announcement yet.

Moving servers, having trouble.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving servers, having trouble.

    I've moved my entire database to a new server but I'm unable to change the URL, URL to Homepage, & Cookie Domain so it'll read from the new site. I couldn't find the stuff in the database to change it there or in a PHP file.

    How can I change those things, when logging into the ADMINCP I get asked for user/pass everytime I go to a new page so when I save the option changes it doesn't save them to whereever.

    How can I go around this to fix it.

  • #2
    Edit the values directly in the database using phpMyAdmin or some other front end. They are in the settings table.

    Then run the following script on your forum:

    PHP Code:
    <?php
    error_reporting
    (7);
     
    require (
    "./global.php");
     
    echo 
    cpheader();
     
    $settings=$DB_site->query("SELECT varname,value FROM setting");
    while (
    $setting=$DB_site->fetch_array($settings)) {
     
    $template.="\$$setting[varname] = \"".addslashes(str_replace("\"","\\\"",$setting[value]))."\";\n";
    }
    $DB_site->query("INSERT INTO template VALUES (NULL,-1,'options','$template')");
    echo 
    "<p>Options reset successfully. </p>";

    cpfooter();
    ?>
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Ok .. I found the setting table using PHP MYadmin .. how would you edit it though? I have similar problems.

      Originally posted by Wayne Luke
      Edit the values directly in the database using phpMyAdmin or some other front end. They are in the settings table.

      Then run the following script on your forum:

      PHP Code:
      <?php
      error_reporting
      (7);
       
      require (
      "./global.php");
       
      echo 
      cpheader();
       
      $settings=$DB_site->query("SELECT varname,value FROM setting");
      while (
      $setting=$DB_site->fetch_array($settings)) {
      $template.="\$$setting[varname] = \"".addslashes(str_replace("\"","\\\"",$setting[value]))."\";\n";
      }
      $DB_site->query("INSERT INTO template VALUES (NULL,-1,'options','$template')");
      echo 
      "<p>Options reset successfully. </p>";
       
      cpfooter();
      ?>
      Jason Miller
      http://www.GMPerformanceTuning.com
      http://projecthillside.com
      http://weekendoasis.net
      http://jamz.net

      Comment


      • #4
        I figured out how to change it but it is still prompting me for username and passowrd over adn over ..
        Jason Miller
        http://www.GMPerformanceTuning.com
        http://projecthillside.com
        http://weekendoasis.net
        http://jamz.net

        Comment


        • #5
          I tried to run that command as well and I get:

          SQL-query :
          <SPAN class=syntax><SPAN class=syntax_punct>*</SPAN> <SPAN class=syntax_punct>?</SPAN> <SPAN class="syntax_alpha syntax_alpha_identifier">phperror_reporting</SPAN><SPAN class="syntax_punct syntax_punct_bracket_open_round">(</SPAN> <SPAN class="syntax_digit syntax_digit_integer">7</SPAN> <SPAN class="syntax_punct syntax_punct_bracket_close_round">)</SPAN> </SPAN>
          MySQL said:

          <PRE>You have an error in your SQL syntax near '<?phperror_reporting(7)' at line 1</PRE>
          Jason Miller
          http://www.GMPerformanceTuning.com
          http://projecthillside.com
          http://weekendoasis.net
          http://jamz.net

          Comment


          • #6
            Originally posted by jam583
            I figured out how to change it but it is still prompting me for username and passowrd over adn over ..
            Delete your cookies for the domain.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment


            • #7
              Originally posted by Wayne Luke
              Delete your cookies for the domain.
              Do you mean out of my browser? If so, I did and I still get the same prompts.
              Jason Miller
              http://www.GMPerformanceTuning.com
              http://projecthillside.com
              http://weekendoasis.net
              http://jamz.net

              Comment


              • #8
                Does anyone else have any suggestions? Problem is after a move I cannot stay logged in. You login and try to change something or view something it asks you to login again.

                I changed cookie domain in phpmyadmin in the setting table and it did nothing.

                I emptied all cookies in my browser and it still doesn't work.
                Jason Miller
                http://www.GMPerformanceTuning.com
                http://projecthillside.com
                http://weekendoasis.net
                http://jamz.net

                Comment


                • #9
                  what was the old url used and what is the new one?
                  MCSE, MVP, CCIE
                  Microsoft Beta Team

                  Comment


                  • #10
                    Originally posted by jam583
                    I tried to run that command as well and I get:

                    SQL-query :
                    <SPAN class=syntax><SPAN class=syntax_punct>*</SPAN> <SPAN class=syntax_punct>?</SPAN> <SPAN class="syntax_alpha syntax_alpha_identifier">phperror_reporting</SPAN><SPAN class="syntax_punct syntax_punct_bracket_open_round">(</SPAN> <SPAN class="syntax_digit syntax_digit_integer">7</SPAN> <SPAN class="syntax_punct syntax_punct_bracket_close_round">)</SPAN> </SPAN>
                    MySQL said:

                    <PRE>You have an error in your SQL syntax near '<?phperror_reporting(7)' at line 1</PRE>
                    The code listed above is not a MySQL Query. It is a a PHP Script. You have to copy that into a file, FTP it to your forums and run it from your browser.
                    Translations provided by Google.

                    Wayne Luke
                    The Rabid Badger - a vBulletin Cloud demonstration site.
                    vBulletin 5 API

                    Comment


                    • #11
                      Originally posted by Wayne Luke
                      The code listed above is not a MySQL Query. It is a a PHP Script. You have to copy that into a file, FTP it to your forums and run it from your browser.
                      Yeah well the cookie domain thing doesn't have a place where you'd put the setting.

                      Comment


                      • #12
                        Originally posted by k33nny
                        Yeah well the cookie domain thing doesn't have a place where you'd put the setting.
                        Got it all working now Thanks!
                        Jason Miller
                        http://www.GMPerformanceTuning.com
                        http://projecthillside.com
                        http://weekendoasis.net
                        http://jamz.net

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...
                        X