f



Please Reproduce: PHP 5.2 -> 5.3 Windows Apache2.2 crash

Hi,

Recently moved from 5.2 to 5.3.

Now Apache will crash on loading pretty much all my pages with this in the 
error report;

szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll
szModVer : 5.3.1.0 offset : 0000c266

Eventually found out how it happens.

If I pass to a function an undefined variable as per example;

function testing($var1,$var2){
return 1;
}

echo testing($undefined1,$undefined2);

It will crash. No error in Apache log, no error in PHP log.

If I define $undefined2 before calling testing() then it won't crash.

Whether I define $undefined1 or not (strangely, if not strange enough 
already) doesn't make any difference, only causes a crash on the second or 
higher variable in the function definition.

Whether or not I specify $var2 = null or any other value in the function 
definition; it will still crash if $undefined2 is not previously defined.

Looking at the changes between 5.2 and 5.3 ; I assume this problem has 
spawned from this reported change

"The newer internal parameter parsing API has been applied across all the 
extensions bundled with PHP 5.3.x. This parameter parsing API causes 
functions to return NULL when passed incompatible parameters. There are some 
exceptions to this rule, such as the get_class() function, which will 
continue to return FALSE on error"



Now; I'm sure you may say, well that's just bad coding practice, you should 
always define your variables before calling them. Perhaps that may be true; 
but from the many years that I have constructed my system , I have depended 
on this behaviour and it suits me well. If I am to change the way I code; 
then it will take a little while for me to fix this issue.


So I guess I am just asking at this stage if anyone can confirm the issue at 
hand; then I suppose I will submit a PHP bug report and hope something can 
be done.

Appreciate any help,


Jett 


0
Jett
3/4/2010 5:07:25 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

18 Replies
2128 Views

Similar Articles

[PageSpeed] 41

El 04/03/2010 6:07, Jett escribi�/wrote:
> szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll
> szModVer : 5.3.1.0 offset : 0000c266
>
> Eventually found out how it happens.
>
> If I pass to a function an undefined variable as per example;
>
> function testing($var1,$var2){
> return 1;
> }
>
> echo testing($undefined1,$undefined2);
>
> It will crash. No error in Apache log, no error in PHP log.
>
> If I define $undefined2 before calling testing() then it won't crash.
>
> Whether I define $undefined1 or not (strangely, if not strange enough
> already) doesn't make any difference, only causes a crash on the second or
> higher variable in the function definition.
>
> Whether or not I specify $var2 = null or any other value in the function
> definition; it will still crash if $undefined2 is not previously defined.
>
> Looking at the changes between 5.2 and 5.3 ; I assume this problem has
> spawned from this reported change
>
> "The newer internal parameter parsing API has been applied across all the
> extensions bundled with PHP 5.3.x. This parameter parsing API causes
> functions to return NULL when passed incompatible parameters. There are some
> exceptions to this rule, such as the get_class() function, which will
> continue to return FALSE on error"
>
>
>
> Now; I'm sure you may say, well that's just bad coding practice, you should
> always define your variables before calling them. Perhaps that may be true;
> but from the many years that I have constructed my system , I have depended
> on this behaviour and it suits me well. If I am to change the way I code;
> then it will take a little while for me to fix this issue.
>
>
> So I guess I am just asking at this stage if anyone can confirm the issue at
> hand; then I suppose I will submit a PHP bug report and hope something can
> be done.
>
> Appreciate any help,

No crash for me (32-bit Windows Server 2003, PHP 5.3.0 running as Apache 
2.2 module). And I think I would have noticed so because I mistype 
variable names all the time.

Have you tried a bare PHP setup with no extensions loaded?


-- 
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
0
ISO
3/4/2010 10:08:48 AM
Jett wrote:
> Hi,
> 
> Recently moved from 5.2 to 5.3.
> 
> Now Apache will crash on loading pretty much all my pages with this in the 
> error report;
> 
> szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll
> szModVer : 5.3.1.0 offset : 0000c266
> 
> Eventually found out how it happens.
> 
> If I pass to a function an undefined variable as per example;
> 
> function testing($var1,$var2){
> return 1;
> }
> 
> echo testing($undefined1,$undefined2);
> 
> It will crash. No error in Apache log, no error in PHP log.
> 
> If I define $undefined2 before calling testing() then it won't crash.
> 
> Whether I define $undefined1 or not (strangely, if not strange enough 
> already) doesn't make any difference, only causes a crash on the second or 
> higher variable in the function definition.
> 
> Whether or not I specify $var2 = null or any other value in the function 
> definition; it will still crash if $undefined2 is not previously defined.
> 
> Looking at the changes between 5.2 and 5.3 ; I assume this problem has 
> spawned from this reported change
> 
> "The newer internal parameter parsing API has been applied across all the 
> extensions bundled with PHP 5.3.x. This parameter parsing API causes 
> functions to return NULL when passed incompatible parameters. There are some 
> exceptions to this rule, such as the get_class() function, which will 
> continue to return FALSE on error"
> 
> 
> 
> Now; I'm sure you may say, well that's just bad coding practice, you should 
> always define your variables before calling them. Perhaps that may be true; 
> but from the many years that I have constructed my system , I have depended 
> on this behaviour and it suits me well. If I am to change the way I code; 
> then it will take a little while for me to fix this issue.
> 
> 
> So I guess I am just asking at this stage if anyone can confirm the issue at 
> hand; then I suppose I will submit a PHP bug report and hope something can 
> be done.
> 
> Appreciate any help,
> 
> 
> Jett 
> 
> 

Whether you've depended on this behavior for years or not, it's crappy 
coding practice.  It leaves your code open to all kinds of future 
problems - like what happens if you come along at some time and define 
the variable for another reason?  Your code should run with no messages 
when your php.ini file has:

error_reporting = E_ALL
display_errors = on

Irregardless, coding errors in your scripts should not cause Apache to 
crash.  First, ensure you are using the correct php5ts.dll; you might 
have multiple copies if it running around.  You might also check 
bugs.php.net; others have seen crashes also, but I don't see anything 
which jumps out as the exact problem you're seeing.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
3/4/2010 11:14:51 AM
Found out it only happens when code is encoded with Ioncube;  still chasing 
it up with them directly,

Cheers,

-- 


"Jett" <jonjett80gmail> wrote in message 
news:4b8f4011$1@dnews.tpgi.com.au...
> Hi,
>
> Recently moved from 5.2 to 5.3.
>
> Now Apache will crash on loading pretty much all my pages with this in the 
> error report;
>
> szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll
> szModVer : 5.3.1.0 offset : 0000c266
>
> Eventually found out how it happens.
>
> If I pass to a function an undefined variable as per example;
>
> function testing($var1,$var2){
> return 1;
> }
>
> echo testing($undefined1,$undefined2);
>
> It will crash. No error in Apache log, no error in PHP log.
>
> If I define $undefined2 before calling testing() then it won't crash.
>
> Whether I define $undefined1 or not (strangely, if not strange enough 
> already) doesn't make any difference, only causes a crash on the second or 
> higher variable in the function definition.
>
> Whether or not I specify $var2 = null or any other value in the function 
> definition; it will still crash if $undefined2 is not previously defined.
>
> Looking at the changes between 5.2 and 5.3 ; I assume this problem has 
> spawned from this reported change
>
> "The newer internal parameter parsing API has been applied across all the 
> extensions bundled with PHP 5.3.x. This parameter parsing API causes 
> functions to return NULL when passed incompatible parameters. There are 
> some exceptions to this rule, such as the get_class() function, which will 
> continue to return FALSE on error"
>
>
>
> Now; I'm sure you may say, well that's just bad coding practice, you 
> should always define your variables before calling them. Perhaps that may 
> be true; but from the many years that I have constructed my system , I 
> have depended on this behaviour and it suits me well. If I am to change 
> the way I code; then it will take a little while for me to fix this issue.
>
>
> So I guess I am just asking at this stage if anyone can confirm the issue 
> at hand; then I suppose I will submit a PHP bug report and hope something 
> can be done.
>
> Appreciate any help,
>
>
> Jett
> 


0
Jett
3/9/2010 7:30:20 AM
On Thu, 04 Mar 2010 16:07:25 +1100, Jett wrote:


> Recently moved from 5.2 to 5.3.

Not smart. Many PEAR packages do not work with 5.3, HTML_Table being one 
of them. I will continue using the 5.2 lines until they do start working.
If you ask me, 5.3 is a bit of a blunder, precisely because of 
invalidating those packages.



-- 
I don't think, therefore I am not.
0
Deadly
4/24/2010 4:57:10 AM
Deadly Dirk wrote:
> On Thu, 04 Mar 2010 16:07:25 +1100, Jett wrote:
> 
> 
>> Recently moved from 5.2 to 5.3.
> 
> Not smart. Many PEAR packages do not work with 5.3, HTML_Table being one 
> of them. I will continue using the 5.2 lines until they do start working.
> If you ask me, 5.3 is a bit of a blunder, precisely because of 
> invalidating those packages.
> 
> 
> 

Which has absolutely nothing to do with the op's problems.

PHP 5.3 works fine when set up properly.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/24/2010 9:48:13 AM
On Sat, 24 Apr 2010 05:48:13 -0400, Jerry Stuckle wrote:


> Which has absolutely nothing to do with the op's problems.

That is true.

> 
> PHP 5.3 works fine when set up properly.

Problem is that you have to "set it up properly". If I have to set it up, 
it will require changes to an awful lot of my scripts, something that I 
am unwilling to do. I'll rather switch to Python. Either the modules will 
start working out of the box or I'll use something else. That's very 
simple. The elephant in the room is that nobody is using PHP 5.3, unless 
we're talking about an absolute beginner and there are ever fewer of 
those.

Well, now I've spilled it out. Unless something is done so that PEAR 
packages start working with 5.3 out of the box, I will stop using PHP 
altogether. I am just one person, but being someone who has written a 
book about PHP and used it for a long time, I think my voice matters.

I know you to be a programming purist, we had out run-ins, but this is 
serious. PHP 5.3 is a complete disaster and, unless something is done to 
fix the packages to work out of the box, PHP will wilt and shrivel into 
irrelevance. My assumption is that you are in contact with the people who 
actually make decisions about PHP and that you can talk to someone about 
that. As I've said before, I will rather abandon PHP altogether than go 
and do "a proper setup" for the PEAR packages I am using in each and 
every script I ever wrote. If long term users with vested interest start 
abandoning PHP, then PHP has a problem, whether you like it or not.

And it's not just me. I work for a company, I have an influence over what 
scripting language gets selected for application(s). I am recommending 
Python for some time now. I haven't yet made decision about ditching PHP 
entirely and rewriting a few thousand lines of the existing code, but I 
am close to that point. PHP 5.3 is a sheer and unbridled disaster which 
may bury PHP as a language.


-- 
http://mgogala.byethost5.com
0
Mladen
4/24/2010 5:31:22 PM
Mladen Gogala wrote:
> On Sat, 24 Apr 2010 05:48:13 -0400, Jerry Stuckle wrote:
> 
> 
>> Which has absolutely nothing to do with the op's problems.
> 
> That is true.
> 
>> PHP 5.3 works fine when set up properly.
> 
> Problem is that you have to "set it up properly". If I have to set it up, 
> it will require changes to an awful lot of my scripts, something that I 
> am unwilling to do. I'll rather switch to Python. Either the modules will 
> start working out of the box or I'll use something else. That's very 
> simple. The elephant in the room is that nobody is using PHP 5.3, unless 
> we're talking about an absolute beginner and there are ever fewer of 
> those.
>

If you set it up incorrectly, then yes, you will have to change a lot of 
scripts.  Set it up properly, and that is not true.

And don't believe nobody is using PHP 5.3.  There are a lot of 
*experienced* users out there using it.  The difference is we know what 
we're doing.

I suggest you just switch to Python now.  Don't worry any more about PHP.

> Well, now I've spilled it out. Unless something is done so that PEAR 
> packages start working with 5.3 out of the box, I will stop using PHP 
> altogether. I am just one person, but being someone who has written a 
> book about PHP and used it for a long time, I think my voice matters.
> 

Please start using Python.  PEAR packages will be fixed eventually.  And 
your voice matters no more nor no less than any other programmer's.

> I know you to be a programming purist, we had out run-ins, but this is 
> serious. PHP 5.3 is a complete disaster and, unless something is done to 
> fix the packages to work out of the box, PHP will wilt and shrivel into 
> irrelevance. My assumption is that you are in contact with the people who 
> actually make decisions about PHP and that you can talk to someone about 
> that. As I've said before, I will rather abandon PHP altogether than go 
> and do "a proper setup" for the PEAR packages I am using in each and 
> every script I ever wrote. If long term users with vested interest start 
> abandoning PHP, then PHP has a problem, whether you like it or not.
> 

No, I'm not a purist.  But I write good code - so I don't run into many 
of the problems you have.  PHP 5.3 does have changes, and some of those 
result in incompatibilities with older code.  Such is the case as a 
language matures.  Admittedly, PHP has more problems than many because 
it wasn't designed well in the first place.  But that's coming.

So please - abandon PHP and go to Python.

> And it's not just me. I work for a company, I have an influence over what 
> scripting language gets selected for application(s). I am recommending 
> Python for some time now. I haven't yet made decision about ditching PHP 
> entirely and rewriting a few thousand lines of the existing code, but I 
> am close to that point. PHP 5.3 is a sheer and unbridled disaster which 
> may bury PHP as a language.
> 
> 

That's fine.  Please - use Python.  The good programmers will continue 
with PHP - and succeed.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/24/2010 6:03:48 PM
On Sat, 24 Apr 2010 14:03:48 -0400, Jerry Stuckle wrote:

> That's fine.  Please - use Python.  The good programmers will continue
> with PHP - and succeed.

Good luck.



-- 
http://mgogala.byethost5.com
0
Mladen
4/24/2010 7:11:15 PM
Mladen Gogala wrote:
> On Sat, 24 Apr 2010 14:03:48 -0400, Jerry Stuckle wrote:
> 
>> That's fine.  Please - use Python.  The good programmers will continue
>> with PHP - and succeed.
> 
> Good luck.
> 
> 
> 

No luck needed.  Just competence.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/24/2010 7:17:21 PM
On Sat, 24 Apr 2010 15:17:21 -0400, Jerry Stuckle wrote:

> Mladen Gogala wrote:
>> On Sat, 24 Apr 2010 14:03:48 -0400, Jerry Stuckle wrote:
>> 
>>> That's fine.  Please - use Python.  The good programmers will continue
>>> with PHP - and succeed.
>> 
>> Good luck.
>> 
>> 
>> 
>> 
> No luck needed.  Just competence.

Without any intention of getting into "I'm smarter then you" type of 
debate with you, let me just point out a simple and easy to check fact 
that zealots usually destroy precisely the object of their unlimited 
love and devotion. Murphy has phrased it it a bit differently, but that 
would be insulting for you and, as opposed to you, I don't subscribe to 
throwing around personal insults on groups about the information 
technology.

You managed to insult me, a long term user and a proponent of PHP, all in 
the name of what can only be described as "PHP religion". Let's hope that 
there are smarter people than you on the PHP group. Plonk.



-- 
http://mgogala.byethost5.com
0
Mladen
4/24/2010 9:29:17 PM
Mladen Gogala wrote:
> On Sat, 24 Apr 2010 15:17:21 -0400, Jerry Stuckle wrote:
> 
>> Mladen Gogala wrote:
>>> On Sat, 24 Apr 2010 14:03:48 -0400, Jerry Stuckle wrote:
>>>
>>>> That's fine.  Please - use Python.  The good programmers will continue
>>>> with PHP - and succeed.
>>> Good luck.
>>>
>>>
>>>
>>>
>> No luck needed.  Just competence.
> 
> Without any intention of getting into "I'm smarter then you" type of 
> debate with you, let me just point out a simple and easy to check fact 
> that zealots usually destroy precisely the object of their unlimited 
> love and devotion. Murphy has phrased it it a bit differently, but that 
> would be insulting for you and, as opposed to you, I don't subscribe to 
> throwing around personal insults on groups about the information 
> technology.
> 
> You managed to insult me, a long term user and a proponent of PHP, all in 
> the name of what can only be described as "PHP religion". Let's hope that 
> there are smarter people than you on the PHP group. Plonk.
> 
> 
> 

ROFLMAO!  I said NOTHING about you - other than to call you on your 
threat to change to Python.  If you are incompetent, then that is YOUR 
problem - not mine.

It doesn't make any difference how long you've used PHP.  You want to go 
to Python - please do.

We don't need noobs like you around here.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/24/2010 9:33:41 PM
On Sat, 24 Apr 2010 17:33:41 -0400, Jerry Stuckle wrote:
> ROFLMAO!  I said NOTHING about you - other than to call you on your 
> threat to change to Python.  If you are incompetent, then that is YOUR 
> problem - not mine.
>
> It doesn't make any difference how long you've used PHP.  You want to go 
> to Python - please do.

It's a cheap manipulation to see if he can encourage answers he likes
better. As though we had something invested in him continuing to use
PHP.

-- 
46. If an advisor says to me "My liege, he is but one man. What can one
    man possibly do?", I will reply "This." and kill the advisor.
	--Peter Anspach's list of things to do as an Evil Overlord
0
Peter
4/24/2010 10:25:02 PM
On Sat, 24 Apr 2010 22:25:02 +0000, Peter H. Coffin wrote:

> It's a cheap manipulation 

Manipulation??? I stated my goals quite openly.

> to see if he can encourage answers he likes
> better.

Encourage answers? I had no idea that posting on a PHP required courage. 
Any purple hearts going around?





-- 
http://mgogala.byethost5.com
0
Mladen
4/24/2010 10:30:26 PM
Peter H. Coffin wrote:
> On Sat, 24 Apr 2010 17:33:41 -0400, Jerry Stuckle wrote:
>> ROFLMAO!  I said NOTHING about you - other than to call you on your 
>> threat to change to Python.  If you are incompetent, then that is YOUR 
>> problem - not mine.
>>
>> It doesn't make any difference how long you've used PHP.  You want to go 
>> to Python - please do.
> 
> It's a cheap manipulation to see if he can encourage answers he likes
> better. As though we had something invested in him continuing to use
> PHP.
> 

Yea, he thinks since he co-wrote "Easy PHP Oracle", he should get 
special treatment.  It doesn't work that way.

If he prefers Python over PHP, I wish he would just go to the Python 
newsgroups and take his whining with him.

I really don't think he expected anyone to tell him to go ahead and do it :)

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/24/2010 11:01:15 PM
Mladen Gogala <gogala.mladen@gmail.com> wrote:

> On Sat, 24 Apr 2010 05:48:13 -0400, Jerry Stuckle wrote:

<snip>

>> PHP 5.3 works fine when set up properly.
> 
> Problem is that you have to "set it up properly".

This is something PHP users should have been doing since long 
before 5.3.  Do you just use one of the stock php.ini config files 
without even taking a look?  Ah, but if you're going to use 
Oracle, or other extensions, you have to get them set up properly.  
This has been necessary for a long time.

Even for Python, Perl, or other server-side scripting languages, 
you have some setting up to do to get them to work as CGIs or, in 
the case of Apache, modules.

> If I have to
> set it up, it will require changes to an awful lot of my
> scripts, something that I am unwilling to do.

I've been using 5.3 for a while now, and I still have scripts that 
I wrote under PHP 4 that run fine without modification.

> I'll rather switch
> to Python. Either the modules will start working out of the box
> or I'll use something else. That's very simple. The elephant in
> the room is that nobody is using PHP 5.3, unless we're talking
> about an absolute beginner and there are ever fewer of those.

While this may be your experience, it is not mine.

> Well, now I've spilled it out. Unless something is done so that
> PEAR packages start working with 5.3 out of the box, I will stop
> using PHP altogether. I am just one person, but being someone
> who has written a book about PHP and used it for a long time, I
> think my voice matters. 

Personally, I don't use PEAR packages, but you should note that 
the PHP core devs aren't responsible for each and every PEAR 
package (if any at all; PEAR seems to have its own governing 
body).

If you want to make appeals, you're doing it in the wrong place.  
Head to <http://pear.php.net/> and get in contact with the 
maintainers of the packages you use.  As mentioned upthread, most 
packages will likely be updated.  In fact, you're free to 
contribute patches of your own, if you have the time and 
inclination.

There's also an official php.net news server:  <news.php.net>.

> I know you to be a programming purist, we had out run-ins, but
> this is serious. PHP 5.3 is a complete disaster and, unless
> something is done to fix the packages to work out of the box,
> PHP will wilt and shrivel into irrelevance.

Can you provide any authoritative evidence that PHP will likely 
lose a serious amount of users due to incompatible PEAR packages?  
Again though, it's unlikely that actively maintained packages will 
be incompatible for long.

> My assumption is
> that you are in contact with the people who actually make
> decisions about PHP and that you can talk to someone about that.

Why would you assume that?  I haven't seen any indications that 
this is the case.

> As I've said before, I will rather abandon PHP altogether than
> go and do "a proper setup" for the PEAR packages I am using in
> each and every script I ever wrote.

What are the problems you're having with this "proper setup" you 
seem to be dreading?

> If long term users with
> vested interest start abandoning PHP, then PHP has a problem,
> whether you like it or not. 

If this were indeed the case...

> And it's not just me. I work for a company, I have an influence
> over what scripting language gets selected for application(s).

That's nice.

> I
> am recommending Python for some time now.

Great!  Python seems to be a pretty nice language.  It's 
interesting you condemn PHP's backward compatibility, though, 
considering:

  # Python 2.5
  print 'Hello, World!\n'

  # Python 3
  print 'Hello, World!\n'

  # Whoops, SyntaxError in Python 3.
  # No more `print' statement; `print' is now a function.

I'm aware Python 3 was deliberately intended to break backward 
compatibility, I'm just being a bit facetious. :P

> I haven't yet made
> decision about ditching PHP entirely and rewriting a few
> thousand lines of the existing code, but I am close to that
> point. PHP 5.3 is a sheer and unbridled disaster which may bury
> PHP as a language. 

Is there any reason you need to upgrade to 5.3 immediately?  Also, 
there are probably many factors that need to be weighed when 
considering rewrites.  For one, what about the time it would take 
for the current devs to learn another language?  They might well 
pick up Python syntax relatively quickly, but it takes time to 
learn to use a language's standard library well.  Python's 
implementation of OOP is also quite different from PHP's.  
Basically, it will be quite some time before the devs start 
writing "pythonic" code and become "pythonistas".  This is true of 
learning any new languages.

-- 
Curtis Dyer
<? $x='<? $x=%c%s%c;printf($x,39,$x,39);?>';printf($x,39,$x,39);?>
0
Curtis
4/27/2010 9:16:33 AM
On Tue, 27 Apr 2010 09:16:33 +0000, Curtis Dyer wrote:


> I've been using 5.3 for a while now, and I still have scripts that I
> wrote under PHP 4 that run fine without modification.

OK, how do you make PEAR HTML_Table and HTML_Form work with 5.3? I was 
getting a bunch of error messages about assignment by reference and it 
wasn't working properly. I have a decent collection of code and I am in 
no mood for rewriting. That is my problem. The same goes for HTML_Table.  
If you can make it work with 5.3, I am all ears. If I have to rewrite all 
of my scripts, I will use something with better track record in 
compatibilty. It's as simple as that. So, how do you get those specific 
two packages to work? They're embedded in virtually all of my scripts and 
I will be extremely annoyed if I have to rewrite it all. As far as I am 
aware, there is no php.ini parameters that would fix that. If you are 
better informed than me, please let me know, I will forever be in your 
debt.

-- 
http://mgogala.byethost5.com
0
Mladen
4/28/2010 12:12:24 AM
Mladen Gogala wrote:
> On Tue, 27 Apr 2010 09:16:33 +0000, Curtis Dyer wrote:
> 
> 
>> I've been using 5.3 for a while now, and I still have scripts that I
>> wrote under PHP 4 that run fine without modification.
> 
> OK, how do you make PEAR HTML_Table and HTML_Form work with 5.3? I was 
> getting a bunch of error messages about assignment by reference and it 
> wasn't working properly. I have a decent collection of code and I am in 
> no mood for rewriting. That is my problem. The same goes for HTML_Table.  
> If you can make it work with 5.3, I am all ears. If I have to rewrite all 
> of my scripts, I will use something with better track record in 
> compatibilty. It's as simple as that. So, how do you get those specific 
> two packages to work? They're embedded in virtually all of my scripts and 
> I will be extremely annoyed if I have to rewrite it all. As far as I am 
> aware, there is no php.ini parameters that would fix that. If you are 
> better informed than me, please let me know, I will forever be in your 
> debt.
> 

Report the bugs and have the package developers fix them.  Or fix them 
yourself.

The packages will catch up.

The difference is I don't use many PEAR classes - especially HTML_Table 
and HTML_Form.  I can do it better and faster in my own code.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
4/28/2010 1:03:34 AM
Mladen Gogala <mgogala@no.address.invalid> wrote:

> On Tue, 27 Apr 2010 09:16:33 +0000, Curtis Dyer wrote:
> 
> 
>> I've been using 5.3 for a while now, and I still have scripts
>> that I wrote under PHP 4 that run fine without modification.
> 
> OK, how do you make PEAR HTML_Table and HTML_Form work with 5.3?

As I said in my initial reply to you (part of the portion you 
snipped), I don't use PEAR.

However, I was curious, so set up PEAR and acquired HTML_Table.  
Right off, PEAR warned that HTML_Common, the class HTML_Table 
extends, is now deprecated in favor of HTML_Common2.  However, you 
can still get HTML_Common just fine, so it's not too big a deal 
for now.

I threw together a test script using HTML_Table.  Although the 
class uses dated OOP, everything seemed to work fine.  The only 
issue I ran into was that I had to disable E_STRICT, since 
HTML_Table seems to frequently call a non-static PEAR method 
statically.

Sorry, I didn't bother trying HTML_Form.  Again, I suggest you get 
in contact with the package maintainers, since they know their own 
software best.

> I was getting a bunch of error messages about assignment by
> reference and it wasn't working properly.

I had a look at the HTML_Table methods that return by reference.  
Since it's still using the PHP 4 OO model, it's returning objects 
by reference, but such practice is unnecessary in PHP 5+ (and may 
not do what you'd expect, in some cases).  That, in and of itself, 
shouldn't cause errors, but without more information and the exact 
error messages you received, it's hard to say.

But note that HTML_Table returns references to what are supposed 
to be private properties.  This is generally bad design, since it 
leaks implementation.

Frankly, you'd be better off designing your own implementation 
that handles tables.  If you simply write a better class that 
mimics HTML_Table's interface, you might be able to get away with 
avoiding rewriting most of your code.

> [...]So, how do you get those specific two
> packages to work? They're embedded in virtually all of my
> scripts and I will be extremely annoyed if I have to rewrite it
> all.

I've already given my suggestions (Jerry, too).  You can contact 
the maintainers of the PEAR packages you use, since they're in the 
best position to affect change.  You might also simply wait for 
the maintainers to release updates on their own.  You can try to 
submit your own patches for the packages to the maintainers.

> As far as I am aware, there is no php.ini parameters that
> would fix that. If you are better informed than me, please let
> me know, I will forever be in your debt.

See above responses about contacting the maintainers of the 
packages.

-- 
Curtis Dyer
<? $x='<? $x=%c%s%c;printf($x,39,$x,39);?>';printf($x,39,$x,39);?>
0
Curtis
4/28/2010 11:01:07 AM
Reply:

Similar Artilces:

Install of APACHE 2.5.9 and PHP 5.2.3
Hello, I install the apache server in my Red Hat Linux with ssl support (using openssl 0.9.8) In this step my Apache server started without any problem After this i install php 5.2.3 and i Had this : /etc/init.d/httpd start Syntax error on line 37 of /usr/lib/httpd/modules/httpd.conf: Cannot load /php/libphp5.so into server: /php/libphp5.so: undefined symbol: EVP_CIPHER_CTX_block_size A problem occured, preventing Apache to start Please any one can help me thank's On 12 Jun, 16:06, baroudi <baroudi.abdelmou...@gmail.com> wrote: > > /etc/init.d/http...

apache 2.2.15 service won't start w/ PHP 5.3.2, Windows XP
On a localhost development configuration under Windows XP Pro (SP3), I cannot get Apache2.2.15 http service to start after I enable PHP 5.3.2 as a module. Without PHP, Apache starts and works just fine; PHP itself works (from a command prompt). I had had Apache 2.2.14 and an older PHP 5.2.x working happily together, supporting MySQL, phpMyAdmin, etc. I uninstalled all that and instead: (1) Installed Apache 2.2.15 from httpd-2.2.15-win32-x86-no_ssl.msi (also tried the openssl version when the former + PHP didn't work). It's installed as a service for all users on port 80. And I'...

Load average differences between Apache 1.3.37/PHP 4.4.6 and Apache 2.2.4/PHP 5.2.1
Hi folks, I've encountered something rather strange. This morning, I upgraded our production server, providing web services for our library website, from Apache 1.3.37/PHP 4.4.6 to Apache 2.2.4/PHP 5.2.1. The server, which normally exhibits a load average below 1 most of the time, spiked to loads that approached 100 if left alone. The interesting part of this is that this load average seems to be almost artificial - it appears to be caused by httpd processes stuck in a "closing connection" state (TIME_WAIT, in netstat). These processes are still running according t...

AIX 5.2/php 5.3.2 'make cli' says it succeeds, but no executable
.... Generating phar.php /bin/sh[14]: /usr/local/SRC/php-5.3.2/sapi/cli/php: not found make: The error code from the last command is 127. # make cli echo '\ \ Target "cli" is up to date. CREDITS config.w32 php_cli_readline.c Makefile.frag php.1 php_cli_readline.h README php.1.in php_cli_readline.lo TODO php_cli.c php_cli_readline.o cli_win32.c php_cli.lo tests config.m4 php_cli.o On Apr 8, 10:50=A0am, tkevans <evanst...@gmail.com> wrot...

Apache 2.2.2 and PHP 5.1.4 on Win2k crashing
I just installed Apache 2.2.2 on my Windows 2000 (SP4) machine to test the new version. Everything works except PHP (version 5.1.4): when starting Apache, it pops out a message saying that it is unable to locate the module (even set on the correct path!), stops the execution and exits. On the other side, PHP works fine with Apache 2.0.55, so It's not a problem of a broken build. Got ideas? Thanks. -- Massimo Lombardo unwiredbrain@gmail.com wrote: > I just installed Apache 2.2.2 on my Windows 2000 (SP4) machine to test > the new version. > Everything works except PHP (version ...

PHP 5.2.0 and Python 2.5
Hi Guys, I need some wisdom from you. Is it possible to have PHP pages posting to python scripts on the server side and returning values back to the calling PHP files? Like, if my enterval.php form's action=" think.py", would the two scripts be able to talk to each other? Thanks and Best Regards, "Shortash" Shortash wrote: > Hi Guys, > > I need some wisdom from you. Is it possible to have PHP pages posting > to python scripts on the server side and returning values back to the > calling PHP files? Like, if my enterval.php form's action=" t...

Re: [tao-users] ACE 5.3.5 + TAO 1.3.5 + CIAO 0.3.5 beta released #2 #2
Hi Alex, > What are OCI's plan's for a supported TAO 1.4 release and developer > guide? Will this effect the release of the 1.3 guide? This is an excellent question - I'm sure Malcolm Spence will pitch in when he has a chance and I suspect that OCI will be supporting TAO 1.4 in due time. None of the changes in TAO 1.4 should affect the relevance of the info in the TAO 1.3 developer's guide - there's just more new stuff to document as time permits. Take care, Doug ...

<?= does not work on Windows XP Apache 2.2.x and PHP 5.2.4
When i do <?php echo "This works fine"; ?> Everything works fine. But when i do <?= "Some text"?> nothing works. Any ideas? Best Regards, Nicos On Fri, 28 Sep 2007 10:06:26 +0200, Nicos <nicoskk@gmail.com> wrote: > When i do > <?php > echo "This works fine"; > ?> > Everything works fine. But when i do > <?=3D "Some text"?> nothing works. Any ideas? It relies on short_open_tags, which have been disabled by default for a = = very long time now. Don't rely on them, only keep the setting on fo...

Building for Mac with 2.5.2 or 2.5.3
What's the educated opinion on porting an application to Mac? We've used 2.4 from CVS for both Windows and Linux but found that there were too many problems with 2.4 when trying to compile on Mac ... now we're not sure if 2.5.3 is a moving target on Mac or should we try staying with 2.5.2? Any expert opinions out in the wild? ....Landon --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org For additional commands, e-mail: wx-users-help@lists.wxwidgets.org Hi Please use CVS HEAD...

Printing 2^1, 2^2, 2^3, 2^4 and 2^5
Hi, When I use a while loop, the output is: 2 4 8 16 32, as desired: <?php $c=1; while($c<=5) { $d = newpow(2, $c); print "$d "; $c++; } function newpow($base, $power) { // statements... } ?> The But when I use a for loop, the output is: 64: <?php for($c=1; $c<=5; $c++); { $d = newpow(2, $c); print "$d "; } function newpow($base, $power) { // statements... } ?> Why is this?? Many thanks, Michael mejpark wrote: > When I use a while loop, the output is: 2 4 8 16 32, as desired: [...] > The But when I use a for loop, the output is: 64...

Trouble installing PHP 5.3 on WinXP, Apache 2.2
Hi, I'm trying to install PHP 5.3 on Apache 2.2, WinXP. I've added this line to my httpd.conf file LoadModule php5_module "C:/PHP/php5apache2_2.dll" but when I start Apache using "httpd -k start", I'm getting this error ... C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd -k start httpd: Syntax error on line 503 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/ php5apache2_2.dll into server: The specified module could not be found. I have verified that the file exists. Can anyon...

PHP 5.1.2 and using PHP w Apache2 and MySQL
Hello all, First of all I first dld and installed (unzipped) PHP 5.1.1 before 5.1.2 was released, so do I just unzip 5.1.2 over the existing 5.1.1 and use the same php.ini file, or is there more to it than that? When I run phpinfo it still displays the ver as 5.1.1, is this ok? Also, I have installed Apache 2.0.55 and PHP 5.1.2 (see above 5.1.2 question) on my personal windows me computer, and I would like to install MySQL as well. To the best of my knowledge both of the above SEEM to be working and setup correctly. My goal in doing this is so that I can learn to use Apache, PHP ...

if time = 3 seconds, how do i set the values of the time steps 0,0.1,0.2,0.3,0.5,1.0,1.5,2.0,3.0,5.0 to -9999 from time =3 seconds
Hi &nbsp; I have 18 inputs (arrays) which contain certain statistics and if time&nbsp;&nbsp;= 3 seconds, set the values of time step 5.0 to -9999.0. &nbsp; I was wondering if there is an efficient way to do this without using a lot of case statements? &nbsp; Thank you. Hello AdrianT, it's not really clear to me what you want to do... I suspect: you have an array containing values and you want to output them with a fixed timing of 3 seconds: you should use a for loop autoindexing trough your array and sending the value to your indicator/output/whatever. Put a "wait for next multiple" into your for loop. Or do you want to have a minimum time delay of 3 seconds? Again use a for loop, get the time value and use a InRange&amp;Coerce with minimum set to 3 seconds... Or you should explain more precisely what you need... Hi Thanks for that. Let me explain. &nbsp; The time may vary. Let me give an example. if time&nbsp; = 2.1, I want to set the time step's &nbsp;3.0 and 5.0's values to -9999.0. if the time =0.1 seconds then I want to set 0.2,0.3, 0.5 etc values to -9999.0 etc .................................................................... &nbsp; Can you please help? Thank you. Hello TUDS, do you use different accounts/nicknames ? Well, that's easy, at least for a sorted array: Search for your time-value in the array (Threshold 1D array). Fill all elements from that index till the end with your "error...

IIS6/FastCGI/PHP 5.2.6 to 5.2.9 upgrade loses MSSQL
I have a client who has two web servers running Windows Server 2003 with IIS6, on which I installed FastCGI and PHP 5.2.6 last summer, so that I could write in PHP instead of ASP. The PHP pages use the mssql extension to talk to an external SQL Server. This is all working fine. Today I tried to upgrade PHP on one of them from 5.2.6 to 5.2.9, using the nts msi installation file from php.net. The upgrade went easily, although I had to re-add the .php extension in the IIS configuration. However, I then discovered that the mssql module would no longer load. The PHP log file said php_mssql.dl...

Is Php built in function ' imagecreate()' compatible in Php version 5.2.2 ?
Hi All, I have the php version 5.2.2 . When I am using " $im = imagecreate(......); " I am getting the following message "Fatal error: Call to undefined function imagecreate() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\server.php on line 32" I want to know whether "imagecreate()" is compatible in PHP version 5.2.2.? saikiran.iitkgp@gmail.com wrote: > Hi All, > > I have the php version 5.2.2 . When I am using > > > " $im = imagecreate(......); " I am getting the following message > > > &q...

suppose I have an equation x^2+x+y^2+3*y=5*y^2+3*y+3*x*y+5 and I want to find the set of (x,y) that satisfy the equation.
Question How can i do that? I've been trying, solve, explot and subs. I can get the graph, but i cannot get the (x,y) pairs that I want. When I use function solve to solve the equation in term of x or y and then substitute the numeric value for one of them to find the other, I got the problem about complex numer. This might be because that numeric value that I substitute is not the number that satisfy the equation, so the program give me the result in complex number. Background. I need to use the pairs to find the optimal value of my objective function. I tried to use the fminco...

Apache 2.2.3 PHP 4.4.5 Install Fails
Sigh. I have Apache 2.2.3 installed and running on WinXP Pro SP2. I installed PHP 4.4.5 and added the following lines in httpd.conf PHPIniDir C:/PHP445/ LoadModule php4_module C:/PHP445/php4apache2.dll When I restarted Apache, i got this error: The Apache service reported the following error: >>> httpd.exe: Syntax error on line 488 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP445/php4apache2.dll into server: The specified module could not be found. Turns out that php4apache2.dll requires libapr.dll, libaprutil.dll and libapriconv.dll...

[tao-users] crash in ACE_Sig_Handler::dispatch (5.5.2/1.5.2)
To: ace-bugs@cs.wustl.edu Subject: [area]: [synopsis] ACE VERSION: 5.5.2 HOST MACHINE and OPERATING SYSTEM: Linux janus 2.6.15-25-amd64-generic #1 SMP PREEMPT Wed Jun 14 11:28:03 UTC 2006 x86_64 GNU/Linux TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc (GCC) 4.1.1 THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific file, simply state which one]: #define ACE_HAS_XML_SVC_CONF // workaround for bug in gcc 4.0.x #define ACE_LACKS_PRAGMA_ONCE #include "ace/config-linux.h" THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you use a link to a platform-specific file, simply state which one (unless this isn't used in this case, e.g., with Microsoft Visual C++)]: # configure ACE/TAO for our use templates=automatic debug=1 optimize=1 exceptions=1 threads=1 inline=1 rtti=1 versioned_so=1 ssl=1 #no_hidden_visibility=1 # Disable the RCSID for release/non-debug builds. CPPFLAGS += -DACE_USE_RCSID=0 CC = /opt2/linux/ix86/x86_64-pc-linux-gnu/bin/gcc CXX = /opt2/linux/ix86/x86_64-pc-linux-gnu/bin/g++ CFLAGS += -m64 -I/opt2/linux/x86_64/include CCFLAGS += -m64 -I/opt2/linux/x86_64/include LDFLAGS += -m64 -I/opt2/linux/x86_64/include -L/opt2/linux/x86_64/lib TAO_IDL_PREPROCESSOR = /opt2/linux/ix86/x86_64-pc-linux-gnu/bin/gcc include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU ...

Help Needed: Upgrade Fedora 4 / Apache 2 to PHP 5.2.x from 5.0.4
Help Needed: Upgrade Fedora 4 / Apache 2 to PHP 5.2.x from 5.0.4 I've been testing Joomla as a content manager for the County offices, and it looks pretty good. Unfortunately, I decided to upgrade it from the 1.0.13 version to 1.5 as we get ready to go live with the web site... and the update installation gives an error in XML processing, which seems (from what I've been able to dredge up in forum discussions) to stem from a known bug in PHP 5.0.4... I've seen this same error from a couple of other programs that want to upload XML data to PHP based server software, too, so I'...

PHP 5.x and Wordpress 1.5.2 and Apache 1.3.x
Folks, I'm using WP 1.5.2 on Apache 1.3.33 and tried it with both PHP 5.0.4 and php 5.1.0.rc.1 -- and getting seg faults (can't even complete setup) I complete the first step in Setup, and get the seg fault going to the second step. I would welcome any work arounds/solutions people might have. I checked our the wordpress site, http://www.wordpress.org/, but seeing mixed messages. Some folks say the seg fault is there, others say it works with Apache 2.0? Many thanks. -- John ________________________________________________________________...

Apache 2.0.50 php 4.3.8 Aix 5.2
I have apache 2 already installed and working. aixstar root /usr/httpd/bin > ./httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c ../configure --with-apxs2=/usr/httpd/bin/apxs --with-oci8=/ora01/app/oracle/product/9.2.0.1.0 --enable-ftp --enable-sigchild --disable-libxml Works fine, without displaying any errors. m...

python 2.5.2 or Python 2.6 compilation problem on AIX 5.3
Hello: I am trying to compile Python 2.5.2 on AIX 5.3 with gcc 4.2.3. I am getting following error. (I also tried Python 2.6 with same error) creating build/temp.aix-5.3-2.5/share/tmhsdsd2/tmp/Python-2.5.2/ Modules gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall - Wstrict-prototypes -I. -I/share/tmhsdsd2/tmp/Python-2.5.2/./Include - I. -IInclude -I./Include -I/usr/local/include -I/share/tmhsdsd2/tmp/ Python-2.5.2/Include -I/share/tmhsdsd2/tmp/Python-2.5.2 -c /share/ tmhsdsd2/tmp/Python-2.5.2/Modules/_struct.c -o build/temp.aix-5.3-2.5/ share/tmhsdsd2/tmp/Python-2.5.2/Modules/_...

perl 5.8.2.0 base fileset is in AIX 5.2 or is in 5.3?
Did this base fileset first appear in 5.2 or did it first appear in 5.3? (I don't have 5.3 hosts, so I can't check that.) Thanks! -Dan Dan Foster wrote: > Did this base fileset first appear in 5.2 or did it first appear in 5.3? > > (I don't have 5.3 hosts, so I can't check that.) > > Thanks! > > -Dan Not really sure, but I think appearance was with 5.3. Checking at my site and found the highest level on a 5.2 machine was 5.8.1.12 - never seen a 5.8.2.0 on a 5.2 machine In article <dqgafi$jfe$1@online.de>, Friedhelm Neyer <Friedhelm.Neyer...

KRB5 1.5 or 1.6 compiled on AIX 5.2/5.3 #2
I have seen several emails from different people over the last few months on trying to get KRB5 1.5 or later to compile on AIX 5.x. And no responses that fix the problem. I have had the same problem and can only presume that Kerberos is no longer supported on AIX. Is this the case? No Kerberos on AIX? It just won't compile anymore with the changes to shared libraries. ________________________________________________ Kerberos mailing list Kerberos@mit.edu https://mailman.mit.edu/mailman/listinfo/kerberos >>>>> "Grant," == Grant, Martin <Martin.Grant@fmr.com> writes: Grant,> I have seen several emails from different people over the Grant,> last few months on trying to get KRB5 1.5 or later to Grant,> compile on AIX 5.x. And no responses that fix the Grant,> problem. I have had the same problem and can only presume Grant,> that Kerberos is no longer supported on AIX. Is this the Grant,> case? No Kerberos on AIX? It just won't compile anymore Grant,> with the changes to shared libraries. We no longer run AIX tests. Our donated AIX box was very old and slow, and its disk was in the process of dieing. If there's no one out there in the Kerberos development community who cares enough about AIX to get the betas, test them and send bug fixes, then yes, AIX support is going to be fairly bad. Kerberos is an open-source product; if you want it to work better on your pl...

freebsd-5.2.1+ php-4.3.9 + gd-2.0.33
Hello there, I am tryin to compile PHP with GD support under FreeBSD-5.2.1: # cd php-4.3.11 # ./configure \ --with-gd=/usr/local/src/gd-2.0.33/ \ --with-png-dir=/usr/local/src/libpng-1.2.8/ \ --with-zlib-dir=/usr/local/src/zlib/ \ --with-jpeg-dir=/usr/local/src/jpeg-6b/ .... checking for GD support... yes checking for the location of libpng... /usr/local/src/libpng-1.2.8/ If configure fails try --with-jpeg-dir=<DIR> configure: error: libpng.(a|so) not found. why libpng.(a|so) not found ? # ls -l /usr/local/src/libpng-1.2.8/libpng.a -rw-r--r-- 1 root wheel 160448 May 31 12:48 /usr/local/src/libpng-1.2.8/libpng.a What is my mistake? Where to read about correct way to install php + gd + libjpeg + libpng ? Encapsulin wrote: > Hello there, > I am tryin to compile PHP with GD support under FreeBSD-5.2.1: > > # cd php-4.3.11 > # ./configure \ > --with-gd=/usr/local/src/gd-2.0.33/ \ > --with-png-dir=/usr/local/src/libpng-1.2.8/ \ > --with-zlib-dir=/usr/local/src/zlib/ \ > --with-jpeg-dir=/usr/local/src/jpeg-6b/ > > ... > checking for GD support... yes > checking for the location of libpng... /usr/local/src/libpng-1.2.8/ > If configure fails try --with-jpeg-dir=<DIR> > configure: error: libpng.(a|so) not found. > > why libpng.(a|so) not found ? > > # ls -l /usr/local/src/libpng-1.2.8/libpng.a > -rw-r--r-- 1 root wheel 160448 May 31 12:48 > /usr/loca...

Web resources about - Please Reproduce: PHP 5.2 -> 5.3 Windows Apache2.2 crash - comp.lang.php

Resources last updated: 3/14/2016 1:27:51 PM