soaivu / clipbucket

Automatically exported from code.google.com/p/clipbucket
0 stars 0 forks source link

php 5.4 strict standards issue #327

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install php 5.4
2.
3.

What is the expected output? What do you see instead?
Strict Standards: Non-static method CBTemplate::assign() should not be called 
statically in 
/home/conserv/domains/theconservativevoices.com/public_html/videos/includes/func
tions.php on line 166 

What version of the product are you using? On what operating system?
centos 6.2 apache 2.4.2 php 5.4.4 CB 2.6 I think it is?

Please provide any additional information below.
tried every php.ini setting I can on error reporting, it won't go away.

forum post here:
http://forums.clip-bucket.com/showthread.php?11812-php-5-4-4-strict-standards-is
sue&p=48402#post48402

Original issue reported on code.google.com by theconse...@gmail.com on 3 Jul 2012 at 5:51

GoogleCodeExporter commented 9 years ago
any fixes? I have had to remove site for now.

Original comment by dmac...@gmail.com on 13 Jul 2012 at 2:45

GoogleCodeExporter commented 9 years ago
downgrade to php 5.3 . Really I not understand you guys more of CMS have 
problems with php after 5.3 

Original comment by old...@elistas.co.uk on 19 Jul 2012 at 11:06

GoogleCodeExporter commented 9 years ago
actually 5.4 runs a lot smoother for the stuff I run, hell of an answer, 
downgrade.
pass.

Original comment by theconse...@gmail.com on 20 Jul 2012 at 4:55

GoogleCodeExporter commented 9 years ago
It seems it would be a fairly simple fix by adjusting the common.php file in 
the /includes directory.  There is a couple of cases in the switch(DEBUG_LEVEL) 
area where php.ini can get overridden on whether it displays errors.  If you 
have been staring and fretting over the error reporting section of php.ini you 
should see some familiar terminology in that section.

Original comment by jfcla...@gmail.com on 31 Jul 2012 at 11:00

GoogleCodeExporter commented 9 years ago
hmm TBH I did not think of looking in cb includes for common.php setting.
I will try this after I get my varnish server ironed out.

Original comment by dmac...@gmail.com on 1 Aug 2012 at 2:31

GoogleCodeExporter commented 9 years ago
You should find the file that contain class 'CBTemplate' (in 
includes/classes/template.class.php) and add 'static' be-hide the line 
'function assign()' (around line 42) to 'static function assign()'. Now you can 
resolve this problem.

Original comment by princeof...@gmail.com on 3 Apr 2013 at 9:16

GoogleCodeExporter commented 9 years ago
have you verified this works?
not able to test this right yet so if you have that would be great.

Original comment by theconse...@gmail.com on 3 Apr 2013 at 4:01

GoogleCodeExporter commented 9 years ago
can you expand on that please?
looking at line 42 is 
    function assign($var, $value) {
        global $Smarty;
        if (!isset($Smarty)) {
            CBTemplate::create();
        }
        $Smarty->assign($var, $value);

so not sure what you are saying to do

Original comment by theconse...@gmail.com on 4 Apr 2013 at 5:07

GoogleCodeExporter commented 9 years ago
ahh I think I see
in includes\common.php set all error reporting from 1 to 0 and change 
includes/classes/template.class.php to
static function assign($var, $value) {
        global $Smarty;
        if (!isset($Smarty)) {
            CBTemplate::create();
        }
        $Smarty->assign($var, $value);

testing now, so far stuff plays and I am testing uploads now

Original comment by theconse...@gmail.com on 4 Apr 2013 at 5:16

GoogleCodeExporter commented 9 years ago
An extra .02 - I've been using cb for a while - dig it - props to Arslan 

I rebuilt on a new Fedora build, and ran into the strict issue in php 5.4 - 

For me - changing that function to be static only caused more issues -spent 
about an hour trying to rewrite the functions so they wouldn't throw errors, 
but in the end it was easier to just rip out php 5.4 and install 5.3

Original comment by ebrookho...@gmail.com on 9 Apr 2013 at 11:08

GoogleCodeExporter commented 9 years ago

Original comment by zomail...@gmail.com on 6 May 2013 at 11:56

GoogleCodeExporter commented 9 years ago
good lord this is an issue in V3 also.
did you not make V3 php 5.4 compatible?

Original comment by theconse...@gmail.com on 13 May 2013 at 12:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Don't worry, we are working on it. both 2.x and 3 will have this fixed.

Original comment by arslan...@gmail.com on 22 May 2013 at 7:08

GoogleCodeExporter commented 9 years ago
Edit common.php in the includes directory -  around line 86 change the code to 
look like:

                case 2:
                default:
                {

                        if(phpversion() >= '5.3.0')
                        {
                                error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED ^E_STRICT);
                                ini_set('display_errors', '1');
                        }
                        else
                        {
                                error_reporting(E_ALL ^E_NOTICE ^E_STRICT);
                                ini_set('display_errors', '1');
                        }
                }

This disables strict messages.

Joe J

Original comment by j...@wfrmls.com on 19 Jul 2013 at 3:29

GoogleCodeExporter commented 9 years ago
Can confirm the above fix works. Thanks bro!

Original comment by ma...@aposs.tv on 24 Oct 2013 at 10:55

GoogleCodeExporter commented 9 years ago
Above fix definitely works.  Thanks so much.

Original comment by GlennEM...@gmail.com on 10 Dec 2013 at 11:21

GoogleCodeExporter commented 9 years ago
on godaddy it gives this error but above fix solved it.

Original comment by i...@heavensoft.com.pk on 23 Jan 2014 at 9:22

GoogleCodeExporter commented 9 years ago
Has anyone using the above fix run into any functionality issues after testing 
the change long term? Just hiding the errors make me a bit uneasy.

Original comment by patchd...@gmail.com on 15 Feb 2014 at 5:51

GoogleCodeExporter commented 9 years ago
great it worked 

Original comment by ghasscom...@gmail.com on 20 May 2014 at 10:22

GoogleCodeExporter commented 9 years ago
Thanks  #15 j...@wfrmls.com...

Original comment by lokmer2...@gmail.com on 22 May 2014 at 8:47

GoogleCodeExporter commented 9 years ago
#9 theconse...@gmail.com Thx yours works the best however i still sit with this 
problem.

Warning: session_start(): open(/tmp/sess_1a94492996628c2b3721eb968258459a, 
O_RDWR) failed: Permission denied (13) in 
/home/vibyr/public_html/includes/common.php on line 47

any ideas?

Original comment by cl...@bbwis.co.za on 10 Jun 2014 at 12:25

GoogleCodeExporter commented 9 years ago
Changing the common.php file fixed the issue for me.... thanks!

Original comment by saylem...@gmail.com on 28 Jul 2014 at 1:20

GoogleCodeExporter commented 9 years ago
Fixed in 2.7

Original comment by arslan...@gmail.com on 25 Feb 2015 at 3:12