Jump to content

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


Recommended Posts

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

 

Link to comment
Share on other sites

About the only time php actually crashes or causes the web server to crash is when you have a mix of different version of .dll/.exe files.

 

What exact method did you use to upgrade the version and are you sure there were no files copied into the Windows folder that where then not replaced with the new version files?

 

When php is installed and configured correctly, all the files can be kept in the php folder and an upgrade simply involves replacing the php folder with a new one containing all the files of the new version (I actually rename and keep the old php folder and then just rename the main folder in the distribution to 'php') and account for any differences in your existing php.ini and the new recommend php.ini.

 

 

Link to comment
Share on other sites

Hi,

 

That's exactly what I would have thought ; which is why I am baffled.

 

I do what you do,  download the new PHP zip and extract to a new folder while appending a letter to the old folder. Then just using the old ini as a guide (only) to setup the new one (based off the production 5.3.1 ini).  All files are kept within the PHP folder,  nothing is referenced in any other folder such as the Windows folder etc. 

 

In addition to this;  this is on my test windows machine,  but on the production server which is Linux,  the same/similar issue happens; and this is with our server guys expertise who has no problems with other hosted clients. 

 

Now they have had to downgrade to 5.2 until I fix this problem (!)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.