[wp-hackers] Multisite Remote Database

Dion Hulse (dd32) wordpress at dd32.id.au
Tue Apr 12 09:39:15 UTC 2011


The other suggestion is to set the local server to have the same url as the
public server.. use a Proxy PAC file to use 127.0.0.1 as a proxy for *.
livesite.com, end result would be 2 server which believe they're the live
site, but when the proxy settings are in effect, all requests for hte live
site are delivered locally..
Only other solution I can think of..

On 12 April 2011 19:32, Andy Charrington <andycharrington at gmail.com> wrote:

> Thank you Dion. I also tried it with the test site url.. No luck...
>
> However, It appears that you're running a Multisite install given that
> > redirect? If so,  you might be completely out of luck here.. I dont know
> > enough about the multisite redirection code, but it seems that some
> details
> > might not be correct.
>
>
> I was worried about that.... I figured the lack of info online meant
> multisite with remote db just isnt possible... Thats a real shame.
>
> You could fake being the live site by modifying $_SERVER['HOST']; on the
> > test site's wp-config.php to make WordPress believe it is the live
> server..
> > that's all I can think of right now.
>
>
> I will try that.
>
> I will continue trying and will let you know what i find.
>
> What do others do for a test (by this i actually mean an environment i can
> both develop and test on) environment? I would prefer to do it locally of
> course but multisite wont work on localhost... Any ideas greatly
> appreciated!
>
> Thanks
>
> On Tue, Apr 12, 2011 at 10:24 AM, Dion Hulse (dd32) <wordpress at dd32.id.au
> >wrote:
>
> > >  I also then (DIon) defined WP_SITEURL and WP_HOME in the test site as
> > the
> > url of the live site.
> >
> > That needs to be the URL of the testsite in the test site. In the live
> site
> > that'll be populated automatically from the database.
> >
> > However, It appears that you're running a Multisite install given that
> > redirect? If so,  you might be completely out of luck here.. I dont know
> > enough about the multisite redirection code, but it seems that some
> details
> > might not be correct.
> >
> > You could fake being the live site by modifying $_SERVER['HOST']; on the
> > test site's wp-config.php to make WordPress believe it is the live
> server..
> > that's all I can think of right now.
> >
> > On 12 April 2011 19:14, Andy Charrington <andycharrington at gmail.com>
> > wrote:
> >
> > > Thank you for your suggestions.
> > >
> > > I tested the remote connection with the script you mentioned madalin
> and
> > it
> > > was successful.
> > >
> > > I also then (DIon) defined WP_SITEURL and WP_HOME in the test site as
> the
> > > url of the live site.
> > >
> > > However i am still getting the following error-
> > >
> > > Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
> > >
> > > (which is what i meant by an infinite loop Brian).
> > >
> > > I wonder if it has something to do with the domain mapping plugin as
> when
> > i
> > > go to the test url it tries to forward me to
> > > http://TESTURL/wp-signup.php?new=TESTURL
> > >
> > > Obviously that will never work...
> > >
> > > I will indeed go to the support forums unless anyone has any further
> > > suggestions based on the above?
> > >
> > > I have struggled to find any info online regarding multisite & remote
> > > database. Does anyone know of a site with info on this?
> > >
> > > Thanks a lot
> > >
> > > Andy
> > >
> > > On Tue, Apr 12, 2011 at 12:22 AM, Dion Hulse (dd32) <
> > wordpress at dd32.id.au
> > > >wrote:
> > >
> > > > by the sounds of it, You're trying to use the same database and
> tables
> > on
> > > > the live as the test site?
> > > > If so, the only possible way that you could be getting a redirection
> > > should
> > > > be through the canonical code, and even then, it won't cause a
> infinite
> > > > redirect, nor will it redirect based on hostname.
> > > >
> > > > Try defining WP_SITEURL & WP_HOME for the local install since it's
> URL
> > > > differs to that in your database.. see how you go..
> > > >
> > > > On 12 April 2011 07:40, Brian Layman <wp-hackers at thecodecave.com>
> > wrote:
> > > >
> > > > > On 4/11/2011 2:58 PM, Andy Charrington wrote:
> > > > >
> > > > >> I am trying to set up a test environment for a multisite install
> and
> > > > >> figured
> > > > >> that the most realistic tests would be when done with actual data
> > from
> > > > >> from
> > > > >> the target site. So...
> > > > >> Would somebody mind explaining and/or pointing me in the right
> > > > direction??
> > > > >>
> > > > >
> > > > > Leaving port 3306 wide open is generally a bad idea.  You'll
> > eventually
> > > > be
> > > > > hacked or have a slow mysql server due to all the servers out there
> > > > > continuously trying passwords.
> > > > >
> > > > > What you are trying to do will work. IF you really want to do this
> > > test,
> > > > > figure out your hostgator IP address and then contact wired tree
> and
> > > then
> > > > > can setup a iptables rule to open 3306 for only that server on your
> > > vps.
> > > > >  Additionally you'll need to make sure that you are able to make
> the
> > > out
> > > > > bound connection from the hostgator side.  It is likely blocked by
> > > > default.
> > > > >  If you have ssh access on your host gator account, I would use
> mysql
> > > > from
> > > > > the command line to make sure that part is working before trying to
> > > > diagnose
> > > > > more wide ranging issues.
> > > > >
> > > > > Beyond that you'll need to post to the support forums for help with
> a
> > > > > better definition of what you mean by an infinite loop...
> > > > >
> > > > > Hope that helped.
> > > > > --
> > > > >
> > > > > Brian Layman
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > wp-hackers mailing list
> > > > > wp-hackers at lists.automattic.com
> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > >
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers at lists.automattic.com
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > >
> > >
> > >
> > > --
> > > Jealous Designs
> > > Website:  <http://jealousdesigns.co.uk/>jealousdesigns.co.uk
> > > Portfolio:  <http://jealousdesigns.co.uk/portfolio>
> > > jealousdesigns.co.uk/portfolio
> > > Phone: 07903030008
> > > Twitter: _a_n_d_y
> > > Skype: andycharrington
> > >
> > >
> > >
> > > Web design | Web development | WordPress | Flash | Posters, business
> > cards
> > > and flyers | Bespoke online tools | PHP | MySQL | (X)HTML | CSS |
> > > Javascript
> > > | ActionScript
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> Jealous Designs
> Website:  <http://jealousdesigns.co.uk/>jealousdesigns.co.uk
> Portfolio:  <http://jealousdesigns.co.uk/portfolio>
> jealousdesigns.co.uk/portfolio
> Phone: 07903030008
> Twitter: _a_n_d_y
> Skype: andycharrington
>
>
>
> Web design | Web development | WordPress | Flash | Posters, business cards
> and flyers | Bespoke online tools | PHP | MySQL | (X)HTML | CSS |
> Javascript
> | ActionScript
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list