PDA

View Full Version : Problem sending Ajax Post request from external loaded page


Necrophyte
09-07-2016, 06:23 PM
I have an external script that is using vb5 data.
Forums are in /html/forum
The ajax is called from /html/external/member.php
Ajax is in /html/external/ajax.php

So the Ajax script works no problem.
The minute I add:

if (!defined('VB_ENTRY')){define('VB_ENTRY', 1);}
$oldPath = getcwd();
chdir($_SERVER['DOCUMENT_ROOT'].'/forum/core');
require_once('../includes/vb5/autoloader.php');
vB5_Autoloader::register($_SERVER['DOCUMENT_ROOT']."/forum");
$app = vB5_Frontend_Application::init('config.php');
chdir($oldPath);


Remove the above, works again. Gotta be something I'm missing.

EDIT:
Got it.. was missing:
define('CSRF_PROTECTION', false);