[FIX] PHP5.2.4+Zend fatal error editing profile

13 years 3 months ago #47635 by beat
Replied by beat on topic Re:PHP5 fatal error when editing profile
Also to all posters in here: can you all confirm you got php 5.2.4 with that problem ?

I'm suspecting a bug in the php interpreter of that version on some texts, as this suddenly appeared since that php release.

Don't see an easy workaround yet. Maybe try adding a '@' (without the quotes) in front of that function like this:

[code:1]
if(defined($text)) $returnText = @constant($text);
[/code:1]

It could calm down the error a bit. If yes, try this too as workaround:

If it stops the fatal error, try changing in that file at that lines this function:

[code:1]
function getLangDefinition($text) {
if(defined($text)) $returnText = constant($text);
else $returnText = $text;
return $returnText;
}
[/code:1]

to:

[code:1]
function getLangDefinition( $text ) {
if ( defined( $text ) ) {
$returnText = @constant( $text );
if ( $text && $returnText ) {
return $returnText;
}
}
return $text;
}
[/code:1]

This is *not* a bug-fix of CB, but a trial to work-around this probable bug in PHP 5.2.4.

Installed same php 5.2.4 version on my test-system, but still couldn't reproduce. I also checked the bug-tracker of php 5.2.4 for this bug, but didn't see it reported yet.

Please report back as precisely as possible in this thread, I will check in a few hours again.

EDIT for non-significant code indenting fix

Post edited by: beat, at: 2007/10/11 01:51

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

13 years 3 months ago #47653 by censor
Replied by censor on topic Re:PHP5 fatal error when editing profile
I have tried to change the parameter Bruker ID (which seems to be translated in a language plugin...

I think the original is:
[code:1]DEFINE('_UE_UNAME','User Name');[/code:1]

And the norwegian version is:

[code:1]DEFINE('_UE_UNAME','Bruker ID:');[/code:1]

Tried with one word, space before and after, but with no effect. Damn this is really annoying. The really strange thing is that my english site running with the same users, is working ok.

What could be causing this, I wonder?

Please Log in to join the conversation.

13 years 3 months ago #47663 by censor
Replied by censor on topic Re:PHP5 fatal error when editing profile
I changed my language files name (I guess this has the same effect as deleting it).

And now things are working again. Does changing the file have any impact I should be aware of?

Please Log in to join the conversation.

13 years 3 months ago #47670 by beat
Replied by beat on topic Re:PHP5 fatal error when editing profile
censor wrote:

I changed my language files name (I guess this has the same effect as deleting it).

And now things are working again. Does changing the file have any impact I should be aware of?


Interesting... :S I can't tell you more, than that it's very probably a php bug which I'm taking seriously, and would like as much as possible info as asked in my post above (exact PHP version in particular (it's in system info menu)).

Have you kept have a copy of the old "bugging" language file for analysis and trying to reproduce ? If yes, could you please attach it to the post reply ?

What was the character-set of the old language file and what is the character-set of your website ?

If you put back the old file, does the bug re-appear ?

Did you try the code-workarounds I proposed above ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

13 years 3 months ago #47695 by dcasmr
Replied by dcasmr on topic Re:PHP5 fatal error when editing profile
Hi folks,

I feel a whole lot better now :P. Now, I can click to edit a user and no more Fatal errors.
As Beat suspected, the issue is with PHP5.2.4. I asked my host to revert to PHP5.2.3 and voila:)
We did not change anything else beside changing back to PHP5.2.3, so I am confident it is NOT a CB problem.
Now, it will be interesting to know what aspect of PHP5.2.4 is causing CB to break.

Post edited by: dcasmr, at: 2007/10/12 04:58

CB Language Workgroup - French

Please Log in to join the conversation.

13 years 3 months ago #47826 by ford
Replied by ford on topic Re:PHP5 fatal error when editing profile
Is this the correct bug report on php.net?

http://bugs.php.net/bug.php?id=42770

There's not much response to the query posted late September. Someone is looking into whether this might be something to do with Zend .....

Ford

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.429 seconds

Facebook Twitter LinkedIn