Warning: require_once(... – nothing changed in my setup & I'm getting this error message.

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 23, 2017   (RSS)

By ScottL - May 21, 2017 - edited: May 22, 2017

I've recently started getting this error just out of the blue and it's taken the site down....

Warning: require_once(/home/content/t/a/u/tauk2010/html/cmsAdmin/lib/viewer_functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/68/5496768/html/index.php on line 4

Fatal error: require_once() [function.require]: Failed opening required '/home/content/t/a/u/tauk2010/html/cmsAdmin/lib/viewer_functions.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/68/5496768/html/index.php on line 4

The viewer_functions.php is still in the correct location.

 require_once "/home/content/t/a/u/tauk2010/html/cmsAdmin/lib/viewer_functions.php";

Replaced and tried this...

// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/content/t/a/u/tauk2010/html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

Then got this error:  

session.save_path doesn't exist! (/home/content/t/a/u/tauk2010/html/tauksessions2013)

To change session settings edit /data/settings.dat.php

Suggestion?   Thanks.

By Damon - May 23, 2017

Hi Scott,

We are back from a long weekend. Monday was a holiday in Canada.

Warning: require_once(/home/content/t/a/u/tauk2010/html/cmsAdmin/lib/viewer_functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/68/5496768/html/index.php on line 4


Based on this error and the server path referenced it looks like your hosting account now has a different server path.

You indicated that the view path was this,

 require_once "/home/content/t/a/u/tauk2010/html/cmsAdmin/lib/viewer_functions.php";

which is different.

Log into CMS Builder and go to Admin > General Settings to see what is set Program Directory and Website Root Directory.

If your host moved your hosting account to another machine or folder, you will need to update the viewer path with the new server path and everything should work again.

Let me know if you have any questions and if this resolves the error.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By ScottL - May 23, 2017

Thanks Damon.

You are correct.   No idea why the host changed server paths.   I was only able to login to CMS Builder after updating settings.dat.php.  Now I'll have to go thru all the php files and update the server path.

Thanks!

Scott