Skip to content

Commit f5bf1e8

Browse files
committed
trying another storage with PhpConsole
1 parent bdf2578 commit f5bf1e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/class-wp-php-console.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ public function init() {
408408
$_POST[ PhpConsole\Connector::POST_VAR_NAME ] = stripslashes_deep( $_POST[ PhpConsole\Connector::POST_VAR_NAME ] );
409409
}
410410

411+
// By default PHP Console uses PhpConsole\Storage\Session for postponed responses,
412+
// so all temporary data will be stored in $_SESSION.
413+
// But there is some problem with frameworks like WordPress that override PHP session handler.
414+
PhpConsole\Connector::setPostponeStorage( new PhpConsole\Storage\File( '/tmp/pc.data' ) );
415+
411416
$connector = PhpConsole\Connector::getInstance();
412417
$connector->setPassword( $password );
413418

0 commit comments

Comments
 (0)