Connection to host: failed!
I have been trying for days to figure out what is wrong, and can’t. I’m moving my local install to the remote server. I am following everything that instructions tell me to do (probably missing something but can’t find it!)
I’ve checked and rechecked the config file, I don’t know what else to do.
See if anything here helps:
http://bobsguides.com/modx-installation-faq.html
The most likely thing is that the host has added a prefix to the DB name and/or the db user’s name so you have those wrong in the config file.
Another possibility is putting your MODx username/password in the config file rather than those of the DB user.
Also, for most hosts, the DB server name is localhost, but occasionally it’s something else.
PS: You did create a database and DB user with full rights on the remote host, right?
I don’t think MODx will use a database on another server without some serious modifications. I can’t think of any reason why you’d want to do this, especially on a fresh install.
As for .htaccess, I usually rename it and turn off FURLs until I have a successful install, just to take it out of the equation.
Okay - sorry, I didn’t know the database had to be on the same server. I am also new to working with databases and didn’t know that it is better to always keep the database for that site on the same server as opposed to a different one.
I have inherited the site I am working on for a re-design and chose modx to use to allow the client to make their own updates.
soooo, then, I would have to get a hold of the info for the server that the site sits on to find out how to create a database on that server?
I really appreciate your help and have referred to your site LOTS since I started working with modx.
Thanks for the kind words.
Having the db on the same server will make things a lot faster (and simpler).
If you log on to your host’s cPanel (or the equivalent) there should be a database section and a link to PhpMyAdmin. Creating a new database and adding a user with full rights should be fairly straightforward from there. Make sure to note the db name, user name (which might not be exactly what you entered), and password .
There’s a little tutorial here
http://www.modxhost.com/index.php?q=4.html, although it might not look exactly like what you see on your host.
Uh oh . . . do you mean that there is a non-MODx database on the old non-MODx site that is used by the site? If so, things get more complicated. If the old site is in another Content Management System, such as Drupal or WordPress, it’s even worse because the content of the site is in that DB and its format wouldn’t be compatible with MODx.
Do you know exactly what is in contained in the old DB?
No no - the old site was created with straight html and no CMS involvement, so it is really a whole new site,
However
: )
there is one page that uses a form and works with a separate database. But I am going to call that php page so that it remains outside of the modx structure and so can still use that other db. I think it will work!
OK, you should be good to go then. If calling the other page doesn’t work, you can always import the DB data into the MODx db and convert the code that accesses it into a MODx snippet. You may want to do that down the line to speed things up, but you can cross that bridge much later.
So now, just create a new DB for MODx on the MODx site’s server and install MODx (I would say without the sample site, though some would disagree). Then see the section at my site on porting your site to MODx:
http://bobsguides.com/porting-your-site-to-modx.html.