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.

Fix Parser Error

edited April 2016 in Vanilla 2.0 - 2.8

How can I fix this error?

I download PHP jsConnect client library,

Here is my test url: test.php which have this:

<?php echo"<a href='http://myforum.com/?p=/sso/index.php'&gt; LINK TO FORUM" ?>

When user press link it redirects to my forum page specified to /sso/index.php which it contains this:

<?php
header('Content-Type: application/javascript');
$message = "THIS IS A TEST TO KNOW IF THIS FILE IS BEING EXECUTED";
echo "alert('$message');";
require_once dirname(FILE).'/functions.jsconnect.php';
// 1. Get your client ID and secret here. These must match those in your jsConnect settings.
$clientID = "99999999";
$secret = "999999999";
// 2. Grab the current user from your session management system or database here.
$signedIn = true; // this is just a placeholder
// YOUR CODE HERE.
// 3. Fill in the user information in a way that Vanilla can understand.
$user = array();
if ($signedIn) {
// CHANGE THESE FOUR LINES.
$user['uniqueid'] = '1122334455';
$user['name'] = 'John Martin';
$user['email'] = 'john.martin@gmail.com';
$user['photourl'] = '';
}
// 4. Generate the jsConnect string.
// This should be true unless you are testing.
// You can also use a hash name like md5, sha1 etc which must be the name as the connection settings in Vanilla.
$secure = false;
WriteJsConnect($user, $_GET, $clientID, $secret, $secure);

And also in /sso folder there is functions.jsconnect.php with the same code of here https://github.com/vanilla/jsConnectPHP

Can anybody tell me what's wrong with my code? I believe that functions.jsconnect.php is correct, and I think that index.php is the problem, but really I have been blowing my mind trying to solve this but I can't get any answer, someone give me some advices and I will give my best to understand it

Aditional information:
PHP Version: 5.3.17
Vanilla version 2.2

ANY KIND OF HELP IT WOULD BE VERY APPRECIATE

oet.png 160.5K
Sign In or Register to comment.