close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Framework file not found but only in root

Thread began 3/15/2011 11:30 am by webassist412767 | Last modified 5/29/2014 11:44 am by Jason Byrnes | 4722 views | 18 replies |

webassist412767

Framework file not found but only in root

Created a site with Framework Builder and tested on both local server and hosted server and works fine until the site is put into the root directory. Then the following error is produced.

Framework file not found: /var/www/vhosts/<somedomain.com>/httpdocs/index.php

Whole site works as expected on same server when in a sub directory ie. somedomain.com/dev/, it is only when in the root directory it falls over. If the root is changed to be the /dev directory the same error is produced, so seems to not like being in the root.

Here are the first few lines of the framework.php file.

<?php
class WA_Include {
public function __construct( $fileName) {
$this->Start_Dir = getcwd();
$this->File = $fileName;
$this->BaseName = basename($fileName);
$this->Reset = array();
$this->Added = array();
$this->CleanName();
$this->Dir = dirname($fileName);
$this->Body = "";
$this->Head = "";
$this->HTML = "";
$this->Title = "";
$this->Above = "";
$this->Links = array();
$this->Styles = array();
$this->DocType = "";
$this->Content = "";
$this->MetaTags = "";
$this->MetaKeywords = "";
$this->MetaDescription = "";
$this->MetaContentType = "";
$this->MetaKeywords_Content = "";
$this->MetaDescription_Content = "";
$this->MetaContentType_Content = "";
$this->EditableRegions = array();
if (!file_exists($this->Dir)) {
die("Framework file not found: ".$fileName);
}
chdir($this->Dir);
ob_start();
}

I am assuming this file is where the issue has arose. If anyone can point me in the right direction it would be appreciated. Framework version 1.0.1 and patched from CS5 DW.

Thanks Ian

Sign in to reply to this post

Jason ByrnesWebAssist

when you add a plugin to a page, it uses a document relative path to the plugin page:


for example:
$WA_aboutus_1300209542461 = new WA_Include("aboutus.php");

if you move the page that is calling the plugin page to another directory, you need to adjust this path.


lets say for example sake that I have a folder in the root of my site called test. In ths folder, i have the files index.php and aboutus.php

i add aboutus.php as a plugin to the test.php page. the code to attach the aboutus.php file will look like the code above.

If i now move the index.php file to the root of the site, I need to adjust the path to the about us file:
$WA_aboutus_1300209542461 = new WA_Include("test/aboutus.php");

Sign in to reply to this post

webassist412767

Relative paths not changes.

Thank for the prompt reply.

I understand the relative paths but nothing has changed, the whole site is just moved so relative links should remain and in fact do remain the same. The whole site works in any folder position except the root. It is no doubt a file position problem but it only seems to occur in the site root and nowhere else.

To explain:
Our domain www.domain.com is set to point to /httpdocs/ as the root directory.
When developing sites for customers we have a small holding site in this root with a working site and develop the new site in a folder /hold/ and also a development area of /hold/dev/.

The site is created locally and tested then uploaded to the server at /hold/dev/ and /hold/ for client to view before going live. Once working it is moved to the root directory to go live and be call when domain.com is entered in the browser.

The framework site works fine in both hold/ and dev/ it is only when moved to the root at www.domain.com that the error is produced from index.php. The whole directory structure is the same just the entry point changes. We tested it working in sub directories but not the root as did not see this would an issue.

With the site uploaded to either of the sub directories and called from that path ie. hold/ it works fine. If I then change the entry point on the server so the root directory is /hold/ that is you first start at the index.php in that directory the error is produced. If you then again set the root back a level the same folder structure will work without any error. It is only when the index.php is called as the absolute site root that the error occurs. For this reason my logic says the paths are correct as such.

In the simplest form:

index.php
webassist/framework/framework.php
webassist/framework/library.php

index.php has
<?php
require_once( "webassist/framework/library.php" );
require_once( "webassist/framework/framework.php" );
?>

When index.php is called from site root via www.domain.com the error is produced.

If the site is moved with no changes to
/hold/index.php
/hold/webassist/framework/framework.php
/hold/webassist/framework/library.php

or

If the site is moved with no changes to
/hold/dev/index.php
/hold/dev/webassist/framework/framework.php
/hold/dev/webassist/framework/library.php

It will work fine.

This is on a medium size site so is difficult to de-bug with a new (to us) extension so any steer on where to look would be appreciated. It is ready to be handed over to the client. I will try to produce a small test site to see if it is reproduced and put it on a spare domain for testing.

Thanks Ian

Sign in to reply to this post

Jason ByrnesWebAssist

I would need a link where i could see the problem occur and a copy of the page to troubleshoot the issue then.

Sign in to reply to this post

webassist412767

Link

Jason

Thanks for your help - can I have an email address to send you a link and ftp login, for obvious reason cannot post these on an open forum.

Ian

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

webassist412767

First class support

After posting our issue and creating a small test site (2 pages) to reproduce the error, then giving ftp access I was contacted by Ray today by telephone to debug. 30 minutes later fixed - brilliant support.

framework.php file was the problem on our 1&1 server in the UK. It checked for the existing of a file and created an error even though the folder and file exisited. This only occured in the absolute root of the live server, ie. the entry point of the domain. Servers are pretty much vanilla 1&1 dedicated servers (centos5) with Plesk 10.

Ray added a few lines of code to specify the directory before checking and everything is working fine. I'll let Webassist tech give the details to avoid me misleading anyone, but if anyone has the same issue there is a workaround or fix.

A big thank you to Ray for first class support. Contacted and fixed in 24 hours, support don't get any better than that!

Thanks Ian

Sign in to reply to this post

tgrudzien

after a site migration I am indeed also having the same issue with one of the sites (PHP Version 5.2.17) and A similar issue on a new site (PHP Version 4.4.9). Site Cannot fine the framework file. :/

Sign in to reply to this post

Jason ByrnesWebAssist

here is an updated copy of the webassist/framework/framework.php file that should correct the problem

Attached Files
framework.php.zip
Sign in to reply to this post

tgrudzien

It still appears that i am having the same issue. placed file in the correct directory as well as restarting web services (and also the server) the problem still exists. Still receiving the error "Framework File Not Found" in PHP 5.2.17 and "Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in "webserver path"\webassist\framework\framework.php on line 3" in PHP 4.4.9

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...