News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

I was installing SMF using details for an already existing database what are the

Started by JasperHartline, November 30, 2018, 10:01:36 PM

Previous topic - Next topic

JasperHartline

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?

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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.

Sir Osis of Liver

If you've run install.php on the old database, it's likely trashed.  Hopefully you have another backup.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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..

JasperHartline

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?

Sir Osis of Liver

Not sure.  You should be able to import with phpmyadmin or cpanel restore if you have it.  How large is the db?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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

JasperHartline

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

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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?

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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..

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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.

Sir Osis of Liver

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
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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?

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JasperHartline

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

JasperHartline

****** 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..

Advertisement: