Solved

Disable MagickWand PHP Extension

Posted on 2010-09-10
7
533 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Google Dork query 7 70
htaccess block all countries but the US 4 42
Session time out quickly. 6 28
syntax error, unexpected '?' in phpunit 5 29
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 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