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

16 years 6 months ago #47850 by beat
Replied by beat on topic Re:PHP5 fatal error when editing profile
Yes, that's it.

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

Question to all of you who have this problem (that I can't reproduce here, with PHP 5.2.4 and with or without Zend Optimizer):

- which exact version of PHP do you have ?
- do you run Zend Optimizer ?
- which exact version of Zend Optimizer do you have, if you have one ?

PHP 5.2.x is known to be incompatible with older Zend Optimizer versions...

So maybe you simply got an old Zend Optimizer....latest is version 3.3.2, and I believe 3.2.8 is neeeded at very least ?

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.

16 years 6 months ago #48541 by testings
Replied by testings on topic Re:PHP5 fatal error when editing profile
Hei!
I have the exact same problem when trying to edit the profile..

Censor: can you tell me what you did with your language files to make it work ?

By the way, i'm using php 5.2.4 and Zend Engine v2.2.0. I have two different pages.. on the same webhotel host, using the same version of php.

1. On this page it works ! Using joomla 1.0.12.. No new fields have been added.

2. These settings yields the fatal error. Using joomla 1.0.13, php 5.2.4. Several new fields are added, and everything is translated with joomfish from norwegian to english.

:(
Lars

Post edited by: testings, at: 2007/10/22 22:37

Please Log in to join the conversation.

16 years 5 months ago #48868 by ford
Replied by ford on topic Re:PHP5 fatal error when editing profile
This is the output of php -v:

PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 22 2007 02:01:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

It's simply a standard install. No Zend optimiser.

Ford

Please Log in to join the conversation.

16 years 5 months ago #48947 by ford
Replied by ford on topic Re:PHP5 fatal error when editing profile
I was surfing the net when I found this. This relates to the PHP bug posting that I referred to earlier. It may (or may not) shed some light on what to do:

forums.modernbill.com/showthread.php?t=28203

Appears that this is not a ModernBill bug, sorry for assuming that. And a big thanks to Ben for his reply, I guess he doesn't mind me posting it here:
Quote:
Short story:
Remove the "::" in your package comments. It induces a php bug.

Long story:

It appears to be an obscure php bug that appears to have been introduced recently. It is trying to run defined() on your package comment which has a "::" in it. That is also the notation in php which separates a class from a method. For example: "class::method()". defined() is being used by us to see if a constant exists before trying to resolve it, but defined() also checks to see whether classes, methods, or functions exist.

What appears to be happening is defined() has a bug where it now fails to catch the error case when it is checking a method where the method's class does not exist.

For example, one of your package comments:
.. :: 1000 MB Webspace :: 100 GB Traffic :: ..

If that were a method, php would consider the text before the first "::" the class, and the text after the first "::" the method, so you have:

class: ".. "
method: " 1000 MB Webspace :: 100 GB Traffic :: .."

PHP's defined() looked up ".. " as a class, and failed to find it. Instead of catching the error as meaning that the string passed to defined() is not defined as a method and continuing to the next check, it handled it as a fatal error.

I have reported this to php:
bugs.php.net/bug.php?id=42770

Thank you for reporting the problem, and including all of the information we needed to find it.

Cheers,

Ben
~ Ben
~ ModernGigabyte, LLC


Ford

Post edited by: ford, at: 2007/10/28 21:29

Please Log in to join the conversation.

16 years 5 months ago #48948 by ford
Replied by ford on topic Re:PHP5 fatal error when editing profile
That's it! I think I solved it.

In my first post describing this problem, I wrote:

PHP Fatal error: Class 'Brugernavn' not found in /usr/local/www/joomla/administrator/components/com_comprofiler/comprofile
r.class.php on line 1366


Well. When you look at the page where the user can edit his or her profile (task=userDetails), Brugernavn is written like this:

Brugernavn::

Notice the double colon! You have to remove the colon from the language file - it shouldn't be there! Let com_comprofiler output the colon.

Haven't tested it, but it should work!! PLEASE CONFIRM!!

Ford

Post edited by: ford, at: 2007/10/28 21:38

Post edited by: ford, at: 2007/10/28 21:39

Please Log in to join the conversation.

16 years 5 months ago #49056 by plaursen
Replied by plaursen on topic Re:PHP5 fatal error when editing profile
Yep, it works :)
Thanks a lot!

Wonder which of all those colons could be left there...

BR
Per

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.253 seconds

Facebook Twitter LinkedIn