installation woes

A place for users and developers of the Xataface to discuss and receive support.

Postby amwassil » Mon May 01, 2006 2:00 pm

After getting the prototype Dataface and frontend working just fine, wouldn't you know when I try to setup the live site installation problems popup.

I first got the mySQL database table setup correctly. I then set permissions on the Dataface template directories. When I attempted to run dataface_info.php and I got the following error:

Warning: file_get_contents(/www/xxx/xxx.com/htdocs/version.txt): failed to open stream: No such file or directory in /www/xxx/xxx.com/htdocs/dataface_info.php on line 36

Someone else installed the files, directly into the root directory, so the path to Dataface is www/xxx/xxx.com/ AND the file "version.txt" was missing. So I grabbed the one off the prototype to get past this error.

I reloaded and got the "INSTALLED CORRECTLY" blurb from "dataface_info.php".

I then tried to run Dataface using the default "index.php" and got the following error:

Warning: main(SQL/Parser.php): failed to open stream: No such file or directory in /www/xxx/xxx.com/htdocs/Dataface/Table.php on line 38

Fatal error: main(): Failed opening required 'SQL/Parser.php' (include_path='.:/www/xxx/xxx.com/htdocs/lib:/usr/local/lib/php') in /www/xxx/xxx.com/htdocs/Dataface/Table.php on line 38

What do you make of all this? I had none of these problems when I installed the prototype.

Sincerely, Michael Wassil
amwassil
 
Posts: 30
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon May 01, 2006 3:04 pm

Hi Michael,

I would be first suspicious of the fact that the version.txt file was missing. Possibly other files are missing too?

Also, make sure that you have updated the paths to Dataface in your application's index.php file (and any other places where you "require" dataface.

Also double check permissions to make sure that these files are readable.

Hope this helps.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby amwassil » Tue May 02, 2006 10:51 am

Steve,

Thanks. I had the guys in charge of the live site unpack all the files into another directory and I was able to get past the previous errors. I set up my DatafaceProject subdirectory, created my conf.ini and index.php files, created my tables and TableName subdirectories, and uploaded my fields.ini and valuelists.ini. Now when I attempt to run my index.php I get the following error:

Warning: Smarty error: unable to read resource: "Dataface_TableView.html" in /www /xxx /xxx .com /htdocs /src /dataface /lib /Smarty /Smarty .class .php on line 1088

Dataface/TableView.html is there and set to -rw-r--r--

directory structure is: http: / /xxx .xxx .com /src /dataface /DatafaceProject /

Here's my index.php file:

< ? p h p
require_once '../dataface-public-api.php';
df_init(__FILE__, 'http: / /xxx .xxx .com /src /dataface');
$app =& Dataface_Application::getInstance();
$app->display();
? >

I noticed that htdocs/ directory in the error message and tried the following in my index.php, but it didn't work either, and generated the same error as above:

< ? p h p
require_once '../dataface-public-api.php';
df_init(__FILE__, 'http: / /xxx .xxx .com /htdocs /src /dataface');
$app =& Dataface_Application::getInstance();
$app->display();
? >

Any ideas? The "real" path is not what shows on the browser location bar, but it does show in the error message. I wonder if this could be causing the problem? I just sent you the real path and the browser location bar via email. Thanks.

Michael Wassil
amwassil
 
Posts: 30
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue May 02, 2006 11:29 am

OK.. i still think this is probably a permissions issue. 644 is sufficient for most of the files, but directories need to be 755 (or at least readable and executable by the web server... this is necessary for apache to be able to traverse the directories and get directory listings, etc...).

This doesn't appear to be the issue yet, but make sure that the Dataface/templates_c directory is writable by the webserver.

Finally, your first attempt for the index.php file was correct. The second parameter for df_init() is the URL to the dataface directory - not the path. You should be able to type that url in a web browser and append /dataface_info.php to and see the dataface info page. If you cannot, then the path is incorrect. This URL will not cause any PHP errors anyways since it is only used for including Javascripts and CSS stylesheets on the client side. I.e., your problem is somewhere else.

Hope this helps

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby amwassil » Tue May 02, 2006 12:41 pm

>> OK.. i still think this is probably a permissions issue.

As an experiment I set the permissions on both templates and templates_c to 755 and got passed the previous Smarty.class.php on line 1088 error, but generated a whole host of other errors, one of which was a permissions error. I then set both files to 777 and the app now runs. I tried a few other permission settings, but it only seems to work with 777.

Thanks for your input. We are now off to stage two!

Michael Wassil
amwassil
 
Posts: 30
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue May 02, 2006 1:19 pm

Hi Michael,

Good to know that it's working now. The Dataface/templates directory only needs 755. The Dataface/templates_c needs 777 (or the web server needs write permission).

If this is a shared server it is a much better idea to give web server write permission to this folder without making it 777. Common ways to do this is to:
a) Make the web server user the owner of the directory
b) Make a group of which the web server user is a member, and make the directory group to that group. Then set the directory permissions to 775
c) Use Access Control Lists if your file system supports them.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved