News:

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

Main Menu

Session path incorrect

Started by CurtisS, February 25, 2019, 01:51:10 PM

Previous topic - Next topic

CurtisS

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!

Arantor

Ask your host what it should be, then we can go through how to change it.

CurtisS

You can see the hosting path in the code I pasted in starting with G:/PleskVhosts...

Arantor

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.

CurtisS

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.

Arantor

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.

CurtisS

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!

Advertisement: