Closed alfiqmiq closed 8 years ago
And another info, PC::debug($variable); worjs fine from *.php files
Another test:
$connector = PhpConsole\Helper::register();
if($connector->isActiveClient()) {
$connector->setSourcesBasePath(__DIR__);
$connector->setPassword('DupaWeza.8');
$connector->getDebugDispatcher()->detectTraceAndSource = true;
$evalProvider = $connector->getEvalDispatcher()->getEvalProvider();
$evalProvider->disableFileAccessByOpenBaseDir();
$evalProvider->addSharedVar('_DEBUG', ['post' => $_POST, 'get' => $_GET, 'session' => $_SESSION, 'server' => $_SERVER]);
$handler = PhpConsole\Handler::getInstance();
$handler->setHandleErrors(true);
$handler->setHandleExceptions(true);
$handler->start();
$connector->startEvalRequestsListener();
}
return 2+2; ctrl + enter
and response:
Cannot declare class PhpConsole\Storage, because the name is already in use -phar:///somePath/lib/phpConsole.phar/Storage.php:15
Update: Problem with PHP7 occurs only from .phar that was build using examples/utils/build_phar.php
the same phar build with PHP 5.6 works fine.
PHAR builder is removed from php-console utils.
PHP7, PhpConsole 07801c3
if I use code from examples:
than put:
return 2+2;
after CTRL + enter i got on console reply:
Cannot declare class PhpConsole\Storage, because the name is already in use -
if I use my older code (that worked for me before):
on console I got:
Console was cleared
and nothing elseon other machine with PHP 5.4 and older version of PhpConsole everyting seems to be ok.