I've still got a lot to learn about D8 in general while I'm getting close to building a development environment on Windows 10 with IIS 10, MySQL, and PHP 7.1.3. Many thanks to drupalonwindows.com and a few others for hints. (Various WAMP stacks would be great if Apache worked on Windows.)

I've created a new site with composer create-project drupal-composer/drupal-project:8.x-dev and then required a contrib theme, which looks pretty good.

From Manage, Appearance, Appearance settings I tried to upload a logo image and a favicon from *.gif. For both Global settings and the theme's own settings, attempts to upload a .gif for the logo image and for the favicon say:

The file phpE306.tmp could not be saved. An unknown error has occurred.
The specified file mylogo.gif could not be uploaded.
Image type not supported. Allowed types: png jpeg jpg jpe gif
The logo could not be uploaded.

The files' names are *.gif and they really are GIFs. IIS will display those files correctly on Edge, IE 11, Chrome, and Firefox from a simple HTML file's img directive.

Am I misunderstanding something?

Comments

John_B’s picture

Probably the temporary directory which is set at Configuration > File system does not exist or is not writable by the web server.

EDIT - when configuring the tempoarary directory on Windows you may need to use back slashes rather than forward slashes. And you may need to specify the disk letter. e.g. c:\windows\temp. Not sure, as I take the easy path and run Drupal on Linux.

The most popular development environments are http://drupalvm.dev and (for zero setup) Acquia Dev Desktop. I understand that if you want to run on IIS for you live server for some reason, you may choose IIS for dev too.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

AES2’s picture

Though I suspect we're a small minority, a few of us need a Windows desktop environment for much of our work. and it would be nice if we could also develop Drupal on the same workstations, even though the production server will be LAMP. A Drupal VM is pretty good, but it can suck up resources, and sharing files can be interesting. Unfortunately, Apache has a Windows version, but it doesn't work. A fresh composer create-project drupal-composer can get a 500 server error on Dev Desktop very early in development. Sometimes restarting Dev Desktop works, sometimes a reboot works, and sometimes you have to start over. Maybe someday the Apache developers will take Windows seriously, but until then Dev Desktop, XAMPP, and other WAMP stacks are not ready for prime time.

The new Windows Subsystem for Linux provides a declared-beta version of Ubuntu that runs ELF-64 images on Windows without a VM. Its beta release still needs work, and I expect good things from a bunch of very talented Microsoft and Canonical developers in future releases. It might support Apache down the road, but for now IIS is the only web server that works on Windows.

PHP 5 had issues, more so on Windows, but PHP 7 seems to be pretty solid, and MySQL has a good history on Windows. Much of what I've read about Drupal on Windows is obsolete. One fine exception is http://www.drupalonwindows.com/en/blog/installing-drupal-8-windows , which is up to date and got me close. It's about SQL Server rather than MySQL, but that's minor. What it says about IIS and PHP is invaluable.

Composer created everything except the temporary directory, without which no CSS is served. I discovered that fairly quickly and created it before I started this thread. Even though I know the temporary directory works because it serves CSS, I changed its and the main files directory's permissions to everyone full and still can't upload those files. I copied the logo and favicon GIFs to docroot\sites\default\files and they get displayed.

I don't get the error message. It says it can't upload a GIF because it's not on a list that includes GIF. Does that mean it's incorrectly rejecting a file type? Or is it giving that message because it has some other reason it can't upload?

John_B’s picture

Without trying full debugging, it does seem that php's detecting file types is different on Windows http://php.net/manual/en/function.mime-content-type.php. If this is reproducible with other gif files then it looks like something worth opening a core issue for https://www.drupal.org/issue-queue/how-to

I use a Windows 10 Thinkpad mainly because I don't have patience with Linux hardware drviers or with MacBooks which are easy to break and expensive to repair. It would not occur to me to install IIS because running a Drupal dev site on Windows with Acquia Dev Desktop is so easy. Personally I use Dev Desktop for quick throwaway sites, and Drupal VM for more serious development. I know that Drupal On Windows argues that Drupal runs very well on IIS for production, and if I were developing for a Windows server as the target production environment, then that would be different.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors