There are scenarios where php4 code will not run on a php5 system.
php5 has magic functions that are not defined in 4 (there could be
collisions here),
also there are new functions in the standard api that are new (possible
collisions here)
php5 defines object that are not defined in 4; like DateTime; i ran into
that porting a DateTime
class from 4 to 5 recently.  there may be other weirdnesses that break
things as well, but the
best thing to do would be to test on a mod-php 5 system first prior to a run
under quercus.
as we can see from the original post
I tried using Quercus but have run into problems. AFAICT, Quercus
supports PHP5 and that may be causing the errors. To confirm this, I
tried the site under Apache + PHP4 (works), and Apache + PHP5

it sounds like quercus wasnt written to really support 4, but from
everything i read the migration
of php4 codebase to a php5 server shouldnt be too bad.
here are some official references on the php site

Fred, when testing on the mod-php5 setup, did you make sure to update
php.ini to reflect your configuration
on the php4 system?  also, there will have to be configuration changes made
to the quercus instance as well.
i wouldnt be surprised if some of the issues are there; plus, i recall
reading about a setting that can help in the
migration process, turning it on until the code is running smoothly then
turning it off at that point; ill try to find that article if i can.
in general i think the issues you will run into will be small, an obscure
getting the php4 code to run under 5; but i would definately
get it running on the mod-php5 box first before attempting the move to
quercus.  that way you will understand the challanges
and already be prepared for them.

as far as to upgrade or not to upgrade; i am a believer in always being up
to date; for the sake of being up to date.
php4 is outdated; the xml framework has been massively revised among many
other dramatic core changes, not including the oo features.
also, php5 supports the same procedural programing 4 does, so the
simpleprogramming is still there and if you prefer programming
that is no excuse to stay w/ 4.
in general i like to model php scripts much like java files; having each
file declare a class; where the name of the file reflects the name of the
defined within, capitalized of course.  in my view, php code that resides
outside of a class is synonymous to code within a main method in c or java.


On 6/12/07, Scott Ferguson <[EMAIL PROTECTED]> wrote:

On Jun 12, 2007, at 6:07 PM, [EMAIL PROTECTED] wrote:

> Hi Yong, Nathan,
> Thanks for your responses. Sure, ideally the site would move to
> PHP5 but
> I don't know if that's possible in the short term. Assuming that it's
> not, I
> was hoping for another possibility to get the site working under PHP4
> within Resin. Any ideas?

What is the specific problem you're seeing?  It might be a Quercus bug.

PHP 5 should only be an extention of PHP 4, so all PHP 4 applications
should work fine.  It might be a bug in Quercus.

(Actually, Quercus can generate faster code for PHP 4 style function
calls than it can for method invocations, so PHP 5 isn't always
better.  And sometimes the simplicity of PHP 4 is better than using
PHP 5 objects.  The object stuff can often be moved into Java code.)

-- Scott

> Thanks again!
> Fred
> On Tue, 12 Jun 2007 19:26:29 -0400, "Nathan Nobbe"
>> Fred,
>> i like what yong has to say on this one.  i just got a new job a
>> couple
>> of
>> months back and was shocked to find
>> the company still deep into php4 w/ no strategy to move to 5.
>> although 6 doesnt have a clear deadline, i would assume it is only a
>> matter
>> of time. and i would not like to be
>> in the position of migrating directly from 4 to 6; i dont know
>> maybe it
>> wont
>> be so bad compared to migration to 5,
>> but i just dont like to be behind.
>> just my 2 c :>
>> -nathan
>> On 6/12/07, Yong Bakos <[EMAIL PROTECTED]> wrote:
>>> Hey Fred, is the site very big or complex? I recommend moving to
>>> PHP5
>>> whenever doing so causes too much bloodshed.
>>> Quercus is based on PHP5 with an eye on PHP6.
>>> Good luck,
>>> Yong
>>> On Jun 12, 2007, at 1:24 PM, [EMAIL PROTECTED] wrote:
>>> Hi,
>>> I have a site using PHP4 that I would like to run under Resin,
>>> because I also have J2EE applications already running under Resin
>>> and would like to keep it all under one roof.
>>> I tried using Quercus but have run into problems. AFAICT, Quercus
>>> supports PHP5 and that may be causing the errors. To confirm this, I
>>> tried the site under Apache + PHP4 (works), and Apache + PHP5
>>> (errors).
>>> So PHP5 seems to be causing the errors. Is there any way that I can
>>> run this PHP4 site under Resin? If this is not possible using
>>> Quercus, is there another option? Would using net.php.servlet and
>>> phpsrvlt.jar work under Resin? Has anyone tried this option, is it
>>> reliable?
>>> Thanks in advance, your advice would be greatly appreciated.
>>> Fred
>>> --
>>> _______________________________________________
>>> resin-interest mailing list
>>> _______________________________________________
>>> resin-interest mailing list
> --
> _______________________________________________
> resin-interest mailing list

resin-interest mailing list

resin-interest mailing list

Reply via email to