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
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 (

This is my code of index.php ,

header('Content-Type: application/javascript');
$message = "This alert tests if connection is successful";
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 = "1122334455";
$secret = "abcdefghi";
// 2. Grab the current user from your session management system or database here.
$signedIn = true; // this is just a placeholder
// 3. Fill in the user information in a way that Vanilla can understand.
$user = array();
if ($signedIn) {
$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


Sign In or Register to comment.