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

1.1.x branch fails to run/install on Windows running Nginx 1.11.1 #961

Closed
absalomedia opened this issue Jul 26, 2016 · 5 comments
Closed

Comments

@absalomedia
Copy link

absalomedia commented Jul 26, 2016

Upgrading from 1.0.10 to the 1.1.x branch breaks everything on Windows when running Nginx.

Specs:

  • Windows 10 64-bit
  • WT Server running Nginx 1.11.1, PHP 5.6, Maria & Redis enabled.

Replicated this crash from Whoops both in a development branch of a client site & in a clean / vanilla install of Grav 1.1.1 (with Admin).

Steps to replicate:

  • Download Grav 1.1.1
  • Set up WT Server with virtual local host records for site - replicate Nginx settings from Grav webserver-configs directory into virtual host file.
  • Try to view site. Crash occurs on Pages line 1069

Also did a sideload test:

  • Run Grav 1.0.10
  • Update Admin plugin to 1.1.2 and install rest of Grav 1.1.1 plugin stack including Markdown notices
  • Site still works

Something core related seems to not place nicely with Windows and/or Nginx it seems

@rhukster
Copy link
Member

That line seems to relate to the PHP 'intl' package being loaded. Can you try to disable it in your php.ini and see if that fixes it?

It seems that logic was added to fix issues with accented characters - e2453b8

I'll also check with @flaviocopes to see if that's working ok for him still.

@absalomedia
Copy link
Author

Disabling the PHP intl extension gets things back to a working state.

@flaviocopes
Copy link
Contributor

replicated with wtserver

flaviocopes added a commit that referenced this issue Jul 27, 2016
…failed in a Windows environment with the Intl PHP Extension enabled [#961]
@flaviocopes
Copy link
Contributor

Fixed by 74f6890 - not sure why the constructor call fails as I could not find any reference, and the locale was set correctly. Could not even catch it with a try/catch. Can you try the latest develop and see if the problem is solved for you @absalomedia ?

@MartinKavik
Copy link

@flaviocopes: I can confirm that your fix is working (WTServer + Win 7 + PHP 7).

I think the problem is return value of setlocale(LC_COLLATE, 0) - in my case, it is C (viz e.g. https://blog.mover.io/2012/11/21/php-locale-and-basename/).
So the Collator's constructor gets that "C" as argument and throws an exception, because it doesn't know what to do with it, imho. Your fix is working, because ::create only returns null without throwing exceptions.

I am new in Grav world - is there any config files, where is possible to set default locale? (I assume, that it won't be last issue with locales).

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

No branches or pull requests

4 participants