Solved

Disable MagickWand PHP Extension

Posted on 2010-09-10
7
526 Views
Last Modified: 2013-12-13
The PHP extension MagickWand is installed on my system.  How can I disable it for PHP scripts located in a specific directory?
0
Comment
Question by:hankknight
  • 5
7 Comments
 
LVL 40

Expert Comment

by:RQuadling
ID: 33652604
Hmm...

Really, hmmmmmmmmm, ....

I initially thought that a combination of disable_class and disable_functions would cover it, but these are php.ini only and not httpd.conf

At this stage, I'm not finding an obvious answer.

Back in a bit with more ideas.
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 33652610
I suppose depending upon your directory structure you could turn it around and only enable the extension if in that directory.

0
 
LVL 20

Assisted Solution

by:virmaior
virmaior earned 50 total points
ID: 33653591
I am not seeing it well-documented but you could try adding

a php_value value to disable it...

I am not sure what that line would be per se as I don't know what it adds other than the extension line to the php.ini file.

http://drupal.org/node/87138
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 40

Expert Comment

by:RQuadling
ID: 33654280
Just not loading it first would be the simplest. This is a LOT harder if you have compiled it statically.

I'm waiting on a response from some of the core dev's, but I'm thinking that you can't disable it from 1 directory, only enable it.
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 33656009
This is the reply I got and I should have though of it myself. Ho hum. Distractions due to ... well ... Facebook tells you all ...

"As I thought, looking through the docs, it looks like the only way to set the options that are only settable via the php.ini file is to use a per directory php.ini file.  But, the problem with that is, it only works with the CGI/FASTCGI SAPI version of php.  It won't work with the apache mod version.

So, I guess the question back to you is, what is your setup like?  And if it isn't CGI/FASTCGI SAPI are you willing to change to that setup?

Read More: http://www.php.net/manual/en/configuration.file.per-user.php"

0
 
LVL 40

Accepted Solution

by:
RQuadling earned 450 total points
ID: 33660701
Some additional questions.

1 - What OS, web server and PHP Version and SAPI are you using?

Windows/unix/linux/etc., IIS/Apache/etc. 4.what.what/5.what.what, cgi-fastcgi/isapi/mod/etc.

2 - Why do you want to disable this one extension?

Is this just to see if there is a way or are you having specific problems with it, e.g. name clashing between your own code and the classes from the extension.



Depending upon the reason in Q2, maybe the use of namespaces would help you ... http://docs.php.net/manual/en/language.namespaces.php

0
 
LVL 16

Author Comment

by:hankknight
ID: 33671186
Thank you for thoughtful responses.  As luck would have it, my system uses the Apache mod version of PHP.

I am trying to test a PHP-powered image manipulation application for computability issues.  I will temporarily change my global php.ini file while I run the tests.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now