Hi there,
I'm getting the following error when trying to run 'drush status':
Fatal error: Call to undefined function php_ini_loaded_file() in /usr/local/scripts/drupal/drush/commands/core/core.drush.inc on line 232
According to http://php.net/function.php_ini_loaded_file, php_ini_loaded_file() is only available in php >= 5.2.4 - this is a problem for us, as we are currently using debian etch, which provides a patched version of 5.2.0.
I have generated a quick and dirty patch against HEAD to load php_ini_loaded_file() from PHP_Compat if available. (pear install PHP_Compat-1.6.0a2) I don't know that environment.inc would be the most appropriate place, but I'm not too familiar with drush's structure...
thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 479718.patch | 1.13 KB | owen barton |
| environment.inc_.patch | 646 bytes | acrollet |
Comments
Comment #1
moshe weitzman commentedYou are behind by 9 point releases, including security releases. I don't think we should engineer for this. I'm willing to listen to counter arguments though.
We should check for this dependancy during validation.
Comment #2
seanrMoshe, I know you developers live in a perfect world where all of your machines run OSes with the most current version of PHP humanly possible, but sadly SEVERAL dsitributions of Linux don't have packages available (RHEL doesn't even have 5.2 at all) and that's the environment the rest of us are stuck in. My company will not upgrade our servers to 5.2.x even with third party packages because our managed hosting provider will not support it. What am I supposed to do. I know I am hardly alone in this.
Developers should probably be thankful we've even got PHP5 now; it wasn't all that long ago before nearly everyone was stuck with PHP4 (only a year, really).
Sorry for the sarcasm, but it seems like every time I update something, I get crapped on and I've got nowhere to turn. Please stop doing this to us, folks!
Comment #3
moshe weitzman commentedMaybe you get crapped on because you are a jackass who writes "sorry for the sarcasm" but is not in fact sorry. Or maybe it is because you insult people while making requests.
Comment #4
seanrYou guys all sit around and tell us to upgrade as though we're total idiots to be using the version we're on. Several of the major Drupal developers have done that. Basically every time this comes up. Why shouldn't we be pissed off by that when you guys don't acknowledge that we might not even have any options to upgrade? Why can't you guys try to be a little less bleeding edge instead of giving us shit every time we post an issue?
BTW, you yourself in comment #1 above: "You are behind by 9 point releases, including security releases." I realize you added some caveats to that, but still. That attitude is totally pervasive around here and it sucks for anyone on Debian Etch or Red Hat (which STILL doesn't even have a 5.2.x package at all).
The worst thing about this, and this is why it pissed me off so much, is I just went to do a normal update to keep stuff current and suddenly it no longer works at all. Completely broken with no advanced warning.
Comment #5
acrollet commentedwow, this thread sure touched a couple of nerves! I'm not going to be combative about this, you guys are doing great work on drush, and I appreciate the prodigious efforts - they make my life a lot easier. I will just say that server OSs run a ways behind bleeding-edge development environments in feature releases, and in how often it's practical to update. Admittedly, Debian etch has been superseded by Lenny, but only recently, and is a widely-used distribution still under maintenance (including security updates, so that's not a reason to upgrade).
Here's my counter argument: I would think that drush should work with the same release of PHP that the current release of drupal does - if Dries threw away backwards compatibility willy-nilly, there would be a lot fewer people using drupal.
All that said, checking for the dependency and throwing a relatively easily grokkable error message would be a nice upgrade from the current situation if you're not willing to remain backwards compatible :)
thanks.
Comment #6
owen barton commentedWe already check for 5.2.0 as a dependency - while we could bump it to 5.2.4 (which is past what Drupal 7 requires) I think it is reasonable enough to "degrade gracefully" in this case. At some appropriate point in the future we can bump the required version number. The line in question is simply informational, and not critical so I would propose the attached patch.
@seanr - your tone on this thread is inappropriate and not conducive to fixing the issue - accusative phrases such as "you developers live in a perfect world..." and "You guys all sit around" are more likely to see you ignored than the issue given any attention. We are not responsible for your company or ISP policy, so please don't assume we are making your life difficult for you out of malice. We are also not the same "guys" you may or may not have talked about this on d.o. in the past with, but are individuals working hard on this tool - mostly in our spare time.
Comment #7
acrollet commentedOwen -
that patch looks lovely, thanks very much!!!
Adrian
Comment #8
moshe weitzman commentedCommitted.