?
Solved

Disable MagickWand PHP Extension

Posted on 2010-09-10
7
Medium Priority
?
535 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 1800 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

752 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