Page 1 of 1

Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Tue Jul 22, 2008 8:13 am
by pepo80
Hi,

after the mysql's version problem i move my site into another hosting (php 5 and mysql 5.xx)

and i obtain this error (after create the db and the tables follow the install.php instructions):

Code: Select all
Fatal error: Class 'Dataface_Error' not found in xxxxx/xxxx/xxxx/xxx/public_html/dataface/Dataface/Application.php on line 620


the path xxx/xxx/ it's hide for security reason

i obtain the same error if i try php4 and mysql 5...

PostPosted: Tue Jul 22, 2008 3:43 pm
by shannah
Check the file permissions on the files you copied over. Also make sure that all of the files copied over ok.

This particular error is caused by either:
1. the file Dataface/Error.php is missing
or
2. the file Dataface/Error.php is unreadable by the web server (i.e. the permissions are something like 0700).

-Steve

PostPosted: Thu Jul 24, 2008 8:06 am
by pepo80
First of all: thank's for support

I have the file error.php in dataface\Dataface\error.php. The permission of files and folders in all web spaces are 644 (automatic assigned by hosting-server) i must change this in 755 ? for all files and folders ?

Many, many 10x...

PostPosted: Fri Jul 25, 2008 4:18 pm
by shannah
I discovered that this is actually bug which pops up with certain server configurations. I have applied the fix in SVN.

Download this file
http://weblite.ca/svn/dataface/core/tru ... cation.php

And replace your current dataface/Dataface/Application.php with it, and it should get it working.

The problem is that Xataface can't find your server's temp directory (usually on unix it is /tmp, but other configurations may have different locations.

-Steve

PostPosted: Mon Jul 28, 2008 9:30 am
by pepo80
Hi Steve,

tenks for all the replay...

I have download the new version of application.php and upload them to the folder ... now i see an alternative errors:

Configuration Required

Dataface was unable to create the directory '/tmp/php/sess4//dataface' to store its session files.
Possible reasons for this:

* The script does not have permission to create the directory.
* The server is operating in safe mode.


i try library db on a free web server. I can't change safe-mode config, i have only ftp access and a little panel where i can change php version...

i have created the /tmp/php/sess4/dataface folder, and assign 777 permission (for any folder)... but the error persist...

There's a solution? Where can i test? (a web server with correct configuration?)

PostPosted: Mon Jul 28, 2008 4:03 pm
by shannah
Hi
Looks like your server is still having trouble finding the temp dir properly. I have made some changes again to Application.php. Try downloading them here

http://weblite.ca/svn/dataface/core/tru ... cation.php

-Steve

PostPosted: Thu Oct 09, 2008 1:21 am
by aidan
Hello Steve & All,

I found this thread because I experienced the same problem. I updated Application.php to the version posted here. It got me past the 1st problem (Fatal error: Class 'Dataface_Error' not found in...) but now I get:

Configuration Required

Dataface was unable to create the directory '/var/lib/php5/5c0d1584db6dca2105873f2314f544c0' to store its session files.
Possible reasons for this:

* The script does not have permission to create the directory.
* The server is operating in safe mode.

Possible Solutions for this:

* Make the /var/lib/php5 writable by the web server. E.g. chmod 0777 /var/lib/php5.
* Manually create the '/var/lib/php5/5c0d1584db6dca2105873f2314f544c0' directory and make it writable by the web server.
* Change the session save path to a directory to which you have write permissions by adding the following to the beginning of your application's index.php file:

session_save_path('/path/to/dir');

* If none of these solves the problem, visit the Dataface forum at http://fas.sfu.ca/dataface/forum and ask for help.

Debugging Information:
On line 675 of file /var/www/vhosts/cultures.cawthron.org.nz/httpdocs/xataface/Dataface/Application.php in function printStackTrace()
On line 1403 of file /var/www/vhosts/cultures.cawthron.org.nz/httpdocs/xataface/Dataface/Application.php in function startSession()
On line 5 of file /var/www/vhosts/cultures.cawthron.org.nz/httpdocs/admin/index.php in function display()


By the way, I do not have shell access to the server, just FTP and Plesk access.

Any help appreciated.

Regards,
Aidan Curran

PostPosted: Fri Oct 17, 2008 8:10 am
by shannah
You may want to check and see if your server runs in Safe mode. Safe mode screws up permissions so Xataface can't run properly.

The error indicates that you don't have write permission to the specified session directory. You could (using FTP) go in and try to explicitly change the permissions to 777. Or you could specify a different session directory in the beginning of the index.php file:
Code: Select all
session_save_path('/path/to/directory/that/you/can/write/to');


-Steve

PostPosted: Sun Oct 19, 2008 3:55 pm
by aidan
Hi Steve,
Safe mode was the problem - I had my hosting company turn off safe mode and it worked fine.

Thanks - Aidan

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Sun May 09, 2010 6:27 pm
by ebookbox
hello Steve

i was also running in Fatal error: Class 'Dataface_Error'
after installation.
after reading this threat
i changed the
/users/myusername/librariandb-0.2/dataface/Dataface/Application.php
with the "new" at
http://weblite.ca/svn/dataface/core/tru ... cation.php
i added to my user dir:
/home/fh/users/i/s/myusername/www/
a temp dir
/home/fh/users/i/s/myusername/www/temp/
("userroot"/temp/)
altered
/users/myusername/librariandb-0.2/index.php
like this
----file:index.php----start
<?php
session_save_path('/home/fh/users/i/s/myusername/www/temp/');
$install = false;
.......following lines not listet.........

and it runs well till to the book list screen
named : books - Dataface Application
on a server at save mod

thanks ebookbox

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Sun May 09, 2010 7:40 pm
by ebookbox
hello Steve

after a bright sunbeam here comes a cloud:

as admin:
after set altering record 1 :A Harmony of Samuel, Kings, and Chronicles
i got this meassages several times (33x repeated):

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/share/pear/Dataface/FormTool/textarea.php) is not within the allowed path(s): (/home/fh/users/i/s/myusername/www:/home/tmp/php) in /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/Dataface/FormTool.php on line 629

start altering
cause:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/share/pear/Dataface/FormTool/static.php) is not within the allowed path(s): (/home/fh/users/i/s/myusername/www:/home/tmp/php) in /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/Dataface/FormTool.php on line 629

Warning: Cannot modify header information - headers already sent by (output started at /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/Dataface/FormTool.php:629) in /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/actions/edit.php on line 188

maybe the colon after www is the reason?

creating a new record is also not possible same reason?

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/share/pear/Dataface/FormTool/static.php) is not within the allowed path(s): (/home/fh/users/i/s/myusername/www:/home/tmp/php) in /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/Dataface/FormTool.php on line 629

Warning: Cannot modify header information - headers already sent by (output started at /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/Dataface/FormTool.php:629) in /home/fh/users/i/s/myusername/www/librariandb-0.2/dataface/actions/new.php on line 156

is it possible to remove the colon after www ?
in order to make it run in save mode !

please ebookbox

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Sun May 09, 2010 8:40 pm
by shannah
Hi. The problem would appear to be the open_basedir restrictions. Why is it looking in the /usr/local/share/pear for Dataface files? Is this a shared server or do you run it? You either need to add /usr/local/share/pear to your open_basedir directories or remove it from your include path.

-Steve

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Sat May 15, 2010 5:30 am
by ebookbox
hello Steve
didn't expect your answer so fast.

shannah wrote:The problem would appear to be the open_basedir restrictions. Why is it looking in the /usr/local/share/pear for Dataface files?


i don't know (i am a lamer) http://en.wikipedia.org/wiki/Lamer

shannah wrote: Is this a shared server or do you run it?


i use it on a shared server in save mode
i am allowed to write/alter files at (my user account only...)
/home/fh/users/i/s/myusername/www/...

shannah wrote:You either need to add /usr/local/share/pear to your open_basedir directories or remove it from your include path.


where is the file to alter?
where is "open_basedir directories" ?
where is "include path"?
is it in the dataface directory or unreachable for me on the server?

thanks for you fast support
ebookbox

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Sat May 15, 2010 8:29 am
by shannah
i use it on a shared server in save mode


Do you mean safe mode? That would be the problem. Xataface won't run in safe mode because it needs to be able to write its cached smarty templates, and safe mode messes with the permissions on this. Safe mode is really a thing of the past and is set to be removed as of PHP 6. Most web hosts now have more reliable security measures at the OS level that render safe mode unnecessary.

-Steve

Re: Post Installation - Fatal error: Class 'Dataface_Error' ...

PostPosted: Wed May 19, 2010 2:23 pm
by ebookbox
Hello steve

i gave Library DB (xataface) a last try, and updated the
/librariandb-0.2/dataface/ directory with the new "xataface-1.2.4" version

i renamed the /xataface-1.2.4/ directory to /dataface/ and copied it to

/librariandb-0.2/ in order to replace /librariandb-0.2/dataface/

no i am able of creating and altering database entries.

The Sun is rising

thanks steve

i am suggesting updating the Library DB download file also.

p.s
by the way is it possible to create a user, who is able to create but not to alter or delete an database entry?