Home > Archive > PHP PEAR Questions and Answers > September 2005 > Re: [PEAR-QA] Seeking feedback on QA tool: phpflip
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR-QA] Seeking feedback on QA tool: phpflip
|
|
| Arnaud Limbourg 2005-09-18, 6:56 pm |
| It's good, it sure can be useful to the QA effort.
Suggestions:
- when detecting a possible OS vendor distribution it would be nice to
ask confirmation from the user
- you could edit the httpd.conf file piping it through sed to activate
php 4 or php 5
- the directory configuration can be customised to fit distributions
layout (a set for debian, gentoo, etc.)
Good job !
Arnaud.
Clay Loveless wrote:
> I've put together a shell script that I hope will be helpful to others in
> testing PHP scripts against different PHP builds.
>
> It's called 'phpflip', and the source for the script is available here:
>
> http://www.killersoft.com/projects/...r/shell/phpflip
>
> My intent is to enable easy switching between not just major versions, such
> as PHP 4 and PHP 5, but incremental versions -- switch between PHP 4.3.11,
> 4.4.0, 5.0.5, 5.1.0, and whatever the latest snapshot is with one command.
>
> Download PHP distributions, configure and build them, but don't install them
> -- use phpflip instead.
>
> Since each build has the same prefix of /usr (or whatever you specify),
> they'd all use the same PEAR installation.
>
> I'm interested in feedback on this script, particularly from this group -- I
> intend to release on pearified.com after I've gathered some feedback. (Just
> assuming it wouldn't be very welcome on PEAR, since it's not actually a PHP
> script itself.)
>
> Thanks,
> Clay
>
| |
| Clay Loveless 2005-09-18, 6:56 pm |
| Arnaud Limbourg (arnaud@limbourg.com) wrote:
> It's good, it sure can be useful to the QA effort.
Thank you -- I'm glad to hear that others will find it useful.
> Suggestions:
> - when detecting a possible OS vendor distribution it would be nice to
> ask confirmation from the user
That's an interesting idea -- what would you want to confirm? It seems like
it's always a good idea to back up whatever non-symlink is found in the
locations being manipulated by the script.
> - you could edit the httpd.conf file piping it through sed to activate
> php 4 or php 5
I thought a little about that, and after hunting around I couldn't find a
reliable way to detect apache 1.x from apache 2.x -- I'd like to use
something like:
LoadModule php4_module libexec/httpd/libphp4.so
<IfDefine !APACHE2>
AddModule mod_php4.c
</IfDefine>
.... But it doesn't seem that the APACHE2 constant is always defined. I
haven't tested that, however, so I'm not 100% positive.
The other thought that I had regarding this is that once initial
configuration is done, all the script does is manipulate symbolic links.
Using the phpflip4.conf/phpflip5.conf/phpflip.conf scheme is consistent with
that.
> - the directory configuration can be customised to fit distributions
> layout (a set for debian, gentoo, etc.)
I'm planning to split the variables section that defines paths into a
separate config file in /etc/phpflip.conf -- would that do the trick well
enough, you think? Perhaps that, plus an interactive setup via PEAR package
post-install script that is aware of distribution-specific layout for use in
defaults would be good.
Thanks for the feedback, Arnaud -- I appreciate it!
Regards,
Clay
--
Killersoft.com
| |
| Davey Shafik 2005-09-18, 6:56 pm |
| Clay Loveless wrote:
> Arnaud Limbourg (arnaud@limbourg.com) wrote:
>
>
>
>
> Thank you -- I'm glad to hear that others will find it useful.
>
>
>
>
> That's an interesting idea -- what would you want to confirm? It seems like
> it's always a good idea to back up whatever non-symlink is found in the
> locations being manipulated by the script.
>
>
>
>
> I thought a little about that, and after hunting around I couldn't find a
> reliable way to detect apache 1.x from apache 2.x -- I'd like to use
> something like:
>
> LoadModule php4_module libexec/httpd/libphp4.so
> <IfDefine !APACHE2>
> AddModule mod_php4.c
> </IfDefine>
>
> ... But it doesn't seem that the APACHE2 constant is always defined. I
> haven't tested that, however, so I'm not 100% positive.
What about detecting for other AddModule's in the current config? :)
- Davey
| |
| Davey Shafik 2005-09-18, 6:56 pm |
| Clay Loveless wrote:
> Arnaud Limbourg (arnaud@limbourg.com) wrote:
>
>
>
>
> Thank you -- I'm glad to hear that others will find it useful.
>
>
>
>
> That's an interesting idea -- what would you want to confirm? It seems like
> it's always a good idea to back up whatever non-symlink is found in the
> locations being manipulated by the script.
>
>
>
>
> I thought a little about that, and after hunting around I couldn't find a
> reliable way to detect apache 1.x from apache 2.x -- I'd like to use
> something like:
>
> LoadModule php4_module libexec/httpd/libphp4.so
> <IfDefine !APACHE2>
> AddModule mod_php4.c
> </IfDefine>
>
> ... But it doesn't seem that the APACHE2 constant is always defined. I
> haven't tested that, however, so I'm not 100% positive.
What about detecting for other AddModule's in the current config? :)
- Davey
| |
| Clay Loveless 2005-09-18, 6:56 pm |
| Davey Shafik <davey@php.net> wrote:
> What about detecting for other AddModule's in the current config? :)
That's a great idea. : )
Now the question is -- would you guys, as potential users of this script,
prefer to see changes written directly to httpd.conf? Or would you rather
see the phpflip.conf method used?
Granted, changing httpd.conf directly reduces the number of setup steps,
which makes it appealing.
BTW, after emails earlier today, the script has been updated to check in
/etc/phpflip.conf and ~/.phpflip.conf (in that order) for variables to
override the defaults.
Thanks for the feedback, guys!
-Clay
--
Killersoft.com
| |
| Arnaud Limbourg 2005-09-18, 9:55 pm |
| Clay Loveless wrote:
> Davey Shafik <davey@php.net> wrote:
>
>
>
>
> That's a great idea. : )
>
> Now the question is -- would you guys, as potential users of this script,
> prefer to see changes written directly to httpd.conf? Or would you rather
> see the phpflip.conf method used?
>
> Granted, changing httpd.conf directly reduces the number of setup steps,
> which makes it appealing.
Put appropriate markers and edit the httpd.conf directly.
###STARTPHPFLIP###
###ENDPHPFLIP###
> BTW, after emails earlier today, the script has been updated to check in
> /etc/phpflip.conf and ~/.phpflip.conf (in that order) for variables to
> override the defaults.
>
> Thanks for the feedback, guys!
> That's an interesting idea -- what would you want to confirm? It seems
> like
> it's always a good idea to back up whatever non-symlink is found in the
> locations being manipulated by the script.
I was thinking about a simple 'Do you want to continue ?'
Arnaud.
|
|
|
|
|