solved Currently 1.1.4 trying to migrate to 2.1x Major issues. Need help.

June 09, 2024, 07:34:44 PM by GhostRider2110
Ok, here's the story. Yes, I know all my own doing by not upgrading until now.  The current system is running
SMF 1.1.4
PHP 5.6
Mysql 8.0.37

Which does run, but trying to update it is, well being problematic. Running on RHEL 7.9, which needs to go as well, thus the need to move to new server. :)

So I started with trying to migrate the current to the new server.  Figured move it over, then run updates.  Yes, running into the same issues others with the mysql mysqli function issues.  The new server is running:
PHP 7.4
Mariadb 10

I imported the backup into the new VPS. No the site would not come up at all, but repair_settings.php would so I could make sure all was good on the basic level.  The upgrade.php would just stop, early on and had to rely on the php logs to troubleshoot.

Tried the 2.0.18 upgrade zip and go to a point where getting this error:
[root@vps2 public_html]# /usr/bin/php74 -f upgrade.php -- --debug --backup
PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/stevenso/public_html/Sources/QueryString.php on line 409
PHP Deprecated:  Function create_function() is deprecated in /home/stevenso/public_html/upgrade.php on line 141
 * Updating Settings.php... Successful.
 *
 +++ Backing up "attachments"...Unsuccessful!  MySQL error message:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MyISAM
                                SELECT *
                                FROM smf_attachments' at line 5


So, I decided to go back to the original 1.1.4 and try to do minor updates, like 1.1.4 to 1.1.5 from the command line. Well running in to the same thing. 

[root@ip-xxx-xxx-xxx-xxx public_html]# /usr/local/bin/ea-php56 -f upgrade.php -- --debug --backup
 * Updating Settings.php... Successful.
 *
 +++ Backing up "attachments"...Unsuccessful!  MySQL error message:
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 'TYPE=MyISAM
                                SELECT *
                                FROM smf_attachments' at line 5
[root@ip-xxx-xxx-xxx-xxx public_html]#

Any advice would be greatly appreciated. 

Thanks
Mitch

3 comments | Write Comment

xx Latin2 database encoding

May 29, 2024, 03:53:09 PM by thommen
I have been sitting on this for quite a while.

I need to move SMF 1.1.21 forum from VPS to hosting. The domain will be the same. I have a problem with the encoding of the characters in Polish and I am asking for help as I have already lost ideas on how to find a way. The problem is with the posts (translation files, they display correctly).
I have
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2" />

I will write what I have and what I have performed.

VPS:
SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf';
+----------------------------+
| DEFAULT_CHARACTER_SET_NAME |
+----------------------------+
| latin2                     |
+----------------------------+
1 row in set (0.01 sec)


SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf';
+------------------------+
| DEFAULT_COLLATION_NAME |
+------------------------+
| latin2_general_ci      |
+------------------------+
1 row in set (0.00 sec)


Hosting:
SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf_forum';
+----------------------------+
| DEFAULT_CHARACTER_SET_NAME |
+----------------------------+
| latin2                     |
+----------------------------+
1 row in set (0.000 sec)


SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf_forum';
+------------------------+
| DEFAULT_COLLATION_NAME |
+------------------------+
| latin2_general_ci      |
+------------------------+
1 row in set (0.000 sec)

So the encoding and character comparisons are the same.

On the VPS I made:
mysqldump --default-character-set=latin2 --no-tablespaces > backup.sqlI have:
file backup.sql                                                                                                                                                                 
backup.sql: HTML document, ISO-8859 text, with very long lines (52729)


On the hosting I perform
mysql --default-character-set=latin2 < backup.sql
I don't understand where the problem is?
Please help.

I also performed "Convert database and data to UTF-8". After that, the posts show correctly, but the translation files don't show anymore (I think they are translation files). I downloaded from → https://download.simplemachines.org/index.php?archive;b=3;v=32 the Polish package, replaced it, but I still had incorrect letters in diacritical marks.
I would like to add that both machines are running PHP 5.6.
8 comments | Write Comment

xx Need help migrating

May 03, 2024, 03:20:06 AM by marcie78
Our forum recently just up and died on us and I need help.

Here's the thing, the forum died a few days ago. And we got an error that was fixed. But then came another error as things go. A tech upgraded our php to 7 and because of that code has to be fixed on the index file. And now I am stuck.

I tried doing this myself I am not in anyway a php developer so i am trying to port this to mysqli

Here's the original code

```

// Connect to the MySQL database.

if (empty($db_persist))
    $db_connection = @mysql_connect($db_server, $db_user, $db_passwd);
    else
    $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd);

// Show an error if the connection couldn't be made.

    if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
    db_fatal_error();
```

Here's what I did


```
// Connect to the MySQL database.

if (empty($db_persist))
    $mysqli = mysqli_connect($host, $user, $password);
else
    $link  = mysqli_connect($host, $user, $password);

/ Show an error if the connection couldn't be made.
   
if (!$link || !mysqli_select_db($dbName, $link))
    db_fatal_error();
```


I get an error. What am i doing wrong?


Please use code tags when posting code - Steve
16 comments | Write Comment

solved Problem upgrading from 1.1.21 to 2.0.9

November 26, 2023, 03:58:11 PM by ST Dog
My hosting provider just updated software and broke my SMF 1.1.21 forum.
They won't reinstall php 5.6.

I had previously tried to update to 2.0 and never could get it to work.

So I'm back trying again.

I have a duplicate forum for testing. Using Softaculous the update to 2.1.4 won't even start.

Trying to go to 2.0.9 gets me to upgrade.php

After logging in and setting options I click to continue to step 3 and get

Parse error: syntax error, unexpected '$upgradeData' (T_VARIABLE) in /home/cadillac/public_html/misfits2/Settings.php on line 69
That line appears to be added by the upgrade script as part of the upgradeExit() function.

As long as it's there upgrade.php gives that error.

revert to the back up and it loads and get to step 3 again with the same error.

So reverted and tried the 2.0.1 large upgrade. Extracting that screwed up the file owners.
(my bad, I haven't used tar in a while)

While I try to get that resolved, any one know what the problem might be with the Softaculous upgrade?

20 comments | Write Comment

solved No access to forum after administrators demise.

October 19, 2023, 07:28:24 AM by RobMoff
I've been a user of a forum running SMF 1.1.21 for many years, sadly the sole administrator passed away recently. He had made arrangements ( I don't know what) for a user to take over. But that has not worked. All we now get is:-
 Table './hippock_HPAforum/hpf_messages' is marked as crashed and last (automatic?) repair failed

Is there any way you could pass on my e-mail address to the new admin so that I can help?

Rob
9 comments | Write Comment