Installing ImageMagick extension with php/windows

后端 未结 10 1356
无人共我
无人共我 2020-12-05 08:06

Running PHP Version 5.2.5 on Windows Server 2003 with IIS.

Have virtually an identical server where we were able to install ImageMagick with no issues. It\'s running

相关标签:
10条回答
  • 2020-12-05 08:41

    This is an older question, but I've ran into similar issues with PHP/IIS before. A couple things I could suggest to double check:

    • Use the phpinfo page to see if you're editing the right php.ini file, look at the "Loaded php.ini file" on the first page (as stupid as it sounds, I've done that before - sometimes PHP will look for it in its own folder, sometimes C:\Windows)
    • also try to enable display_errors to On and error_reporting to E_ALL in php.ini and see if there are error messages at the very bottom of the phpinfo file. Typically it will at least acknowledge not being able to load your DLL.
    0 讨论(0)
  • 2020-12-05 08:44

    You do not need to restart windows. You need to restart the application pools running the PHP exe. This can be done by either resetting IIS (This is the best option to get all the application pools to reset). Or recycle the application pools that are running PHP.

    0 讨论(0)
  • 2020-12-05 08:50

    nothing worked until I set the permissions on the imagick folder and c:\windows\temp (IUSR read/execute for imagick, read/write/execute for windows\temp).

    * I'm not 100% sure read/write/execute was necessary for windows\temp but it was listed on a site somewhere during my google surfing *

    Pretty sure the rebooting part is just to make sure the imagick folder is in your system path directory and showing up in phpinfo(), it was already in my path so I didn't have to reboot after setting the permissions.

    0 讨论(0)
  • 2020-12-05 08:51

    In windows you should check 3 parameters when you want to add an extension to php server:

    1. The compiler version which your php server compiled with (VC9 or VC10) which is indicated in phpinfo().

    2. The PHP extension API number which is indicated in phpinfo().

    3. The most important parameter is whether your web server is ts (thread safe) or nts (non thread safe) which is indicated in phpinfo().

    I found to my experience that IIS is nts by default and the php extension should be compiled with nts php library in order to work properly in your web server. However, your extension and your php web server should be the same exactly in these three parameters if you want to load your extension properly.

    0 讨论(0)
提交回复
热议问题