Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: JasperHartline on November 30, 2018, 10:01:36 PM

Title: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 10:01:36 PM
I want to keep the old database, but use the installer for SMF 2.0.15
I get so far as to create the administrator account and I put in in database
password, then click continue button.. and I get this on a white web page:

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/install.php on line 1300

Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/install.php on line 1302

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/install.php on line 1350
Unknown column 'member_name' in 'field list'



That is what happens can someone tell me how to fix these errors by which files I need to hack?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 10:13:31 PM
Which version is the old database?  You'll need to do a clean install with new database, then import the old database.  Hacking files is not the way to go.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 10:23:40 PM
Ok let me try to use a new database instead, for the install.php installer..
Then I'll import the old database back over the  top

Please help me with this:
Jasper

Give me about 20 minutes and I'll report my results as fast as possible.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 10:27:22 PM
If you've run install.php on the old database, it's likely trashed.  Hopefully you have another backup.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 10:30:30 PM
I have backed it up before running the installer... I knew that much about it..

I don't know SMF that well though so I'm at a graceful standing with your help.

Yes I have a UTF-16 backed up database I exported before I started the installer. install.php

Thank you hold on..
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 10:38:30 PM
Here is the new forum: http://vhhgfamilyhistory.org/forum/index.php     it installed properly...
Now I will simply, import the database backup correct?

What is the mysqladmin command to import databases?
mysqladmin -u user -h host -p <database.backup.sql

Is that right?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 10:41:40 PM
Not sure.  You should be able to import with phpmyadmin or cpanel restore if you have it.  How large is the db?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 11:10:16 PM
The database is 759 Kb

I have PhpMyAdmin I'm working with:
It says this when importing:
Error
Static analysis:

1 errors were found during analysis.

Unexpected beginning of statement. (near "" at position 0)
SQL query:



MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Want to see my dump file?
Here is the section it is talking about:
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Host: db752360934.db.1and1.com
-- Generation Time: Dec 01, 2018 at 01:45 AM
-- Server version: 5.5.60-0+deb7u1-log
-- PHP Version: 7.0.30-0+deb9u1

SET FOREIGN_KEY_CHECKS=0;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

<feff>--
-- Database: `db752360934`
--
<feff>/* CREATE DATABASE IF NOT EXISTS `db763879566` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; */;
<feff>/* USE `db763879566`; */;
<feff>
-- --------------------------------------------------------
--
-- Table structure for table `smf_admin_info_files`
--

DROP TABLE IF EXISTS `smf_admin_info_files`;
CREATE TABLE IF NOT EXISTS `smf_admin_info_files` (
  `id_file` tinyint(4) UNSIGNED NOT NULL AUTO_INCREMENT,
  `filename` varchar(255) NOT NULL DEFAULT '',
  `path` varchar(255) NOT NULL DEFAULT '',
  `parameters` varchar(255) NOT NULL DEFAULT '',
  `data` text NOT NULL,
  `filetype` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id_file`),
  KEY `filename` (`filename`(30))
) ;
<feff>
--
-- Dumping data for table `smf_admin_info_files`
--

<feff>INSERT INTO `smf_admin_info_files` (`id_file`, `filename`, `path`, `parameters`, `data`, `filetype`) VALUES
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 11:16:36 PM
I changed the dump file a bit and now I get this more sensible error:
Error
Static analysis:

3 errors were found during analysis.

Unexpected beginning of statement. (near "" at position 0)
Unexpected beginning of statement. (near "" at position 3)
Unexpected beginning of statement. (near "" at position 5)
SQL query:

   DROP TABLE IF EXISTS `smf_admin_info_files`

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '



DROP TABLE IF EXISTS `smf_admin_info_files`' at line 1
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 11:30:23 PM
Drop all tables in the new db, then try importing the dump.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 11:39:44 PM
I called my online hosting provider told them I was gaving trouble importing an old database..
and the call was kinda cutting in and out but.. he said tell me th eold database, and tell me the new one.

So I did, and he said let me try to importt the dastabase for you.

So I did, and he said it imported successfully..

But if I open the forum to an index.php will it produce unknown coloumn names errrors in field list
or will it do something else?

Will it break SMF? Or the MySQL server?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 11:40:51 PM
Which SMF version is the database?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on November 30, 2018, 11:55:05 PM
The old database is version SMF 1.1.15 I think I'm pretty sure.

The online tech support didn't import anything that I can tell, back in the same boat.. still.

I'll try dropping all tables in the new database first then importing the old one.
I saw some unknown coloumn name 'add_deny' in 'field list' error earlier...
Though I have my doubts..
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on November 30, 2018, 11:57:48 PM
The column name errors are because 1.1 and 2.0 databases are different.  Do a clean 1.1.15 install, import the db, get it up and running.  Then patch up to 1.1.21, if it's good, use 2.0.15 upgrade package to up the db to 2.0.15.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 12:06:13 AM
Ok I might just do that then.. 1.1.15 to 1.1.21 to 2.0.15 has a database configuration mechanism to
change the table field names in my database?

Is it succeffulyy and known to work OK?

I need something for sure.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on December 01, 2018, 12:13:47 AM
I've done dozens of upgrades, like anything else if you do it correctly it works fine.  Start with getting the forum running in 1.1.15, if the db isn't damaged you shouldn't have problems.  Do a clean install with new db, import dump, run repair_settings.php twice, once to set db credentials, again to fix paths.  When forum is running, use package manager to upgrade 1.1.15 -> .16 -> ... .21.  Then use the 2.0.15 upgrade package to upgrade db.  Download, unzip, upload to forum root, run upgrade.php.

https://wiki.simplemachines.org/smf/Repair_settings.php

https://wiki.simplemachines.org/smf/Upgrading
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 12:23:11 AM
Ok thank you so much for the instructions..
I can't find a download link for SMF 1.1.15 though...
Do you know where they are stored?
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on December 01, 2018, 12:37:48 AM
It's in archived releases -

https://download.simplemachines.org/index.php?archive;b=3;v=73

Going offline shortly, be back on tomorrow afternoon (EST).  Good luck.
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 12:45:02 AM
When I go into the administrator section of the SMF 1.1.15 forum package manager it says click here to install this patch: So I click it... and it shows me white screen saying this:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 01:23:01 AM
****** I GOT SO EXCITED I HAD THEM IMPORT THE DATABASE AND I FORGOT TO RUN THE
1.1.15 to 2.0.15 upgrade SCRIPT SO I GOTTA GO BACK AND DO .16 .17.18.19.20.21 ALL OVER AGAIN LIKE I JUST DID..
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 01:24:43 AM
The SMF 2.0.15 Large Upgrade did rename all the tables and do it's 42 scripts cleanly I have faith I'll get my forum back... I have fauith... faith... Gotta have faitha fatha fatha..
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 02:12:10 AM
This is what I get after importing the database and running 1.1.11 forum on the database:
Just a white screen with this lerttering::
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3
My Community   
December 01, 2018, 02:10:31 AM  *
Welcome, Guest. Please login or register.


   
Login with username, password and session length
News: SMF - Forum update to v1.1.11 completed.
Return to Genealogy Resources   
 
 
   Home   Help   Search   Login       Register       
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back
Powered by MySQL  Powered by PHP   Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC   Valid XHTML 1.0!  Valid CSS!
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 02:13:10 AM
All I get is a white screen that says database error:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3
My Community   
December 01, 2018, 02:10:31 AM  *
Welcome, Guest. Please login or register.


   
Login with username, password and session length
News: SMF - Forum update to v1.1.11 completed.
Return to Genealogy Resources   
 
 
   Home   Help   Search   Login       Register       
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back
Powered by MySQL  Powered by PHP   Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC   Valid XHTML 1.0!  Valid CSS!
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: JasperHartline on December 01, 2018, 02:13:49 AM
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/9/d172291528/htdocs/VHHGFAMILYHISTORY.ORG/forum/Sources/Load.php(225) : runtime-created function on line 3
My Community   
December 01, 2018, 02:10:31 AM  *
Welcome, Guest. Please login or register.


   
Login with username, password and session length
News: SMF - Forum update to v1.1.11 completed.
Return to Genealogy Resources   
 
 
   Home   Help   Search   Login       Register       
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back
Powered by MySQL  Powered by PHP   Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC   Valid XHTML 1.0!  Valid CSS!
Title: Re: I was installing SMF using details for an already existing database what are the
Post by: Sir Osis of Liver on December 01, 2018, 04:00:47 PM
You have to downgrade php version to 5.4 because of this (https://www.simplemachines.org/community/index.php?topic=534915.0), you're probably running 5.6 or higher.  That should get the forum running at 1.1.15.