0

I'm having trouble loading the imagick extensions on windows with php 7.0 in fastcgi mode, when I change the handler to apache hander it loads all extensions

enter image description here


My conf

# Carrega o módulo
LoadModule fcgid_module modules/mod_fcgid.so

# Define algumas variáveis de ambiente
FcgidInitialEnv PATH "C:/PHP7.0;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:/WINDOWS/Temp"
FcgidInitialEnv TMP "C:/WINDOWS/Temp"
FcgidInitialEnv windir "C:/WINDOWS"
#
# Timeout de leitura, tempo máximo que o script esperará até algo acontecer (um download, por exemplo)
FcgidIOTimeout 640
# Timout de conexão, tempo máximo que um script aguarda até acontecer uma conexão
FcgidConnectTimeout 160
# Quantidade máxima de requisições que um processo pode receber
FcgidMaxRequestsPerProcess 10000
# Quantidade máxima de processos simultâneos em execuçÃo
FcgidMaxProcesses 500
# Tamanho máximo de uma requisição
FcgidMaxRequestLen 8131072000
# Localização do php.ini:
FcgidInitialEnv PHPRC "C:/PHP7.0"

# Quantidade máxima de requisições que o FCGI irá tratar
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 100000


# Adiciona os manipuladores do PHP ao apache para tratar as requisições
<Files ~ "\.php$>"
  AddHandler fcgid-script .php
  AddHandler fcgid-script .phtml
  FcgidWrapper "C:/PHP7.0/php-cgi.exe" .php
</Files>
Andy
  • 49,085
  • 60
  • 166
  • 233
Elvis Reis
  • 155
  • 4
  • 12
  • So many possible issues. Without knowing your fastcgi configuration, I would guess permission related. Please post your configuration files, and details on how you installed Imagick, and the issue you're having. I wrote a very detailed walkthrough of installing Imagick with PHP here https://stackoverflow.com/a/30295211/1144627 – Will B. Aug 18 '17 at 18:08
  • I'm using php 7.0 TS, I downloaded the files below the same version I placed the dlls of the imagick in the folder of php and php_imagick and I configured the magic_home As the Server API Apache 2.0 Handler it loads everything but with the Server API CGI / FastCGI does not http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/php_imagick-3.4.3-7.0-ts-vc14-x86.zip http://windows.php.net/downloads/pecl/deps/ImageMagick-6.9.3-7-vc14-x86.zip – Elvis Reis Aug 18 '17 at 19:37
  • 1
    Do not use thread-safe (TS) with FastCGI, only use TS with the Apache `LoadModule` or if you know what you're doing with TS. The [php_imagick.dll file download](https://pecl.php.net/package/imagick/3.4.3/windows) should be put into your `/path/to/php/ext` directory. And you should add `extension = php_imagick.dll` to your php.ini file. You will need to move the php_imagick deps files into the php directory or configure the Windows PATH environment variable *prepended* with the php_imagick directory. – Will B. Aug 18 '17 at 20:07
  • 1
    Also to note, ensure your `/path/to/php` is *prepended* to your windows PATH environment variable. Since the Apache Service module provides a different configuration structure than FastCGI, e.g. `PHPIniDir "C:/php"` vs `FcgidInitialEnv PHPRC "c:/php" ` we would need to see your FastCGI configuration to ensure the proper ini files and permissions are loading. So please update your question with your apache fastcgi configuration. – Will B. Aug 18 '17 at 20:12
  • I added FcgidInitialEnv MAGICK_HOME "C:/ImageMagick/bin and solved it – Elvis Reis Aug 22 '17 at 09:53

0 Answers0