Userlist crash after upgrade to PHP 5

15 years 2 months ago #85298 by Rstyle
Hello,

Using joomla 1.0.13 and CB 1.1

I having some major problems after my hosting provider upgraded to PHP5 (from 4.4). My userlist (search list) isn't showing anymore, after 6 days I'm still not able to fix this. My website is about searching with this userlist, so this is my biggest nightmare since the upgrade started to PHP5 (7 days ago..).

It's about de following (original) code from comprofiler.html.php:

[code:1]function getUserListCell( &$user, &$column, &$fields, $option_itemid ){

$htmlFields = array();

foreach ( $column->fields as $fieldId ) {
$field = $fields[$fieldId];
$name = $field->name;
$title = "";

if ( $column->captions ) {
$title = getLangDefinition( $field->title ) . ': ';
}
$html = getFieldValue( $field->type, $user->$name, $user, $title, 0,
( $field->type=="predefined" ? sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=" . $user->id . $option_itemid ) : null ) );
}
return implode( '<br />', $html );

}[/code:1]

This crashes the site completely.. And after this small change I will manage to get the site back to color, but everything shows "implode" and not an avatar and user data...

[code:1]$user->$name[/code:1]

to..

[code:1]$user->name[/code:1]

And if I put some "echo's" within the code, also in comprofiler.class.php I see that the output is not what it has to be. somehow he uses completely wrong tables from my database :pinch:

Joomlapolis team, or somebody else can you please advise me what peace of code I have to change to fix this strange behavior after upgrade to PHP version 5?

Many thanks in advanced!

Regards,
Rstyle

Post edited by: Rstyle, at: 2009/01/14 09:14

Please Log in to join the conversation.

15 years 2 months ago #85463 by Rstyle
Replied by Rstyle on topic Re:Userlist crash after upgrade to PHP 5
I hope somebody experienced the same problems and found a way to fix it. I replaced all community files with the last 'original' files from the latest download on joomplapolis.

Replaced all the CB files, and still the same problem. Blank page on the task=userlist search page.

So it must be a "known" php 5 problem?

Please joomlapolis team, do you have an answer? I am trying to fix this myself for almost 7 days now.. Can't find out why it's getting the wrong output :S

Post edited by: Rstyle, at: 2009/01/15 10:17

Please Log in to join the conversation.

15 years 2 months ago #85469 by beat
Replied by beat on topic Re:Userlist crash after upgrade to PHP 5
CB 1.1 runs fine on PHP 5. Not an issue in PHP.

Try overwriting with the expert package.

May be an issue in your database in the "name" column of a row of comprofiler_fields which has corrupt content, if i'm following you correctly.

the name column should only contain valid a-z. A-Z characters or underscore _

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.

15 years 2 months ago #85503 by Rstyle
Replied by Rstyle on topic Re:Userlist crash after upgrade to PHP 5
Hi Beat,

Thanks for your time!

I have copied all the files from the expert package to the right places, but still the same result. Because I had changed $name to name on line 1259. The error was gone. Now it's back again :

[code:1]Fatal error: Cannot access empty property in C:\xampp\htdocs\components\com_comprofiler\comprofiler.html.php on line 1259
[/code:1]

Above this error CB is taking the list, find all the users (counter is right) so he really finds all the users, but won't display the output correct. Also the writepages is working correct..

I have looked to the name column, and there are no strange names. Everything is a-z or having a _ .

This is on my testserver, and yesterday I did a upgrade to 1.2RC4. This immediately gave the correct output, where I receive this error with CB1.1. So I think the name column is right... I am using some plugins and components that are not working on 1.2RC4, so an upgrade to 1.2RC is not an option for me..

What more possibilities do we have?

Post edited by: Rstyle, at: 2009/01/15 23:03

Please Log in to join the conversation.

15 years 2 months ago #85626 by Rstyle
Replied by Rstyle on topic Re:Userlist crash after upgrade to PHP 5
Still not able to fix this...

I can't find anything wrong with my "name" table, but maybe you do.

Please find attached a piese of my database for the comprofiler_field(and values).

Kind regards,
R

Attachment database_comprofiler_field.txt not found



Post edited by: Rstyle, at: 2009/01/16 16:20

Post edited by: Rstyle, at: 2009/01/17 14:03
Attachments:

Please Log in to join the conversation.

15 years 2 months ago #85824 by beat
Replied by beat on topic Re:Userlist crash after upgrade to PHP 5
comprofiler_lists table dump would also be useful to understand.

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.

Moderators: beatnantkrileon
Time to create page: 0.225 seconds

Facebook Twitter LinkedIn