Posts: 19
Threads: 6
Joined: Aug 2011
2021-07-05, 00:51:38
(This post was last modified: 2021-07-12, 22:27:36 by d2a.)
Hi - I've had a stable GS install for years now and had zero issues, but recently I noticed the site go down.
I believe the host may have changed some php.ini settings but I can't run phpinfo() to find out (restricted), and can't seem to diagnose the problem myself so thought I'd ask here.
PHP version: 7.4.19
GS version: 3.3.15
Errors seem to revolve around relative and absolute paths
Fatal error: require_once(): Failed opening required '/admin/inc/configuration.php' (include_path='.') in inc/common.php on line 132
Actual path to admin folder on server is something like /services/webpages/x/x/mysite.com/public/admin/
I think it's something simple and I'm being an idiot - put me out of my misery? Thanks
P.S. also see the same issues with a fresh install of 3.3.16
Posts: 515
Threads: 21
Joined: Feb 2019
Did anything change on the host ?
a) maybe moved or renamed a folder
b) changed file permissions
Turn on debug mode in the get-simple cms and check any error message
Open gsconfig.php
Search for this line: #define('GSDEBUG', TRUE);.
Remove the #
Posts: 19
Threads: 6
Joined: Aug 2011
(2021-07-05, 01:41:17)Felix Wrote: Did anything change on the host ?
a) maybe moved or renamed a folder
b) changed file permissions
Turn on debug mode in the get-simple cms and check any error message
Open gsconfig.php
Search for this line: #define('GSDEBUG', TRUE);.
Remove the #
Hey Felix - nope. No changes, no permissions changes. Last modified dates were in most cases several months old. I'm going to check a fresh install of 3.4 and see if there's any difference... thanks
Posts: 19
Threads: 6
Joined: Aug 2011
OK - so with a fresh 3.4 install errors are similar:
Warning: include_once(./admin/inc/configuration.php): failed to open stream: No such file or directory in inc/common.php on line 447
Fatal error: require_once(): Failed opening required './admin/inc/cookie_functions.php' (include_path='.') in inc/common.php on line 717
so i'm pretty sure it's a paths issue.
Posts: 515
Threads: 21
Joined: Feb 2019
Quote:so i'm pretty sure it's a paths issue
In that case the answer could be found here
https://phpdelusions.net/articles/paths
What hosting are you using ?
Posts: 19
Threads: 6
Joined: Aug 2011
(2021-07-05, 03:31:12)Felix Wrote: What hosting are you using ?
I'm on a basic shared hosting supplied by BT in the UK. Very limited support.
I may just have to deep dive the path and hack a fix into GS but so frustrating to have a stable working environment crippled by a server change and not be able to find the cause...
Posts: 19
Threads: 6
Joined: Aug 2011
OK - after a ton of head smashing I've got it back up and working. Not in any way elegant but that's a luxury I can't afford right now. Basically had to hard code the value of GSROOTPATH, rahter than rely on the function get_root_path()
define('GSROOTPATH', '/services/webpages/x/x/mysite.com/public/');
Couldn't see any issue with the function itself but something in the new environment didn't like it. Once I'd made the change and fixed a few hardcoded paths in the theme, all back to normal.
Thanks for your time and for a great CMS