Page 1 of 1

PostPosted: Wed Sep 19, 2007 1:40 am
by standr
Hi there

Please check out www.instructionaldesign.co.uk/cf

I think I followed the install instructions OK. Dataface certainly sees my database and allows me to interact with it. However, I have this immediately above Dataface and something similar immediately below:

Warning: session_start() [function.session-start]: open(/tmp/dataface/sess_731c5f1a1429005b734f5db44963cecd, O_RDWR) failed: Permission denied (13) in /home/instruct/public_html/dataface/Dataface/Application.php on line 559

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/instruct/public_html/dataface/Dataface/Application.php:559) in /home/instruct/public_html/dataface/Dataface/Application.php on line 559

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/instruct/public_html/dataface/Dataface/Application.php:559) in /home/instruct/public_html/dataface/Dataface/Application.php on line 559

What shld I do to fix this?

Many thanks

Richard

PostPosted: Wed Sep 19, 2007 12:34 pm
by shannah
There are 2 possibilities:
1. You don't have full write permission to your session save dir.
2. You have safe mode turned on.

First find out if safe mode is on.
You can do this by creating a file: named phpinfo.php with the contents:

and then point your browser to the file.
Look at the line that says "Safe Mode". If it says "On", then safe mode is on. Dataface likes to create its own subdirectories for things like caching templates and sql queries, and for storing sessions. Safe mode unfortunately foils our efforts to create these directories by automatically changing the permissions on them to disallow writing to them - which would cause an error like this.

You can get around this by manually creating the directories in question. For example, when you see an error like:
open(/tmp/dataface/sess_731c5f1a1429005b734f5db44963cecd, O_RDWR) failed: Permission denied

Try to actually create the directory /tmp/dataface and make it writable (e.g. chmod 777 /tmp/dataface). Dataface will, at most, try to create 4 or 5 directories for these things, so if you create them once, you should be fine.

Now, if safe mode is Off, then the problem is likely just that you don't have permission create directories in your tmp dir. To get around this, you can create your own session save directory by adding the following to the beginning of your index.php file:

$sessionpath = session_save_path('/path/to/my/dir');

And make sure that you have made /path/to/my/dir writable by the web server. E.g. chmod 777 /path/to/my/dir

Hope this helps.

Please let me know which solution works for you so that I can incorporate it into the documentation.

Best regards

Steve

PostPosted: Thu Sep 20, 2007 3:14 am
by standr
Hi Steve

Many thanks for that. Safe Mode was 'off' already - so that wasn't it.

I created my own session save directory and added the code to my index.php file and everything now works fine.

Thank you!

Richard