0

Is it possible to use SHORTINIT for AJAX called php file and use a Wordpress shared $_SESSION global in it?

I have this thus far:

ini_set('html_errors', 0);
define('SHORTINIT', true);

require 'wp-load.php';

$_SESSION...

...and it really made that file load in a snap, but with SHORTINIT i can't seem to retrieve that file's $_SESSION variables in Wordpress. Commenting it out enables session sharing.

2
  • WP core doesn't use sessions, how exactly it is implemented in your case?
    – Rarst
    Commented Mar 18, 2014 at 16:28
  • I'm using 'init' wordpress function in functions.php to session_start. And that seems to initilize it in plain php also, via wp-load.php. I should have also mentioned that this wordpress is installed in subfolder and plain php ajax file is in the root of the subfolder, alongside wp-load.php. Commented Mar 18, 2014 at 17:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.