How to (un)install mods if the SMF directory is further down the root web dir. ?

Started by aegersz, October 12, 2015, 02:47:00 AM

Previous topic - Next topic

aegersz

i ran into strange problems but i worked it out ... but only after trashing and quickly fizing my live system.

the problem:

my live system lives at "/var/www/html"
my clone system lives at "/var/www/html/smfnew"

uninstalling and reinstalling mods (because the database says they're on but they aren't) hits BOTH the live and clone.\

i think ... when i removed the mod on my clone, it came off the live system, too. so i had to reinstall the mods on both.

i finally cleaned her up but i'm still unsure if a clone system is a good idea at all - i wanted a vanilla system for source reference and testing.

why am i confused ? is my config not recommended ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Illori

on the server settings -> database and paths page what directory is listed for SMF?

aegersz

the paths are correctly pointing to the new system at:

Forum URL - http://forum.drugs-and-users.org/smfnew
SMF Directory - /var/www/html/smfnew
Sources Directory - /var/www/html/smfnew/Sources
Cache Directory - /var/www/html/smfnew/cache
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

Are the remaining paths correct? If you run repair_settings in each instance, are all paths correct?
If not, there lies your problem. If so, it shouldn't happen at all :o
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

aegersz

since i only just recently built this system, i'm confident that the paths are corrent.

my live system is heavily mod'ed and my new system only has a few mods on it BUT when i clone the database every hour, the new system Sources etc. are missing the fully moded changes that the database expects.

my question is: should i copy the Source libs etc. across to the new system ?

you see, i'm never sure how to handle the SMF directory differences - do you guys copy ALL the files from your live system to another system ?

or am i just doing some crazy stuff here and driving both you and i nuts ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

If you're just cloning your database, there lies your problem. In the database are stored, amongst others, your themes paths. When you mess with mods that perform themes changes, it is possible (and likely) that you are messing with the wrong files.
Always, always, always run repair_settings after copying either database or files to a different location
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

aegersz

OK, i will investigate repair_settings (now downloaded) ... is it safe to run anytime ?

and do i run it on both my live or new system ?

will i need to modify it for my new system ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

here is an example of what i mean - note the directories conflict and yet the ftp stuff points to the right system (???)

it shows the bottom of a mod install test run and as you can see, the paths point to the live system.

the ftp stuff, i don't think is in use.

so if i was to remove this mod, i think it will affect the LIVE system ... does that sound possible ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

Exactly as I pointed. Your default theme path points to your "live" system because these paths are stored in the database and are not automatically adjusted when you copy it to somewhere else.
repair_settings is fundamental! (don't forget to delete it after use)

You only need to use it in your test board, because that's the one which has paths to fix.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Illori

unless you are doing a lot of changes to your live forum often, you dont need to test that each "backup" works. make a test install and use it dont keep updating and changing it. you can test your database backup to make it works but you dont need keep doing it over and over again if you know the size of the backup and that your backup method works.

aegersz

Quote from: margarett on October 12, 2015, 09:27:17 AM
Exactly as I pointed. Your default theme path points to your "live" system because these paths are stored in the database and are not automatically adjusted when you copy it to somewhere else.
repair_settings is fundamental! (don't forget to delete it after use)

You only need to use it in your test board, because that's the one which has paths to fix.

i see. but how does it work ? do i just save the settings (which i did) but when i trialed a mod, it still points to the live system.

i think i need instructions on how to drive the repair_settings.php program.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here


aegersz

i have read it and i do understand how it works ... i am trying this out with a mod and now a sample looks like this on BOTH systems (no, i only ran it on test as i get what it does) but both report:

Execute Modification   ./Sources/Subs-BoardIndex.php   Test successful

is that what i would expect because i can't see the fully qualified path from the install test ?

Do i really need to Restore Settings ? that sounds like it will undo things, so i selected Save Settings ... is that my mistake ?

i appreciate your patience but the utility just confuses me ... i did the "Restore Settings" but how do i know that the settings are now correct ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

./ refers to the current relative path. It's exactly how it should be ;)

If the paths are correct (Settings.php and Themes paths in the database) your test setup will NOT touch the "live" forum. It doesn't even know that it exists!

In repair_settings you need to "Save Settings", AFTER you confirmed all suggested changes (you should confirm them, though)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

aegersz

thank you so much. i finally know a bit more about what i am doing.

btw, my forum is growing fast, is now self-funding and i want my guys to be very happy with my choice of BB.

i will mark this as solved.

hooray for repair_settings ... i really should look around more before yelling for help but i must love the human interaction, or something.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

:)
Glad you sorted it out.

Just remember to delete the tool immediately after you use it. And as Illori said, you don't need to clone your DB every hour. Just do it when you need to.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

aegersz

i still like the hourly clone idea and i don't mind running repair_settings prior to adding/testing mods.

i'm happy for now, thank you.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

now I'm getting a mix of both old and the correct "." paths.

all my dirs. point to the new system, after I had to reinstate the correct Theme dir. path names. I have made the changes and saved then but it's ignoring the Theme directory section ??!

why would every path be right but the default Themes directories ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kindred

Because you keep copying the settings of the public site... And then the database.
  Basically, you are overdoing it.

A nightly backup of the database and a weekly update of the files is usually good enough
Сл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."

aegersz

good advice. i have changed it to reclone on demand.

you're right, i was overdoing it but at least a database clone gave me some small sense of comfort and security.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: