Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
External Authentication - how do I solve bonk - blank page error*
kogan007
New
Hey, on my site I'm using this code
define('APPLICATION', 'Vanilla'); define('APPLICATION_VERSION', '2.0.16'); define('DS', '/'); define('PATH_ROOT', 'forum'); ob_start(); require_once(PATH_ROOT.DS.'bootstrap.php'); ob_end_clean(); // clear any header output from vanila $Session = Gdn::Session(); $Authenticator = Gdn::Authenticator(); if ($Session->IsValid()) { $Name = $Session->User->Name; echo "You are logged in as $Name"; }else{ echo "You are not logged in"; }
When I put it my page goes blank and the title says bonk. Can someone help?
Tagged:
0
Comments
I can help you with bonk.
http://vanillaforums.org/docs/errors
I can also suggest when posting code - mark it (select it and press the C on the buttonbar).
this will format it - so it is readable.
conversely you could try three tildes above and below your code.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hey, when I do the authentication thing, the page goes blank and the title is bonk
I just have tangential suggestions -
great its more readable, I don't have an answer.
I also suggested how to get more information instead of bonk when you get an error.
you could put some var_dumps in to test as soon as you figure out what the actual bonk error.
You also might consider upgrading to 2.0.18.8 unless you already added the security patches some other way.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Im using 2.0.18.8 and no information is there except blank page. The code I used worked before possibly another version but now no luck.
You should call the dispatcher and its methods. You can look at the bottom of index.php for an example.
Add Pages to Vanilla with the Basic Pages app
I tested your code in vanilla 2.0.18.8 on my local host -
It worked fine. At least this code and displayed whether I was logged in or not.
I have my forum var/www/vanilla
I put your program in /var/www
However, I am unclear why you don't put the debugging info in your config.php as the link to bonk errors suggested.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I'M sorry, but without the debugging information that peregrine requested, I have to close this topic. Follow his advices, read the documentation and prepare to upgrade to 2.0.18 when everything is working again.
There was an error rendering this rich post.
@underdog
can you change title back to original
"External Authentication - how do I solve bonk - blank page error"
to find the discussion easier.
but that shouldn't matter anyway in the define statement.
but the php error checking could be turned off.
as well as
or if that doesn't work you can
ini_setting the error checking.
http://php.net/manual/en/function.error-reporting.php
and bonk errors
add this:
$Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
http://vanillaforums.org/docs/errors
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
If it is saying bonk then it is reaching the forum. If you wish to read the debug You have to disable buffer clearing like so:
then turn on debug like peregrine says.
grep is your friend.
I think something may be disabled on my host because nothing thats been suggested has worked. Any ideas?
It doesn't work that way ... after you have read the docs, you know that you have to add a line in your conf/config.php and that will give you a detailed error page
Also show your new index.php after you have made all the suggested changes
There was an error rendering this rich post.