Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank page on PHP 7.0 #61

Open
ivanstan opened this issue Mar 21, 2018 · 9 comments
Open

Blank page on PHP 7.0 #61

ivanstan opened this issue Mar 21, 2018 · 9 comments

Comments

@ivanstan
Copy link

After setting up the config and password, blank page is shown on url /logs

Error in PHP log: Fatal error: Cannot use Syonix\Util\String as String because 'String' is a special class name in /var/www/html/dev/log/src/Syonix/LogViewer/Client.php on line 5

I might fork to add support for PHP7

@pppdns
Copy link

pppdns commented May 3, 2018

@ivanstan did you solve this? I ran into the same problem

@ivanstan
Copy link
Author

ivanstan commented May 4, 2018

No, unfortunately I didn't have time. Migrating to newer php version will be more than this one issue.

@elliotboney
Copy link

elliotboney commented May 30, 2018

I tried updating dependencies thinking one of them probably had a new version that supported php7, got stuck with this error for now

Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception, instance of Error given in /vendor/symfony/debug/ExceptionHandler.php:117 
Stack trace: #0 [internal function]: Symfony\Component\Debug\ExceptionHandler->handle(Object(Error)) #1 {main} thrown in /vendor/symfony/debug/ExceptionHandler.php on line 117

@jlcd
Copy link

jlcd commented Jun 7, 2018

Same issue here under php's bultin server (php -S):

127.0.0.1:62959 [200]: /logs - Cannot use Syonix\Util\String as String because 'String' is a special class name in /Users/jdrummond/Projects/monolog-viewer/src/Syonix/LogViewer/Client.php on line 5

Edit:

Installed php 5.6 and php56 -S works as expected.

@vaclavgreif
Copy link

Any update on this, please?

@ivanstan
Copy link
Author

ivanstan commented Jul 5, 2018

Looks like current HEAD on master is working on php-7.1

@ghost
Copy link

ghost commented Jul 18, 2018

Any news for PHP 7.x ?
It's really a problem for apps running with the new Symfony 4.x (require PHP 7.1)...

@pppdns
Copy link

pppdns commented Aug 15, 2018

@davidcancalon It works for me with PHP 7.1, what can you see in your error logs?

@aleao-sl
Copy link

aleao-sl commented Sep 4, 2018

I solved this by changing on src/Syonix/LogViewer/Client.php the following:

On line 5
From:
use Syonix\Util\String;

To:
use Syonix\Util\String as SyonixString;

And on line 28:

From
$this->slug = String::toAscii($name);
To:
$this->slug = SyonixString::toAscii($name);

That's it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants