Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

How to fix Parser Error

This discussion is related to the Vanilla jsConnect addon.
edited April 2016 in Vanilla 2.0 - 2.3

How can I fix this error?

I have downloaded PHP jsConnect client library, and I have a test URL that is only a link that redirects to (http://myforum.com/?p=/sso/index.php)

This is my code of index.php ,

<?php
header('Content-Type: application/javascript');
$message = "This alert tests if connection is successful";
echo "alert('$message');";
require_once('/functions.jsconnect.php');
//require_once dirname(FILE).'/functions.jsconnect.php';
// 1. Get your client ID and secret here. These must match those in your jsConnect settings.
$clientID = "1122334455";
$secret = "abcdefghi";
// 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'] = '44556677';
$user['name'] = 'John MARTIN';
$user['email'] = '[email protected]';
$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 = true;
WriteJsConnect($user, $_GET, $clientID, $secret, $secure);


PHP Version: 5.3**
**Vanilla Version: 2.2****

I need to log on with the user "John Martin", but when I press the link redirects me to my forum I got Parser Error

oet.png 160.5K

Comments

Sign In or Register to comment.