Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a third-party package that requires the use of the PHP dl() function to load a binary extension. This function has been deprecated and removed as of PHP 5.3, so we're looking for a way to get this to work - possibly by downgrading to PHP 5.2.

I seem to be having a really rough time with trying to get a PHP 5.3 installation downgraded to 5.2. I have tried using the yum downgrade util, but that fails miserably.

Would anyone know how to do this that doesn't involve compiling from source as I am not too eager to have to try to satisfy a boat load of dependencies manually?

Alternatively, is there another way we can make this third-party package work without requiring dl()?

share|improve this question
If you already have it installed most of the dependencies should already be met so compiling it from source should work fine. – J Baron Nov 29 '12 at 20:49
Not without development headers, it won't. – jgoldschrafe Nov 29 '12 at 21:04
Problem is that I would need to know the directories to use in each of the --with-xxxxxx=[DIR] directives and I honestly don't want to have to recompile it just because I forgot to add in something. I'm trying desperately to avoid compiling from source as uninstalling is a real pain if needed. – Skittles Nov 29 '12 at 21:44
@Skittles I polished up the question a little bit to include some of the data from the comments. If you think I butchered it let me know :) – voretaq7 Dec 3 '12 at 18:08
@voretaq7 - That looks just fine to me. Thanks for the assist. – Skittles Dec 3 '12 at 19:17
up vote 6 down vote accepted

Downgrading to an unsupported PHP version is likely to be (no surprise) unsupported.
Compiling from source, or finding someone who has packaged an RPM, are pretty much your only two options.


You probably do not need to use dl().
You should never need to use dl().
Despite what you may have been told, alternatives do exist to using dl().

You should be using the php.ini directive extension instead of dl().

If your third-party software is so poorly written that you can't load the extensions securely (using php.ini's extension directive) you need to have a serious conversation with your vendor - they are asking you to expose your entire system to undue risk, both through using dl() and by forcing you to run an unsupported PHP version in order to use their product.

share|improve this answer
Although I could not agree with you more about the obvious risks, the nature of the third party extension is not something that we could replace with an alternate solution as the associated cost to move to a different solution provider would be far more than most companies are willing to swallow. So, this fact alone forces us into having to use what we have at our availability. As for the ini based extension loading, I will be researching this a bit more as I get the server closer to testing it. Thanks, voretaq7. – Skittles Nov 29 '12 at 21:57
@Skittles It should be a straightforward change: put into php.ini and remove the call to dl() from the PHP code. If you have problems, the next step is to have the CEO yell obscenities at the vendor until they make it work. – Michael Hampton Nov 30 '12 at 2:18
@MichaelHampton - Hahahaha...thanks, Mike. I actually did do exactly that, minus the CEO part as I have enough authority here to get to enjoy being the yelling entity. :) – Skittles Dec 3 '12 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.