Re: [PHP] php 4 & php 5

2005-03-17 Thread Bostjan Skufca @ domenca.com
Versioned libraries do not work either.

Bostjan


On Wednesday 16 March 2005 23:11, Rasmus Lerdorf wrote:
> Kim Madsen wrote:
> > -Original Message-
> > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 15, 2005 4:05 AM
> >
> >>>That's why I'd like to stick with apache2 + php5 default and
> >>>apache2+php4 just for a single site hosted (the one that uses imp).
> >>
> >>See my previous message describing the ProxyPass approach.  It is by far
> >>the easiest way to solve this cleanly.
> >
> > I´ve only been on the list for a couple of weeks, so sorry if it´s
> > already been answered but couldn´t one use 2 AddTypes?
> >
> > LoadModule php4_module libexec/libphp4.so
> > AddType application/x-httpd-php .php4
> >
> > LoadModule php5_module libexec/libphp5.so
> > AddType application/x-httpd-php5 .php .php5
> >
> > AddModule mod_php4.c
> > AddModule mod_php5.c
> >
> > I believe that´s how we did it while testing 3 vs 4 at one of my previous
> > jobs (the ISP World Online/Tiscali), worked for hosted customers aswell.
>
> Nope, this won't work.  libphp4.so and libphp5.so will have a lot of
> symbol clashes.  You could attempt compiling versioned libraries here,
> but we really haven't tested that.
>
> -Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-17 Thread Bostjan Skufca @ domenca.com
Abandon all your hopes, this will not work (unless you do some heavy 
programming/patching) because modules interfere with each other. I've been 
trying this for a week without success.

Still the best/easiest approach is to set up ordinary apache/PHP4 server 
combination with proxy support compiled in, then configure it to forward 
all .php5 requests to another apache/PHP5 server (listening i.e. internally 
on 127.0.0.1:81)

PHP3/PHP4 was a diffferent situation, do not compare it to this one.


Bostjan




On Wednesday 16 March 2005 13:45, Kim Madsen wrote:
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 15, 2005 4:05 AM
>
> > > That's why I'd like to stick with apache2 + php5 default and
> > > apache2+php4 just for a single site hosted (the one that uses imp).
> >
> > See my previous message describing the ProxyPass approach.  It is by far
> > the easiest way to solve this cleanly.
>
> I´ve only been on the list for a couple of weeks, so sorry if it´s already
> been answered but couldn´t one use 2 AddTypes?
>
> LoadModule php4_module libexec/libphp4.so
> AddType application/x-httpd-php .php4
>
> LoadModule php5_module libexec/libphp5.so
> AddType application/x-httpd-php5 .php .php5
>
> AddModule mod_php4.c
> AddModule mod_php5.c
>
> I believe that´s how we did it while testing 3 vs 4 at one of my previous
> jobs (the ISP World Online/Tiscali), worked for hosted customers aswell.
>
> --
> Med venlig hilsen / best regards
> ComX Networks A/S
> Kim Madsen
> Systemudvikler
> Naverland 31
>
> DK-2600 Glostrup
> www.comx.dk
> Telefon: +45 70 25 74 74
> Telefax: +45 70 25 73 74
> E-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-16 Thread Rasmus Lerdorf
Kim Madsen wrote:
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 4:05 AM


That's why I'd like to stick with apache2 + php5 default and
apache2+php4 just for a single site hosted (the one that uses imp).

See my previous message describing the ProxyPass approach.  It is by far 
the easiest way to solve this cleanly.

I´ve only been on the list for a couple of weeks, so sorry if it´s already been 
answered but couldn´t one use 2 AddTypes?
LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php4
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php5 .php .php5
AddModule mod_php4.c
AddModule mod_php5.c
I believe that´s how we did it while testing 3 vs 4 at one of my previous jobs (the ISP World Online/Tiscali), worked for hosted customers aswell.
Nope, this won't work.  libphp4.so and libphp5.so will have a lot of 
symbol clashes.  You could attempt compiling versioned libraries here, 
but we really haven't tested that.

-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php 4 & php 5

2005-03-16 Thread Kim Madsen

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 4:05 AM

> > That's why I'd like to stick with apache2 + php5 default and
> > apache2+php4 just for a single site hosted (the one that uses imp).

> See my previous message describing the ProxyPass approach.  It is by far 
> the easiest way to solve this cleanly.

I´ve only been on the list for a couple of weeks, so sorry if it´s already been 
answered but couldn´t one use 2 AddTypes?

LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php4

LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php5 .php .php5

AddModule mod_php4.c
AddModule mod_php5.c

I believe that´s how we did it while testing 3 vs 4 at one of my previous jobs 
(the ISP World Online/Tiscali), worked for hosted customers aswell.

-- 
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen 
Systemudvikler
Naverland 31

DK-2600 Glostrup
www.comx.dk 
Telefon: +45 70 25 74 74
Telefax: +45 70 25 73 74
E-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-14 Thread Rasmus Lerdorf
mbneto wrote:
Simply.
My server has moved from php4 to php5 and my webmail program IMP can't
be upgraded before I find out how to do that safely for my users.
Now I have sites that need php5 and only one that does not work with it (imp).
That's why I'd like to stick with apache2 + php5 default and
apache2+php4 just for a single site hosted (the one that uses imp).
See my previous message describing the ProxyPass approach.  It is by far 
the easiest way to solve this cleanly.

-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php 4 & php 5

2005-03-14 Thread mbneto
Simply.

My server has moved from php4 to php5 and my webmail program IMP can't
be upgraded before I find out how to do that safely for my users.

Now I have sites that need php5 and only one that does not work with it (imp).

That's why I'd like to stick with apache2 + php5 default and
apache2+php4 just for a single site hosted (the one that uses imp).

- mb


On Mon, 14 Mar 2005 16:55:09 -0500, Jason Barnett
<[EMAIL PROTECTED]> wrote:
> Richard Lynch wrote:
> ...
> [good stuff]
> ...
> >
> > Maybe if you told us WHY you need 4 & 5 we'd have better answers for ya.
> >
> 
> Agreed!  Tell us what you specifically need and we can provide better
> answers.  If you're wanting to test PHP5 with your current scripts then
> it would make sense to do exactly what Richard said.  Or if you really
> need to run it as an Apache module I suppose you could run it on a dev
> server, but you would still want Apache to be the exact same version as
> what you have on your stable / production box.
> 
> --
> Teach a man to fish...
> 
> NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
> STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
> STFM | http://php.net/manual/en/index.php
> STFW | http://www.google.com/search?q=php
> LAZY |
> http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
> 
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-14 Thread Jason Barnett
Richard Lynch wrote:
...
[good stuff]
...
>
> Maybe if you told us WHY you need 4 & 5 we'd have better answers for ya.
>

Agreed!  Tell us what you specifically need and we can provide better
answers.  If you're wanting to test PHP5 with your current scripts then
it would make sense to do exactly what Richard said.  Or if you really
need to run it as an Apache module I suppose you could run it on a dev
server, but you would still want Apache to be the exact same version as
what you have on your stable / production box.

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


Re: [PHP] php 4 & php 5

2005-03-14 Thread Richard Lynch
> What I am trying to avoid is having 2 copies of the same program
> installed...

Well, if you're gonna have PHP 4 and PHP 5, you're gonna have to have two
copies of PHP...

You could run both under Apache 1.x, but running PHP 5 with Apache 1.x
means you aren't going to be taking advantage of any of the cool features
of 2.x anyway, so why do that?

Running 4 with Apache 2.x, same thing: PHP 4 doesn't leverage anything
cool from Apache 2.x, so you might as well take the safe road with Apache
1.x

For more accurate statements of the above, see:
http://us3.php.net/manual/en/faq.migration5.php
http://us3.php.net/manual/en/migration5.php

So, ideally, you'd be running:
PHP 4 + Apache 1.x
PHP 5 + Apache 2.x
if you want to try out new things in leading edge versions.

But let's assume you just want to test your PHP4 scripts in PHP5, which
would make sense.

You're only going to install Apache 1.x ONCE, but you're going to HAVE to
run 2 pools of httpd running to have PHP4 and PHP5 Modules installed,
probably.

Actually, I guess you could run PHP5 as a CGI, knowing that that will
automatically break a *few* things (HTTP Authentication, for example) but
test *most* of your scripts that way.

Compile PHP 5 as CGI, and use something like:
AddType application/x-httpd-php5 .php5

Then, in an .htaccess file where you have your PHP5 scripts you are
migrating, you could use:

  ForceType application/x-httpd-php5


This would not be suitable for a heavy load production server, and you're
GOING to have some issues to track down where it's just CGI messing things
up, not PHP5, really, but it's do-able.

Maybe if you told us WHY you need 4 & 5 we'd have better answers for ya.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-14 Thread mbneto
Hi Hans,

What I am trying to avoid is having 2 copies of the same program installed...

- mb

On Sun, 13 Mar 2005 22:06:15 -0500, Hans Zaunere <[EMAIL PROTECTED]> wrote:
> 

> > Any tips regarding the configuration of php and/or apache ?
> 
> Per option 1 below, they were saying two installs of Apache or one install of 
> Apache directed to use different httpd.conf files, then to use different 
> ports for each instance.  The same thing can be accomplished using two IP 
> addresses if available, instead of two different points.
> 
> ---
> Hans Zaunere
> President, Founder
> 
> New York PHP
> http://www.nyphp.org
> 
> AMP Technology

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php 4 & php 5

2005-03-13 Thread Hans Zaunere

> Do you mean by using virtual host directives of apache ?
> 
> But how about the configuration to make requests for certain
> directories to be handled by php4 or php5.
> 
> For ex.
> 
> /var/www/html/site needs php5 but /var/www/html/legacy does not
> support php5 so I have to run php4.
> 
> Any tips regarding the configuration of php and/or apache ?

Per option 1 below, they were saying two installs of Apache or one install of 
Apache directed to use different httpd.conf files, then to use different ports 
for each instance.  The same thing can be accomplished using two IP addresses 
if available, instead of two different points.


---
Hans Zaunere
President, Founder

New York PHP
http://www.nyphp.org

AMP Technology
Supporting Apache, MySQL and PHP


> > > > Is there a way to install two version of php on the same machine, and
> > > > use them for two different users?
> > >
> > > Option 1:
> > > Install two copies of Apache, with different httpd.conf files, on two
> > > different ports.
> > > Somebody gets stuck using http://example.com:81 (or any port but 80) but
> > > this gives everything you asked for.
> >
> > Or make Apache listen on two IPs - if your provider will do this, or it's 
> > your own
> box, there's not downside.  You could use two domains, or two different 
> subdomains.
> >
> > > Option 4:
> > > In terms of expenses/headaches, you will probably be better off just
> > > buying a second machine.  Problem solved.
> >
> > If you get another machine, you'll need two domains or subdomains anyway.  
> > Just
> put them on the same box, with two IPs.
> >
> > ---
> > Hans Zaunere
> > President, Founder
> >
> > New York PHP
> > http://www.nyphp.org
> >
> > AMP Technology
> > Supporting Apache, MySQL and PHP
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-13 Thread mbneto
Hi Hans,

Do you mean by using virtual host directives of apache ?

But how about the configuration to make requests for certain
directories to be handled by php4 or php5.

For ex.

/var/www/html/site needs php5 but /var/www/html/legacy does not
support php5 so I have to run php4.

Any tips regarding the configuration of php and/or apache ?

- thks


On Fri, 4 Mar 2005 18:13:13 -0500, Hans Zaunere <[EMAIL PROTECTED]> wrote:
> 
> 
> > > Is there a way to install two version of php on the same machine, and
> > > use them for two different users?
> >
> > Option 1:
> > Install two copies of Apache, with different httpd.conf files, on two
> > different ports.
> > Somebody gets stuck using http://example.com:81 (or any port but 80) but
> > this gives everything you asked for.
> 
> Or make Apache listen on two IPs - if your provider will do this, or it's 
> your own box, there's not downside.  You could use two domains, or two 
> different subdomains.
> 
> > Option 4:
> > In terms of expenses/headaches, you will probably be better off just
> > buying a second machine.  Problem solved.
> 
> If you get another machine, you'll need two domains or subdomains anyway.  
> Just put them on the same box, with two IPs.
> 
> ---
> Hans Zaunere
> President, Founder
> 
> New York PHP
> http://www.nyphp.org
> 
> AMP Technology
> Supporting Apache, MySQL and PHP
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-05 Thread Rasmus Lerdorf
Richard Lynch wrote:
timothy johnson wrote:
Is there a way to install two version of php on the same machine, and
use them for two different users?

Option 1:
Install two copies of Apache, with different httpd.conf files, on two
different ports.
Somebody gets stuck using http://example.com:81 (or any port but 80) but
this gives everything you asked for.
Option 2:
Use --enable-versioning while compiling PHP.  This definitely allowed for
PHP3 and PHP4 and *might* allow for 4&5...  Or not.  RTFM
But you won't get different Users.
Option 3:
Install at least one of the two as CGI (fastCGI, whatever), and use a
different extension (.php4 or .php5) or use other means (ForceType,
AddHandler, AddType, etc) to change which is used on a per directory
basis.  Use suexec, if you UNDERSTAND THE RAMIFICATIONS to alter the user
of the CGI process.  Mis-use of suexec is incredibly dangerous.  YMMV 
NAIAA  IANAL
The CGI usage will lose some minimal functionality.  HTTP Authentication
springs to mind, but there are 3 or 4 functions/features that just plain
won't work in CGI.  RTFM

Option 4:
In terms of expenses/headaches, you will probably be better off just
buying a second machine.  Problem solved.
Running 2 Apache instances is by far the easiest solution.  And to make 
it invisible to the end user you can ProxyPass connections from your 
port 80 server to your port 81 or whatever port you put it on. For 
example, I have a test app giving PHP 5.1 and the Yahoo Web Services a 
workout on a server that also has a bunch of PHP4 stuff.

The URL is:  http://buzz.progphp.com
This is actually being served off of a port 81 server.  The port 80 conf 
 file has this entry in the buzz vhost:

ProxyPass / http://buzz.progphp.com:81/
Then in the port 81 server I just have a standard vhost config for buzz 
listening on port 81.

If you go to the HTTP Headers block of:
http://buzz.progphp.com/info.php
You can see that you end up with:
Host: buzz.progphp.com:81
Via: 1.1 buzz.progphp.com (Apache/1.3.33)
X-Forwarded-For: 24.6.1.160
X-Forwarded-Host: buzz.progphp.com
X-Forwarded-Server: buzz.progphp.com
So the only thing you may need to change in an application running 
behind ProxyPass is if you have $_SERVER["REMOTE_ADDR"] somewhere. 
Change that to use $_SERVER["HTTP_X_FORWARDED_FOR"] instead.

-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php 4 & php 5

2005-03-04 Thread Hans Zaunere


> > Is there a way to install two version of php on the same machine, and
> > use them for two different users?
> 
> Option 1:
> Install two copies of Apache, with different httpd.conf files, on two
> different ports.
> Somebody gets stuck using http://example.com:81 (or any port but 80) but
> this gives everything you asked for.

Or make Apache listen on two IPs - if your provider will do this, or it's your 
own box, there's not downside.  You could use two domains, or two different 
subdomains.

> Option 4:
> In terms of expenses/headaches, you will probably be better off just
> buying a second machine.  Problem solved.

If you get another machine, you'll need two domains or subdomains anyway.  Just 
put them on the same box, with two IPs.


---
Hans Zaunere
President, Founder

New York PHP
http://www.nyphp.org

AMP Technology
Supporting Apache, MySQL and PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-04 Thread Richard Lynch
timothy johnson wrote:
> Is there a way to install two version of php on the same machine, and
> use them for two different users?

Option 1:
Install two copies of Apache, with different httpd.conf files, on two
different ports.
Somebody gets stuck using http://example.com:81 (or any port but 80) but
this gives everything you asked for.

Option 2:
Use --enable-versioning while compiling PHP.  This definitely allowed for
PHP3 and PHP4 and *might* allow for 4&5...  Or not.  RTFM
But you won't get different Users.

Option 3:
Install at least one of the two as CGI (fastCGI, whatever), and use a
different extension (.php4 or .php5) or use other means (ForceType,
AddHandler, AddType, etc) to change which is used on a per directory
basis.  Use suexec, if you UNDERSTAND THE RAMIFICATIONS to alter the user
of the CGI process.  Mis-use of suexec is incredibly dangerous.  YMMV 
NAIAA  IANAL
The CGI usage will lose some minimal functionality.  HTTP Authentication
springs to mind, but there are 3 or 4 functions/features that just plain
won't work in CGI.  RTFM

Option 4:
In terms of expenses/headaches, you will probably be better off just
buying a second machine.  Problem solved.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php 4 & php 5

2005-03-04 Thread Jay Blanchard
[snip]
[snip]
> No.
> 
Yes. ;)
[/snip]

Why?
[/snip]

Never mind...Friday afternoon...it's five o'clock right here.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php 4 & php 5

2005-03-04 Thread Jay Blanchard
[snip]
> No.
> 
Yes. ;)
[/snip]

Why?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: [PHP] php 4 & php 5

2005-03-04 Thread Mario Micklisch
> [snip]
> Is there a way to install two version of php on the same machine, and
> use them for two different users?
> [/snip]
> 
> No.

Yes!

Having that in my LiteSpeed-Servers configuration with 3 different PHP
Versions. No problem if you use CGI or fastCgi's. On Apache also possible
via the VHost-Settings to assign a version to any selected VirtualHosts.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php 4 & php 5

2005-03-04 Thread John Nichel
Jay Blanchard wrote:
[snip]
Is there a way to install two version of php on the same machine, and
use them for two different users?
[/snip]
No.
Yes. ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php 4 & php 5

2005-03-04 Thread Jay Blanchard
[snip]
Is there a way to install two version of php on the same machine, and
use them for two different users?
[/snip]

No.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php 4 & php 5

2005-03-04 Thread timothy johnson
Is there a way to install two version of php on the same machine, and
use them for two different users?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php