patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
http://TheBookOfShaders.com
Other
5.97k stars 680 forks source link

Error trying to view the book locally in windows 10 #322

Closed dballesg closed 3 years ago

dballesg commented 3 years ago

Hi,

I tried to run a local version of the book but I got this error when I open the http://localhost:8000/ after run php -S localhost:8000:

Fatal error: Uncaught Error: Call to undefined function mb_strlen() in C:\thebookofshaders\src\parsedown\Parsedown.php:144 Stack trace: #0 C:\thebookofshaders\src\parsedown\Parsedown.php(39): Parsedown->lines(Array) #1 C:\thebookofshaders\index.php(21): Parsedown->text('<canvas id="cus...') #2 {main} thrown in C:\thebookofshaders\src\parsedown\Parsedown.php on line 144

I installed PHP, compiled myself glslViewer and both are in the path, I have Python 3.5 as well in the path, to be honest PHP I never touched it.

It would be nice if the book could be locally view on a simpler way (maybe mkdocs?) and looking to compile it to .pdf looks like will be another problem I will avoid for the moment.

Thanks in advance, David Ballesteros.

dballesg commented 3 years ago

Solved it.

PHP server needs the mbstring extension activated in php.ini.

Cheers, David Ballesteros

WojtekPachowiak commented 1 year ago

Hi @dballesg, can you give me an instruction on how to to enable it? I've removed semicolon from ;extension=mbstring in both php.ini-development and php.ini-production, but nothing has changed - still the same error :(

dballesg commented 1 year ago

Hi,

I did not touched this in ages.

But as far as I see on my notes and old instalation, the extension was enabled on php.ini. (I have PHP in C:\php)

If you don't have a php.ini, copy the php.ini-production and rename it.

Hope it helps. David

El vie., 6 ene. 2023 17:54, Wojtek Pachowiak @.***> escribió:

Hi @dballesg https://github.com/dballesg, can you give me an instruction on how to to enable it? I've removed semicolon from ;extension=mbstring in both php.ini-development and php.ini-production, but nothing has changed - still the same error :(

— Reply to this email directly, view it on GitHub https://github.com/patriciogonzalezvivo/thebookofshaders/issues/322#issuecomment-1373890522, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDN6PAYP66VUHQZUSQWQMTWRBE6FANCNFSM4R6BPLKQ . You are receiving this because you were mentioned.Message ID: @.***>

dballesg commented 1 year ago

Hi,

I did not touched this in ages.

But as far as I see on my notes and old instalation, the extension was enabled on php.ini. (I have PHP in C:\php)

If you don't have a php.ini, copy the php.ini-production and rename it.

Hope it helps. David