Solved

Disable MagickWand PHP Extension

Posted on 2010-09-10
7
534 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 
LVL 40

Expert Comment

by:Richard Quadling
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:Richard Quadling
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:Richard Quadling
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:Richard Quadling
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:
Richard Quadling 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

728 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