News:

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

Main Menu

My new host migrated my SMF forum but this error has shown up.

Started by Vandellyr, May 11, 2024, 05:30:43 PM

Previous topic - Next topic

Vandellyr

Hi! I need some help. 

I needed to get new hosting and the company I chose said they could migrate my SMF forum. They did so, but then they said that there were scripts throwing errors, so they told me: "I would highly recommend you to check this once with the SMF forum, if there are any specific requirements on the server end, so we can work accordingly. However, the scripting part may require a further review."

So, I came here to see if I could find out what the problem might be/how to fix so I can tell the hosting company. Here are the errors that come up. Any help/advice so I can get them to get it working would be great. Thank you!

SMF 2.1.4
PHP: 8.2.18

I cut out the paths below

Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in

Load.php:3398 Stack trace: #0
Load.php(3398): array_keys() #1
Load.php(926): getLanguages() #2
index.php(214): loadUserSettings() #3
index.php(184): smf_main() #4 {main} thrown in
Load.php on line 3398

Kindred

Were you using 2.1.4 before the migration?
Are you running any mods?


SMF 2.1.4 supports php 8.2 just fine.  Some mods may not.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Vandellyr

Yes, I was using 2.1.4 before the migration.
No, no mods at all.
In fact, this forum is very vanilla. All I added was a couple themes and that's it.

Illori


Vandellyr

Quote from: shawnb61 on May 11, 2024, 06:24:19 PMYou may need to reload your languages.

So I downloaded the SMF 2 0 19 English utf8.zip and uploaded it to the SMF folder online at the new server and extracted it there. (English is the only language I was using)

It still is giving the same exact error as above.

Also, I haven't pointed my DNS to this new site yet, so the SSL isn't up on the new host.
The old host still has a working version of my SMF forum.


shawnb61

If English was your only language, youre good.

The 2.0 languages are not compatible with 2.1.  You should get rid of those.  They'll be easy to spot.

Carefully audit all your paths using repair_settings.php, as Illori suggested above.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Vandellyr

Quote from: Illori on May 11, 2024, 07:06:16 PMhas repair_settings.php been run to make sure all the paths are correct?

What is repair_settings.php?

I'm trying that now but I have a question.

It's reccommending https:// on some of these but currently since the SSL hasn't been set up since I've not move my DNS, should I just stick with the http:// that is in there?


Vandellyr

Quote from: shawnb61 on May 11, 2024, 07:21:32 PMIf English was your only language, youre good.

The 2.0 languages are not compatible with 2.1.  You should get rid of those.  They'll be easy to spot.

Oh no...where do I locate those then in the file manager?


Quote from: shawnb61 on May 11, 2024, 07:21:32 PMCarefully audit all your paths using repair_settings.php, as Illori suggested above.

Working on it.  :)


Vandellyr

Ok so I used the repair tool and saved the settings. I didn't change the http:// versions.
But once it saved it came up with this:


"Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables."

And when I go to the website itself, it says:
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Vandellyr

So I sent another ticket to my host's tech support, to look at the issue in the previous message, and they said this.

"While checking the issue with the MySQL connections, I could see that the repair_settings.php had db user updated as (user name) . The database username associated with nyctopho_smfpop is nyctopho_pop. The db username will always contain the cPanel username as a prefix, and (user name) cannot be assigned to the database as the username does not exist.

Once the correct database username is updated, the MySQL connection should be resolved. However, this step will loop back to the PHP script errors on load.php and index.php. I have tried to change the PHP version to 7.4, the website seems to load to theme_template_error.

We strongly recommend you check the scripts at the path:/Sources/Load.php and /index.php"

The same error I was asking about at the start of the thread is back again. So, what should I try now??

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

If your forum was recently moved, you MUST update all the urls & paths to their new locations.

The best tool to do that is repair_settings.php.

This tool will not unilaterally update any of your settings.  You must make the updates & press save.

It may make recommendations.  But it is up to you whether to save them or not.

So...

Load up repair_settings.php.

Correct any db connection info if necessary & press save.

Once the tool can talk with the db, it will show you all the urls & paths.

Carefully review and fix them & press save.

If you don't know the paths, consult your host.

The error appears to indicate there is a config error preventing the forum from loading the language files.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Vandellyr

Quote from: Kindred on May 11, 2024, 10:56:07 PMYou need the correct language files...

Where can I get the English language files for 2.1.4?

I found the SMF 2 0 19 English utf8.zip file in the download section on this site, but I was told that was the wrong one.

And is the file installed the same way?


Quote from: shawnb61 on May 11, 2024, 11:20:17 PMIf your forum was recently moved, you MUST update all the urls & paths to their new locations.

Load up repair_settings.php.

The error appears to indicate there is a config error preventing the forum from loading the language files.


I did do that and tried to repair the paths, then when I did, I got this error in the repair_settings.php: "Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables."

My host reverted things back and I can see the paths again.
And then my new host sent me this message.

"While checking the issue with the MySQL connections, I could see that the repair_settings.php had db user updated as (user name) . The database username associated with nyctopho_smfpop is nyctopho_pop. The db username will always contain the cPanel username as a prefix, and (user name) cannot be assigned to the database as the username does not exist.

Once the correct database username is updated, the MySQL connection should be resolved. However, this step will loop back to the PHP script errors on load.php and index.php. I have tried to change the PHP version to 7.4, the website seems to load to theme_template_error."


Would the configuration error be from the paths or from the script itself?
Or do I need to upload a new language pack? If so, where can I find it for 2.1.4 because the one in the download section of this website is not the right one.

My host seems to think it is a problem with the scripts.

I'll be honest..this isn't all my balliwick but I am trying.

Arantor

You don't need a new language pack for English; the files shipped with 2.1 *are* the English pack.

And with 2.1 there is no separate UTF-8 vs ISO package because 2.1 is UTF-8 only.

You have a database called nyctopho_smfpop, and a user called nyctopho_php - but it sounds like from your host that this isn't correct somehow - ask them what the DB should be called and what user it should have (or what they want it to have) and then put the details into repair_settings.

Vandellyr

Hello Everyone,

Thank you for all your help. I really appreciate the time you spent writing and helping me with my SMF forum problems. After taking all your advice and walking through the repair_settings, I was able to track down all the paths that were not matching up.

Then, I sent that info to my host's tech support, and they had a different tech person there today that was able to take what I had found, and do the repair_settings with the right username/password and fixed forum.

My forum works now!! Yay! And I can finish the migration to their service. So happy! 

Advertisement: