Advertisement:

Author Topic: Session path incorrect  (Read 900 times)

Offline CurtisS

  • Semi-Newbie
  • *
  • Posts: 23
Session path incorrect
« on: February 25, 2019, 01:51:10 PM »
Hi gang,
I have been seeing A LOT of errors in my Error Log that refer to the session path being incorrect. See below:
--
2: session_save_path(): open_basedir restriction in effect. File(D:\Hosting\2012621\html\Temp\php\session) is not within the allowed path(s): (G:/PleskVhosts//huntron.com\;C:\Windows\Temp\)Apply Filter: Only show the errors from this file File: G:/PleskVhosts/huntron.com/httpdocs/forum/Sources/Load.php
Line: 2424
--
I did look at the Load.php and the session_path is set to an old path (highlighted in bold above) used before we migrated to a new server at GoDaddy. I tried changing it manually but the error remains. Problem could be that I don't know the exact path to use.
Here is the Load.php code:
--
session_save_path('D:\\Hosting\\2012621\\html\Temp\php\session'); // This is my godaddy cpanel Absolute Hosting Path.
--

Any input on how to change this path?
Thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,849
    • StoryBB/StoryBB on GitHub
Re: Session path incorrect
« Reply #1 on: February 25, 2019, 01:52:51 PM »
Ask your host what it should be, then we can go through how to change it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline CurtisS

  • Semi-Newbie
  • *
  • Posts: 23
Re: Session path incorrect
« Reply #2 on: February 25, 2019, 01:55:21 PM »
You can see the hosting path in the code I pasted in starting with G:/PleskVhosts...

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,849
    • StoryBB/StoryBB on GitHub
Re: Session path incorrect
« Reply #3 on: February 25, 2019, 02:01:21 PM »
I can see the hosting path, yes, but they may have allocated a specific folder within that for your session data. If that is the hosting area, you do not want to drop everything in to the top level folder.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline CurtisS

  • Semi-Newbie
  • *
  • Posts: 23
Re: Session path incorrect
« Reply #4 on: February 25, 2019, 02:14:47 PM »
See what you mean. Guess it's a call to GD and waiting on hold for ??? .
I wonder is I could create a path myself? Is the only way to change the session path by manually editing the Load.php file? I don't see any method in the SMF Server settings.
Thanks for your help.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,849
    • StoryBB/StoryBB on GitHub
Re: Session path incorrect
« Reply #5 on: February 25, 2019, 02:17:45 PM »
I would actually assume it is configured by a php.ini file somewhere in the account; SMF doesn't mandate any session paths in its code, because that should be taken care of at the PHP configuration level itself (SMF just hands it off to PHP if you're not using database based sessions)

All the more reason to ask GoDaddy about it - though honestly we never encourage users using GoDaddy, we've seen too many cases where incompetence on their site has damaged sites almost to the point of no repair.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline CurtisS

  • Semi-Newbie
  • *
  • Posts: 23
Re: Session path incorrect
« Reply #6 on: February 25, 2019, 03:05:02 PM »
Okay, found the problem.
By comparing to a backup copy of Load.php I found there were two lines of code that specified a host path. These were not needed, I deleted them and the errors in the log are gone. The forum had never stopped working but the error log had over 10000 entries and I was wondering what was going on.
Thanks again for your help, Arantor!