View Issue Details

IDProjectCategoryView StatusLast Update
0000078WackoWikicorepublic2009-08-19 09:39
ReporterTann San Assigned ToTann San  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version4.2 
Target Version4.3.rcFixed in Version4.3.rc 
Summary0000078: Wacko dies on PHP 5.2 - Fix included
DescriptionHeya, I upgraded my server to use Apache 2.2.3 and PHP 5.2 tonight and Wacko died a horrid death. The pages showed up as blank but the Apache error log showed this:

PHP Catchable fatal error: Object of class Wacko could not be converted to string in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\core\\pages\\wakka.php on line 254

To save you looking for line 254 in wakka.php here it is:

$cache->Log("Before Run wacko=".$wacko);

the simple fix that seems to of worked for me is to simply comment that line out i.e:

//$cache->Log("Before Run wacko=".$wacko);

I can view the pages again as well as login/logout/edit them. I havent tried deleting/moving/file uploading yet but I'm pretty optimistic.

I know its a lazy fix to comment out the logging abilities of Wacko but I have a client demo in the morning and dont have time to look into it further tonight.
TagsNo tags attached.

Relationships

has duplicate 0000287 resolvedadministrator Installation fails 

Activities

administrator

2007-09-05 06:59

administrator   ~0000069

Tann San II
15-11-2006 10:27
phew, glad it wasn't just me :¬)

I should add that I originally posted this when I was using the final beta of PHP 5.2, I switched to the release edition of 5.2 last week and the bug is still there. I'll look into it later this week/early next week and implement a better solution i.e. one that doesn't involve disabling the log.

did what I suggest before work for you as well edw?

RobHam
17-05-2007 01:47
I have just installed this wiki program, all seemed to go well with data tables and wakka.config.php created correctly. But unfortunately when trying to access the wiki for the first time I get a blank white page displayed and my php log has the same error as reported above.

Using PHP 5.2.2, Lighttpd 1.4.15 and Mysql 4.1.20

The fix of commenting out line 254 as suggested does not work for me. If I do this and reload the web page I get HTTP 404 web page cannot be displayed error with no php error logged, all very strange.

Tann San II
17-05-2007 15:05
Heya, can you access the pages directly i.e.

http://www.yourserver.com/Login

I wouldn't of thought the 404 error was actually related to the initial post I made, I'd think it was a second issue that was only exposed after you did the quick fix I suggested. Are you sure the .htaccess file is working? Did you opt to use the mod_rewrite module to have pretty urls? Those are the two things I would look at first.

mb
25-05-2007 00:26
This is a new error introduced in PHP 5.2 (http://us3.php.net/types.string)

As of (at least) PHP 5.2, you can no longer convert an object to a string unless it has a __toString method. Converting an object without this method now gives the error:

PHP Catchable fatal error: Object of class <classname> could not be converted to string in <file> on line <line>

Try this code to get the same results as before:

<?php

if (!is_object($value) || method_exists($value, '__toString')) {
$string = (string)$value;
} else {
$string = 'Object';
}

?>

Tann San

2007-09-05 09:58

manager   ~0000070

Yer what MB says at the end is true, it's exactly what I read in the PHP docs. Anything that we convert to a string needs to have a toString function attached to it. I just haven't had the time to make the proper change to this area and in all honesty have not noticed any difference in usage or performance by simply commenting out that line. Does anyone know what it does? I haven't looked into it since I implemented my quick fix.

Tann San

2007-09-12 22:12

manager   ~0000077

I've deleted the problamatic line once and for all. I started writing a __toString function for the Wacko class and then I realised there was no need since this one line seems more to of been a developer testing feature than anything else. If you look at all the other areas the log is used this one makes no sense. This has caused alot of problems across the Wacko community. Try a google search for the following and see how many results you get:

PHP Catchable fatal error: Object of class Wacko could not be converted to string

Issue History

Date Modified Username Field Change
2007-09-05 06:56 administrator New Issue
2007-09-05 06:56 administrator Legacy => NPJ
2007-09-05 06:59 administrator Note Added: 0000069
2007-09-05 06:59 administrator Reporter administrator => Tann San
2007-09-05 09:58 Tann San Note Added: 0000070
2007-09-12 22:09 Tann San Status new => assigned
2007-09-12 22:09 Tann San Assigned To => Tann San
2007-09-12 22:12 Tann San Status assigned => resolved
2007-09-12 22:12 Tann San Fixed in Version => 5.0.0
2007-09-12 22:12 Tann San Resolution open => fixed
2007-09-12 22:12 Tann San Note Added: 0000077
2009-04-07 17:15 administrator Relationship added has duplicate 0000287
2009-08-19 09:18 administrator Fixed in Version 5.0.0 => 4.3.rc
2009-08-19 09:39 administrator Target Version => 4.3.rc
2010-03-08 10:12 administrator Category Core => core