logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: imagick not loading
Author
sailor



Joined: 17 Apr 2015
Posts: 77
Location: US

PostPosted: Fri 20 Jan '23 21:30    Post subject: imagick not loading Reply with quote

I am getting the dreaded PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: D:\php-8.0.20-Win32-vs16-x64\ext\imagick (The specified module could not be found), D:\php-8.0.20-Win32-vs16-x64\ext\php_imagick.dll (The specified module could not be found)) in Unknown on line 0

I have D:\php_imagick-3.7.0-8.0-ts-vs16-x64. I copied the various CORE_RL, FILTER, IM_MOD_RL, or ImageMagickObject to my d:\php directory and php module to the ext directory.

httpd.conf:
LoadModule php_module "D:/php-8.0.20-Win32-vs16-x64/php8apache2_4.dll"
PHPIniDir "D:/php-8.0.20-Win32-vs16-x64"

Someday I have try to change to cgi, but for now...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 23 Jan '23 10:36    Post subject: Reply with quote

Did you download the correct version?[1]

Others won't load.

[1] https://windows.php.net/downloads/pecl/releases/imagick/3.7.0/php_imagick-3.7.0-8.0-ts-vs16-x64.zip
Back to top
sailor



Joined: 17 Apr 2015
Posts: 77
Location: US

PostPosted: Mon 23 Jan '23 17:20    Post subject: Reply with quote

I refreshed the files and tried starting from cmd prompt with the path and that worked. I realized I actually needed a system variable path added to the said directory. Apache as service starts ok now.

So again, https://mlocati.github.io/articles/php-windows-imagick.html instead of copying to files, add system path.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 24 Jan '23 10:30    Post subject: Reply with quote

I wonder if you can set it via SetEnv, so you don't have to mess with the Windows settings.

Code:

Define PHP81RC "C:\\php81"
SetEnv PATH "${PHP81RC};C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"


At least that is what I do for fcgid

Code:

Define PHP81RC "C:\\php81"
   <IfModule fcgid_module>
      FcgidInitialEnv PHPRC "${PHP81RC}"
      FcgidInitialEnv PATH "${PHP81RC};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"
      FcgidPassHeader Authorization
      <Files ~ "\.php$">
         Options Indexes FollowSymLinks ExecCGI
         AddHandler fcgid-script .php
         FcgidWrapper "C:/php81/php-cgi.exe" .php
      </Files>
   </IfModule>
Back to top


Reply to topic   Topic: imagick not loading View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules