News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Changing Path Using Repair_Settings.php

Started by NeedIt, November 19, 2014, 02:19:46 PM

Previous topic - Next topic

NeedIt

I'd like to change all the pages of the forum to www.example.com.  I've heard that I need to do that with repair_settings.php.  I've looked at this page:

http://wiki.simplemachines.org/smf/Repair_settings.php

Reading that page really doesn't give me the kind of newbie info that I need to do this though I think.  (NOTE:  I am on a Windows machine.)

Now this page said that I had to these steps:

http://www.simplemachines.org/community/index.php?topic=457710.0

1.  Run repair_settings.php to correct the paths.

2.  Then go into the theme settings in the Admin CP to correct the paths of your themes.

So my questions are:

a) Is this still the correct way to do it?
b) Where is repair settings do I adjust the path to include the www's?
c) Are there any links that spell out how to do this in more detail?
d) In the above link, no one could log out of the forum.  Is this a common problem?

Thx again for any help...

Arantor

a) Yes.
b) As that page actually says: You can download the Repair Settings Tool (repair_settings.php) from the tools section of the SMF Downloads center.
c) Not really since that's the definitive documentation.
d) Yes it can be if the paths are wrong since cookies are generally subdomain (like www. vs non www) dependent

NeedIt

You mean cookie's on the clients or user's machine, right? 

Basically, they may have to clear their cookies' out is the gyst of  the issue?

And sorry to ask a stupid question, but how do you run a php file on a Win machine?  I have Plesk access.

Arantor

Cookie controls session which controls ability to log out.

Clearing cookies manually should not generally be necessary.

Running PHP files on a Win machine... exactly the same way you NORMALLY run PHP files on a Win machine, seeing how SMF is all PHP files. Drop the file into the same folder as your SMF installation and browse to it.

NeedIt

Quote from: Arantor on November 19, 2014, 02:27:20 PM
Cookie controls session which controls ability to log out.

Clearing cookies manually should not generally be necessary.

Running PHP files on a Win machine... exactly the same way you NORMALLY run PHP files on a Win machine, seeing how SMF is all PHP files. Drop the file into the same folder as your SMF installation and browse to it.

Noted.  Thanks again.

NeedIt

Okay, sorry to ask more questions, but I want to understand what I am doing before I push any buttons.  I'm getting a decent amount of traffic on the forum now and don't want to screw things up.  In the original thread above that I was looking at, here is the general thing that I am supposed to do:

"Run repair_settings.php to correct the paths. (What is repair_settings.php?)

Then go into the theme settings in the Admin CP to correct the paths of your themes."

NOTE:  I am using the default theme; I am on Windows.

1.  So what "paths" am I supposed to correct?  Just every path that I see?  Is this obvious?  The reason I ask this is that I see many path settings when I go into the admin panel of my forum such as

From a directory on the server:
Base path to Themes directory:
Base URL to the same directory:

2.  One of the common things that it looks like I am supposed to change is this:

C:\Inetpub\vhosts\example.com\httpdocs\forum\Themes\

Am I supposed to change it to this?

C:\Inetpub\vhosts\www.example.com\httpdocs\forum\Themes\

3.  After I do the above, I then should go in and change the Preferred Domain to www.example.com, right?  And then the forum should magically work right?

4.  One thing I am confused about is if I am supposed to move or copy files for this?  I don't need to make a copy of anything, right?

Illori

you dont add www to the file paths unless the location has changed to www.

NeedIt

Quote from: Illori on December 07, 2014, 06:26:41 AM
you dont add www to the file paths unless the location has changed to www.

Okay, I am so sorry to be ignorant, but how do I change the location from

C:\Inetpub\vhosts\example.com\httpdocs\forum\Themes\

to

C:\Inetpub\vhosts\www.example.com\httpdocs\forum\Themes\

on a Windows machine?

I just know what it looks like from ftp and it takes me immediately to the "root" folder which has the httpdocs as a sub folder, so I guess it is C:\Inetpub\vhosts\example.com\.  I guess what I am asking is if I switch my Preferred Domain in Plesk to www.example.com, will that actually change
the path to C:\Inetpub\vhosts\www.example.com\httpdocs\forum\Themes\.  In other words, do I that step first?



Illori

so you just want your forum url to have www in front of it? just change the paths using repair_settings.php to the www url and do not change anything else. the location of the files on the server will NOT change.

Kindred

I do not think you need to change PATHs to add the www to the domain... your would need to change the forum URLs
Сл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."

Illori

Quote from: Kindred on December 07, 2014, 11:07:49 AM
I do not think you need to change PATHs to add the www to the domain... your would need to change the forum URLs

opps your right, change the URLs not the path

NeedIt

Thanks guys.  But I have  a question.  I assume when I run repair_settings.php that there will be many paths that can be changed.  For example, when I got into these admin settings of my forum, there are all these different paths available to change.  (See below.)  Which one of these is the one that I actually change when I run repair_settings?

And I'm sorry to get so specific, but I really don't want to screw up the forum.  I have put a TON of work - hours and hours of postings and research - into the forum and don't want to create an outage.

CONFIGURATION/DATABASE and PATHS:
Forum URL
SMF Directory
Sources Directory
Cache Directory

CONFIGURATION/THEME SETTINGS
Base path to Themes directory:
Base URL to the same directory:

Kindred

unless you ACTUALLY moved the forum from one directory or from one server to anoher, you don't want to change ANY **PATHS**

You stated that your only intention is to make it go to the www version of your URL? Right?
If so, then you would change the forum URL(s)... (not PATHS!!!!) to include the www.

You'll probably need an htaccess redirect to bound people to the www version as well.

Сл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."

NeedIt

Quote from: Kindred on December 07, 2014, 12:09:41 PM
unless you ACTUALLY moved the forum from one directory or from one server to anoher, you don't want to change ANY **PATHS**

You stated that your only intention is to make it go to the www version of your URL? Right?
If so, then you would change the forum URL(s)... (not PATHS!!!!) to include the www.

You'll probably need an htaccess redirect to bound people to the www version as well.

I am sorry, but I have no idea what you mean here.  I have not moved anything.  Yes, I want the forum to go www.example.com/forum instead of example.com/forum.  What happened is that when I changed the preferred domain in Plesk to www.example.com, I could no longer log into my forum.  I could still see the thread, but I could not log in.  So something needs to be tweaked in order for me to be able to change my preferred domain.

You wrote "If so, then you would change the forum URL(s)... (not PATHS!!!!) to include the www"  Where do I do that if not through repair_setting.php  then?  There is no htaccess file on a Win server right?  So I'm not sure what you mean here.

Arantor

So you actually moved the files, did you?

NeedIt

Quote from: Arantor on December 07, 2014, 12:29:55 PM
So you actually moved the files, did you?

No, I did not move any files.  I just changed the Preferred Domain setting in Plesk and that was it.  I don't think on a Win machine it makes sense to move my files, i.e. I don't think there is anywhere to move them to in the case of this kind of www change.  Let me call my hosting company.  Some of the reps are pretty savvy and may understand how to handle this.

Arantor

Wait, now we're all confused.

Do you want to move from example.com/forum to example.com/ or from example.com to www.example.com?

The former requires moving the files (which is what Kindred thought you were doing), the latter probably does not.

Kindred

You would all use repair_settings.php

Repair settings allows you to fix paths AND urls ...   But oaths are different from urls. And the stuff you were mentioning before was all paths. You don't need to change paths. You need to change urls,


This is one reason that I despise plesk...
Сл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."

NeedIt

Quote from: Arantor on December 07, 2014, 01:37:48 PM
Wait, now we're all confused.

Do you want to move from example.com/forum to example.com/ or from example.com to www.example.com?

The former requires moving the files (which is what Kindred thought you were doing), the latter probably does not.

Okay, I'm sorry.  I left out the forum folder above.  I want to go from example.com/forum to www.example.com/forum

By any miracle, can I just do the following?

a)  Change the Preferred Domain to www.example.com in Plesk.
b) Change the forum URL under CONFIGURATION/URLS and DATABASE PATHS but leave all the other URLs the same

I will respond to Kindred's comment above and it ties into this.

NeedIt

Quote from: Kindred on December 07, 2014, 01:45:16 PM
You would all use repair_settings.php

Repair settings allows you to fix paths AND urls ...   But oaths are different from urls. And the stuff you were mentioning before was all paths. You don't need to change paths. You need to change urls,


This is one reason that I despise plesk...

See what I wrote Arantor above for clarity.

Okay, I don't need to change the paths almost for sure I believe.  I asked the resp and when I change the preferred domain, it's all virtual, i.e. no physical folders or anything get changed.  So it is just URLs that I need to change.  By any chance can I do this simply by adding www. in front of the forum URL setting in CONFIGURATION/DATABASE and PATHS per what I asked Arantor above?

Arantor

In theory, yes. Try it.

Just change URLs though. DO NOT CHANGE PATHS.

NeedIt

Okay, I am only seeing two URL's that I would have change in the settings:

The overall forum URL and the theme URL, so if you can think of any more, let me know.

Also, there is no chance I could completely lock myself out of my own forum, right?

NeedIt

Okay, guys, I did the above and I think it worked.  Now the only catch is this.  If I go into Configuration/Theme Settings/Theme Settings Overview, it says:

Theme Directory Templates:  (warning this path is not correct)

Base Path to Themes Directory:  C:\Inetpub\vhosts\example.com\httpdocs\forum\Themes
Base URL to the Same Directory: http://www.example.com/forum/Themes

What I am wondering is if the warning this path is not correct is an issue?  I can't remember what it said before.  I was able to login and post, though, so I don't know how I could that if the Theme Directory was messed up?  Other guys seem to be online and posting, so I think overall everything is okay.

NeedIt

Hope you guys don't mind me bumping this, but I want to make sure I am okay with the above warning message and, if not, what I can do to correct it.  The forum is humming along, so, again, overall things seem great.  But I don't want an underlying issue to sit there festering.  (See above post.)

Deaks

NeedIt do you still need help with this?

I have marked this as solved for now if you still need help please update us to what you have tried
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

NeedIt

Quote from: Runic on December 19, 2014, 10:59:35 PM
NeedIt do you still need help with this?

I have marked this as solved for now if you still need help please update us to what you have tried

I do need some help.  Will gather the details and post tomorrow.  Thank you for asking.

Advertisement: