formtools / core

The Form Tools Core.
https://formtools.org
205 stars 78 forks source link

New Hosting - Migration #660

Open ocbroadband opened 4 years ago

ocbroadband commented 4 years ago

Hello,

I'm having some trouble getting the application to work when moving to a new host. Ultimately, I'm looking to just forklift my installation to the new host, and just adjust the paths so its essentially exactly what I'm running on my existing host. I, however, must be missing something because when I update all the known paths I'm aware of, I get a 500 error when attempting to load it up on the new host. Anything out of updating the configuration file, and the paths that I've found in the DB to the new host paths that I should look out for? I will say that if I perform a clean install, it works fine on the new host, so its something related to the migration process.

Thanks,

Lyle

nelsondcosta23 commented 4 years ago

are both same SO? check if php version is 7.0+ (if user of FT3)

you have to change config.php the file and url path image

you have to change inside de DB the path of the clients image

take special care with root_dir

ocbroadband commented 4 years ago

What is 'SO'? And yes, config file is updated, and the paths within the settings table has all be updated. I've been trying to find something outside of the config.php file and the path(s) within the DB that are in the ft_settings table. I didn't think there was anything else that needed to be changed, but it does appear that way.

My other option is to migrate the DB to a fresh installation on the new server, but I'm not quite sure how to just 'import' the form/data to the fresh install.

nelsondcosta23 commented 4 years ago

Oh sorry is Sistema Operativo = Operative System sorry :) PHP version its 7?

Its strange I do that all the time, I make copies to dev more and more ... and works fine

hmmm well if nothing works, and if u want give me IN PRIVATE access to the host to check.

ocbroadband commented 4 years ago

PHP Version 7.3.13 MySQL 5.0.12

I think I figured it out. I ended up installing/migrating the site into another 'valid' domain on the new host that I have updating the appropriate fields to match the domain/etc., and it works as expected.

Does the script require any type of reverse DNS lookup or domain confirmation of any kind? If this is the case, then it has to do with that not being migrated/pointing to my new hosting provider, which is really kind of odd. It shouldn't really care IMO.

This means I can't create an actual staging site to ensure everything is working on the new host, and then just update my name-servers when I'm ready to flip. :(

ocbroadband commented 4 years ago

Any thoughts on this as far as confirming if my suspicions are correct?

ocbroadband commented 4 years ago

Anyone else has any thoughts on this? I was able to successfully install the same version and the latest version without issue alongside this one that I'm attempting to migrate. The main items I've updated after moving the database and the complete file structure are as follows...

  1. Updated the config.php file to point to my new MySQL host
  2. Updated the table 'settings' in the database to use the new valid file paths...
  3. Cleared the cache folder.

After the above, I still get a 500 error on accessing the page, but the 'new' installation comes up just fine. Beyond this, I couldn't find anything else that 'should' have to be updated, but this obviously isn't true. There has to be something else that's causing the server to throw an error.

@benkeen Any thoughts? Or even better, how about exporting my existing forms and doing a 'import' into the new instance that is working. Is this possible?

ReverendLove commented 4 years ago

Tried exactly the same, modified config.php and entries in ft_settings accordingly and get a state 500. A new installation with exactly the same Versions of FT and Api works perfectly. Ther a no differences in the scripts between the new and migrated version. I assume that is a problem with the migrated db which I did via sql export -> import.

ReverendLove commented 4 years ago

Well, guess I found a solution. I copied my original formtools folder to the new host, and deleted config.php. This evoked the installer, I went through the steps and set up a new admin account. This set up config.php and a new database with correct settings. Then I exported all tables from the original except the ft_account, ft_account_settings and ft_settings in phpMyAdmin with "Drop Objects" checked on the advanced export dialogue. I imported the sql file in the new database and now I have my developer version on another host.
HTHY

ocbroadband commented 4 years ago

Hmm.. I'll give this a go... Although, I wish it was much a much cleaner process. In my mind, you should be able to just forklift the entire installation and put it on a new host. It really should only take modifying the db name, URL(if needed) and the UNC path on the server IMO.

ReverendLove commented 4 years ago

Sure. I think something like a re-configure script would be perfect which only generates a new set of relevant tables for the system configuration and a new configure.php while leaving the other tables untouched.

ocbroadband commented 3 years ago

I'm looking to see if I can get this back to visibility. I'm now using 'staging' sites, and when I push my staging site to production, this is becoming a huge hassle to have to go and edit the DB and files every time to match the production site path. Is there anything on the horizon in regards to a migration script or something that will automate these tasks when moving from one domain to another? Thanks.