Page 1 of 1

permissions/ApplicationDelegate - Cannot modify header infor

PostPosted: Tue Jul 22, 2008 12:40 pm
by brice
Hi,

I am working on tutorial (very good to start on)
I have a little error on "permissions"
- i Have created ApplicationDelegate.php, users table and modified conf.ini
- in the file "ApplicationDelegate.php" i have added the code given by your web site.

But i have those messages after loading up the application

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\xataface\mysitedataface\conf\ApplicationDelegate.php:2) in C:\xampp\htdocs\xataface\Dataface\AuthenticationTool.php on line 280

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\xataface\mysitedataface\conf\ApplicationDelegate.php:2) in C:\xampp\htdocs\xataface\Dataface\AuthenticationTool.php on line 292

I made some tests and the messages disappear when i only have those lines in ApplicationDelegate.php

<class>getLoggedInUser();
echo "user : $user";
//if(!isset($user))return Dataface_PermissionsTool::NO_ACCESS();
}
}
?>

if i delete "//" in front of "f(!isset($user))" the problem appear again

i have searched on the forum but no people have got same issue

regards

PostPosted: Tue Jul 22, 2008 2:09 pm
by shannah
The most likely cause of this error is whitespace in your Application delegate file before the opening <?php tag or after the closting ?> tag.

-Steve

PostPosted: Sun Jul 27, 2008 6:55 pm
by brice
After many tests and hours , i have deployed your application on an other computer with succes
I have found the reason of my issue on "permissions"
Your ApplicationDelegate.php example is starting by :
<?
/**
* A delegate class for the entire application to handle custom handling of
* some functions such as permissions and preferences.
*/
class conf_ApplicationDelegate {
etc ..

I have searched on forum and i saw many issues come from tag in php files
And it's my problem :
After replacing "<?" by "<?php" the issue disappear

You should modified the tutorial ?

(sorry for my french-english)

PostPosted: Wed Jul 30, 2008 4:19 am
by brice
The problem have disappeared On my first computer where i have identified issue.. i don't know the reason because i changed nothing
Then Tag "<?>" it's not the cause.;. sorry for asking your help for nothing

(sorry for my french-englis)