News:

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

Main Menu

smf and wampserver

Started by lord alibaski, February 17, 2023, 12:41:47 PM

Previous topic - Next topic

lord alibaski

I forgot how to do this now, but how do you point smf install to an imported database.

Thanks for any help.


vbgamer45

You just update the database settings in your Settings.php in your forum. You can also use the repair settings tool.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

So I've uploaded the sql file to phpmyadmin

Then opened up localhost that goes to SMF Installer, where you get these settings



All you can do here is put username as root it goes nowhere. I carry on with the installation and it creates a database of it's own, but I am sure I pointed it towards the uploaded database on installation last time.

I don't know how to do it exactly because I just tried it via repair settings and now I get this

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

I know it's being cheeky vbgamer45 but can you just go through it on how to do it from a fresh install and then adding it to an uploaded database on wampserver.

vbgamer45

Well what you could do is install SMF to a database.
Then delete the contents of the database and replace with your sql file that you saved in the same database.

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

Thought I had it working then used repair settings saved it and then this popped up



any idea what that could be?


vbgamer45

Check your database the smf_settings table exists.

Or do your smf tables star with ad different prefix other than smf_

If so you need to adjust that in Settings.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

Cant get anywhere with this, I have added what I think is right inside settings.php, the smf_settings is inside the table but no matter what I try it keeps coming back with the same error as above.

I have uploaded the settings.php can you have a look at this and add where I should be putting the relevant information. I will give this one last go if it works after that I'm done trying lol

vbgamer45

Your database prefix should be smf_
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

Changed it and still same error, give up with it something must have changed in this version of wampserver I have never had a problem like this before.

lord alibaski

I thought I cracked it but after using repair settings I get this error now.

( ! ) Warning: Undefined array key "load_average" in C:\wamp64\www\Sources\Load.php on line 382
Call Stack
# Time Memory Function Location
1 0.0003 364224 {main}( ) ...\index.php:0
2 0.0136 386248 reloadSettings( ) ...\index.php:142

( ! ) Warning: Undefined array key "load_average" in C:\wamp64\www\Sources\Load.php on line 386
Call Stack
# Time Memory Function Location
1 0.0003 364224 {main}( ) ...\index.php:0
2 0.0136 386248 reloadSettings( ) ...\index.php:142
C:\wamp64\www\Sources\Errors.php:50:
array (size=5)
  0 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 6063
      'function' => string 'log_error' (length=9)
  1 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 5944
      'function' => string 'load_file' (length=9)
  2 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 5762
      'function' => string 'call_helper' (length=11)
  3 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Load.php' (length=30)
      'line' => int 526
      'function' => string 'call_integration_hook' (length=21)
  4 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\index.php' (length=23)
      'line' => int 142
      'function' => string 'reloadSettings' (length=14)
Error loop.

dodos26

Oddly enough, I don't have these problems with 3.3.0 x64
appache 2.4.54.2
phpmyadmin 5.2.0
php 7.4.33
mysql 8.0.31

vbgamer45

PHP 8.0+ adds more warnings for PHP issues. Might be a bug with smf. load_average is part of windows servers to that might be why
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

Tried all versions of PHP and same error occurs.

vbgamer45

Insert a setting into the smf_settings database table called load_average
no value needed.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

Hi vbgamer45

You don't mind if I message you regarding this do you? just that I don't want to post my smf_settings in here.

vbgamer45

You shouldn't have to post the table just insert the new database row and should be set.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

This is what I mean I don't know if it's actually set because if I look inside the table it doesn't seem to be there but if I try to insert it again it tells me it's already there!!





Just don't know if I am entering it correctly.

vbgamer45

Out of ideas then might be a bug with SMF.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

No worries about it vbgamer45 I'm out of idea's as well I just wanted to see if I could get the old database up using wamp. I didn't want to upload it to my server and try it on there using an older database.

It also must be a bug inside wamp because last time I did this it worked without any problems at all, it was a straight upload of the sql file and pointed the install to it and it worked without any issues.

Illori

did you run repair_settings.php at any point? if not i would suggest and try again.

What is repair_settings.php?

lord alibaski

Hi Illori

Yeah I have run repair_settings everytime it's nothing to worry about.

vbgamer45

Does the site run? If so maybe just comment out those. Or adjust your error display/logging settings in your php.ini
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

You're only looking at the first page; there's a good few hundred items in a normal smf_settings table - scroll down a couple of pages, see what the item says.

lord alibaski

Quote from: vbgamer45 on February 26, 2023, 03:43:04 PMDoes the site run? If so maybe just comment out those. Or adjust your error display/logging settings in your php.ini

My main site is working fine, just that I had to change hosting and domain hosting a couple of weeks ago. When my domain name completed propagation for some strange reason my forum went back a week this losing a few important post. Though before it happened I downloaded a database from 14-02-23 but when I uploaded it to the server the forum went back even further, like to the middle of 2022!! I wanted to test this database I downloaded on the 14th to see what had happened so I have been trying to get it working on wampserver but with no luck.


Quote from: Arantor on February 26, 2023, 04:14:37 PMYou're only looking at the first page; there's a good few hundred items in a normal smf_settings table - scroll down a couple of pages, see what the item says.

I only just noticed this Arantor having looking at it again I didn't see the drop down menu and it was inputted on page 13, but like I said I don't know if I have inserted it correctly.

This is how it looks


vbgamer45

I run on wamp too for most of my sites. I don't use premade apache/php packages. I grab mine from apachelougne.com and php from windows.php.net and then set them up directly. Running most PHP 8.0 and have one server left on 7.4
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

No, "no value needed" is not what it's after, it should just be blank.

shawnb61

My initial suspicion here is that you have load averaging enabled on your production server...  But it's not supported on Windows, so the system may be getting confused with unix settings restored on a wamp server.

Do you have a value in the settings table for 'loadavg_enable'?

If so, I'd just plain delete that.  It shouldn't even be looking at 'load_average'...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

lord alibaski

I've just deleted the load_average table, did a search for loadavg_enable and the value is set to 1

Just used repair settings again removed it and still gettin these errors

( ! ) Warning: Undefined array key "load_average" in C:\wamp64\www\Sources\Load.php on line 382
Call Stack
#   Time   Memory   Function   Location
1   0.0014   364904   {main}( )   ...\index.php:0
2   0.0091   386480   reloadSettings( )   ...\index.php:142

( ! ) Warning: Undefined array key "load_average" in C:\wamp64\www\Sources\Load.php on line 386
Call Stack
#   Time   Memory   Function   Location
1   0.0014   364904   {main}( )   ...\index.php:0
2   0.0091   386480   reloadSettings( )   ...\index.php:142
C:\wamp64\www\Sources\Errors.php:50:
array (size=5)
  0 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 6063
      'function' => string 'log_error' (length=9)
  1 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 5944
      'function' => string 'load_file' (length=9)
  2 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Subs.php' (length=30)
      'line' => int 5762
      'function' => string 'call_helper' (length=11)
  3 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\Sources\Load.php' (length=30)
      'line' => int 526
      'function' => string 'call_integration_hook' (length=21)
  4 =>
    array (size=3)
      'file' => string 'C:\wamp64\www\index.php' (length=23)
      'line' => int 142
      'function' => string 'reloadSettings' (length=14)
Error loop.


shawnb61

As suggested above, delete the loadavg_enable entry in the settings table.

I don't think you should have deleted that table.  Generally not a good idea. 

But try deleting that entry & see where that gets you.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

dodos26

Wamp installs various php and other add-ons by default. Maybe one is disabled? Or missing? For me work on windows.
Try use IObit unistaler for unistall wamp and try install clear new forum. First create new account msql and use it.

lord alibaski

I have uninstalled it all and I am going to start from fresh.

So is this the best way to do this

Install wamp - install smf using default database - database created and forum installed

Now I have opened up phpmyadmin and the database prefix it created was smf not smf_

Where is my main forums sql file being uploaded to next? I have uploaded it to the smf table before but this is where nothing happens, so any suggestions are welcome.

Thanks

vbgamer45

I would redo the table prefixes for sure. If you can should be smf_ as the table prefix by default.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

That was the 1st thing I did.

What procedure would you do next!

vbgamer45

Is the forum working now? the new install?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

lord alibaski

The default SMF install always works it's as soon as I try changing the database over to the database I upload that's when all the problems begin.

dodos26

So everything points to some sql version incompatibility. I would look for differences between the default tables and the old tables, and try convert.

lord alibaski

Quote from: dodos26 on February 28, 2023, 03:58:20 PMSo everything points to some sql version incompatibility. I would look for differences between the default tables and the old tables, and try convert.

Lost me with that one lol How would one go with converting all tables at once?

Advertisement: