Re: Fw: [PHP-DEV] New Installer for PHP 5.2

From: Date: Wed, 26 Jul 2006 17:14:02 +0000
Subject: Re: Fw: [PHP-DEV] New Installer for PHP 5.2
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-24989@lists.php.net to get a copy of this message
Hi there, On 7/26/06, Steph Fox <steph@zend.com> wrote:
Erm, the only way I know to include a file in httpd.conf is to use the ResourceConfig file (conf/srm.conf), so I'm not sure how overwriting that helps... am I missing something?
Check out this: http://httpd.apache.org/docs/1.3/mod/core.html#include Aha!
And I'm not sure I want to go as far as trying to undo or correct previous PHP setting in there either; I'll make the include file assume we are working with a stock httpd.conf file and if the user has previous directives it's thier responsibility to correct them.
I wasn't suggesting altering existing settings other than for uninstall. I just meant notify the user of a potential conflict if they tried to overwrite an existing PHP installation and check they really meant to do that (or ignore it silently if the directive && path were the same as those already existing).
I'm still leary of making changes right in the file; I'd prefer to keep the install changes in an include file so that backing them out is as simple as removing one line and one file. Instead of removing two lines. I really don't see what the gain is there (don't tell me - one line!) but wth, it's your baby.
Actually four if you count the AddType's, but who's counting ;->. I guess I'm more of a "make it modular" than "make it monolithic" type of person. And I figure the uninstall is a bit more straightforward.
And I'd rather let the user handle conflicts manually on thier own, for the same maintainance reasons as above. Erm, I've said that from the start. If there's a conflict, warn the user and offer them the option to manually edit the file. Five, maybe six times I've said this now. Maybe I should put it nearer the top :)
Sorry about that, these posts get long and I just wanted to make sure I didn't miss anything.
It just feels much cleaner to me, than...? especially since you found out that the placement of directives doesn't matter ( i.e. we can put them in an include at the end ). Or just put two lines at the end...
Yea I know. I'll play with both an see what fits better. It's the same result in the end.
I do think it should be made clear that this is a global install on the Apache server and that anything more complex (vhosts or whatever) needs to be done manually. I didn't see any obvious way to open a file for editing from within a wix installer though - is that possible or not?
This isn't directly possible, but you can create call external scripts to do this ( this is how IIS is configured ). Probably I'd do the same here.
I think it's the only option for Apache if not global. Isn't there some exec equivalent? - yeah there is I remember seeing it, it allows cmd without a dos box. so you could just use that to open up httpd.conf with (say) notepad... or is that too yucky?
Sure we could, but like you said it's a bit yucky. You are right about it being able to execute a command without a DOS box, but you have to be careful to make sure that that command is available on the computer. That's why I'm thinking a simple PHP script ( the CustomActions I use run after the files are copied so PHP should be available then ). mmkay, wasn't sure what you were planning to execute the script with if not cmd :)
I'm thinking so, with confirmation that it did the right thing. I do something similar with IIS already so it should be rather straightforward. -- Later, John Mertic "Explaining a joke is like dissecting a frog: you jmertic@gmail.com understand it better, but the frog dies in the process." -Mark Twain

« previous php.internals (#24989) next »