upgrading to 5.3.3

Permalink
hi all,
i was trying to upgrade C5 from 5.3.2 to 5.3.3 then i got the following erros during the upgrade procsess and afterwards my site was gone and i just receive a blank site with the following errors:


Warning: Call-time pass-by-reference has been deprecated in /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/models/attribute/key.php on line 247

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/models/attribute/key.php:247) in /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/startup/session.php on line 18

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/models/attribute/key.php:247) in /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/startup/session.php on line 18

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/models/attribute/key.php:247) in /is/htdocs/wp1062413_RZ0ZQOZ3U4/www/australia/concrete/libraries/view.php on line 733

any help on this? Thanks!

Btw i run php 5.2 on my server

alemao
 
anthonycamilleri replied on at Permalink Reply
Hi all - exactly same problem - would appreciate help urgently!
ryan replied on at Permalink Reply
ryan
Are you sure your server is running the php 5.2 branch?

It was my understanding that depreciated errors were introduced in php 5.3.0 - in any case to get your site working & happy again, try changing line 247 of /concrete/models/attribute/key.php
From:
$q = $db->GetInsertSQL(&$rs, $columnHeaders);

To:
$q = $db->GetInsertSQL($rs, $columnHeaders);


just remove the "&" char
Antonis replied on at Permalink Reply
Antonis
ryan it worked!
Remo replied on at Permalink Reply
Remo
you can easily hide these warnings by modifying your php.ini

check "display_errors" and "error_reporting"
alemao replied on at Permalink Reply
alemao
thanks Remo but i dont have access to the php.ini and if so would i get a blank screen?
Remo replied on at Permalink Reply
Remo
you can also add this code:
// don't display errors
ini_set('display_errors', 'off');
// turn off error reporting
error_reporting(0);


at the beginning of index.php..

but you should probably do what ryan wrote.. Fixing the code is better than hiding warnings/errors ;-)
alemao replied on at Permalink Reply
alemao
thanks ryan and remo its working again
ryan replied on at Permalink Reply
ryan
I would like to know what ended up causing this & what version of php is being used so we can correct whatever went wrong in the core.

The pass by reference in the attribute key needs to be changed, but this shouldn't have been throwing warnings in php 5.2.x or in 5.3.x

If you could post a link to a phpinfo() file it'd be much appreciated.

Thanks
wltr replied on at Permalink Reply
wltr
Object variables are always passed by reference since PHP 5.0. That's why they are deprecated.

http://de.php.net/manual/en/language.oop5.references.php...

You can explicitly allow pass by reference in PHP5.

In php.ini:
allow_call_time_pass_reference = On

Or in .htaccess:
php_flag allow_call_time_pass_reference On

In scripts:
ini_set('allow_call_time_pass_reference', 'On');

No need to change the error reporting.
alemao replied on at Permalink Reply
alemao
hi ryan i used your fix and it worked
ryan replied on at Permalink Reply
ryan
Thanks, you can pull the phpinfo file now if ya like.
pberry replied on at Permalink Reply
Ryan, you're the man. Used this upgrading a site that I thought the client was maintaining. They hadn't upgraded since I installed 5.3.1.1

I owe you a beer next time I'm in Portland.