update 2.13 to 2.17 moved to new server viewing issues

4 posts by 3 authors in: Forums > CMS Builder
Last Post: October 15, 2012   (RSS)

Re: [vyskocil] update 2.13 to 2.17 moved to new server viewing issues

By gregThomas - October 11, 2012

Hi,

If you've moved the site to a new server then there shouldn't be anyway that your files can access the code on the old server.

The most likely reason that some of the pages are still loading but others arn't is because of this line that loads the viewer functions:

$dirsToCheck = array("/path/to/site/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }


So if CMS Builder can't find the viewer functions in the provided path, it tries going up 3 directories to see if it can find the viewer functions. I think that this method is working for some of your php files but not all of them.

If you go to the code generator and generate any type of page, then replace the line that it generates above with the same line on your PHP site pages, this should fix the issue.

I'm not sure what's causing the dreamweaver issue. Are you editing the files in dreamweaver on the site directly, or are these local copies that you then upload?

Thanks!

Greg
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] update 2.13 to 2.17 moved to new server viewing issues

By vyskocil - October 12, 2012

Yes, I understand that I cannot draw data from the old server. what I was saying is that some of the paths are working and some are not. I just replaced the
require_once "/usr/local/apache/htdocs/shetek.org/cmsAdmin/lib/viewer_functions.php"; with
require_once "/home/shetek/public_html/cmsAdmin/lib/viewer_functions.php";
Some of the pages were still working witht the /usr/local ..... path which I know is the wrong path and should not work which is what got me wondering. .

and now that I have the updated version it appears as though I need to change all the pages to
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/shetek/public_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."); }

And that should solve my problems. Is that correct?

Re: [vyskocil] update 2.13 to 2.17 moved to new server viewing issues

By Jason - October 15, 2012

Hi,

Yes, that should take care of that issue for you. Please let us know if you have any other questions.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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