Advertisement:

Author Topic: Upgrade problems? post here  (Read 30472 times)

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Upgrade problems? post here
« on: December 19, 2012, 11:29:43 am »
Possible upgrade troubles and how to fix it.

Unzip failed

Posible reasons :

    
 
Parse error: syntax error, unexpected ':' …    in LogDatabase
  • recent bug discover, fixed on osclass 3.4.1
   

 
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM … in Object_Cache_Factory.php
   
  • recent bug discover, fixed on osclass 3.4.1
   


Auto-upgrade - fails on 3.3.X
   
  • due to changes in the upgrade process will fail, but don’t worry everything it’s fine, but your site may be in maintenance mode. Please upgrade via admin panel or manually, if upgrade is successful maintenance mode will be disabled.
  • If your site remains in maintenance mode you can remove the lock at oc-admin -> Tools -> Maintenance mode

« Last Edit: August 06, 2014, 02:38:02 pm by _CONEJO »

aledia

  • Newbie
  • *
  • Posts: 11
I broke it, with the help of that upgrade.
« Reply #1 on: August 04, 2014, 10:35:09 pm »
This is what I see when I try to go to my site and to the admin area.

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/myserver/public_html/mydomain.net/oc-includes/osclass/core/Object_Cache_Factory.php on line 28


And your stupid captcha is driving me batty!

aledia

  • Newbie
  • *
  • Posts: 11
Re: I broke it, with the help of that upgrade.
« Reply #2 on: August 04, 2014, 10:53:12 pm »
Here is the actual code. I copied from my file manager in cPanel.


<?php
class Object_Cache_Factory {

    private static $instance = null;

    public static function newInstance()
    {
        if( self::$instance == null ) {
            self::$instance = self::getCache();
        }
        return self::$instance;
    }

    public static function getCache() {
        if(self::$instance == null) {
            $cache = 'default';
            if( defined('OSC_CACHE') ) {
                $cache = OSC_CACHE;
            }

            $cache_class = 'Object_Cache_'.$cache;
            $file = dirname(__FILE__) . '/caches/' . $cache_class. '.php';

            if(strpos($file, '../')===false && file_exists($file)) {
                require_once $file;
                if(class_exists($cache_class)) {
                    // all correct ?
                    if($cache_class::is_supported()) {
                        self::$instance = new $cache_class();
                    } else {
                        $file = dirname(__FILE__) . '/caches/Object_Cache_default.php';
                        require_once $file;
                        self::$instance = new Object_Cache_default();
                        error_log('Cache '. $cache .' NOT SUPPORTED - loaded Object_Cache_default cache');
                    }
                    return self::$instance;
                }
            }
            throw new Exception('Unkwon cache');
        } else {
            return self::$instance;
        }
    }
}


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: I broke it, with the help of that upgrade.
« Reply #3 on: August 04, 2014, 11:40:36 pm »
Hi aledia,

please provide to Osclass dev team what PHP version are you running. Also, php.ini settings may help in this case.
Regarding captcha, it is necessary to prevent forum spam. Once you gain enough points, you will stop seeing it.
Btw, there is no need to copy code from the core, devs know about it since they created it in the first place :)

Regards

Aficionado

  • Guest
Re: I broke it, with the help of that upgrade.
« Reply #4 on: August 04, 2014, 11:44:34 pm »
Hi aledia,

please provide to Osclass dev team what PHP version are you running. Also, php.ini settings may help in this case.
Regarding captcha, it is necessary to prevent forum spam. Once you gain enough points, you will stop seeing it.
Btw, there is no need to copy code from the core, devs know about it since they created it in the first place :)

Regards

I think there SHOULD be a STICKY post in all Help forums, instructing the users with problems what exactly to post. All the info needed.



dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: I broke it, with the help of that upgrade.
« Reply #5 on: August 05, 2014, 12:00:52 am »
Btw, possibly, it is either about old PHP version (say 5.2) or double-column operator :: inappropriate use.

Garcia will check it, hopefully.
Regards

Hello

  • Full Member
  • ***
  • Posts: 174
We failed trying to upgrade your site to Osclass 3.4.0
« Reply #6 on: August 05, 2014, 12:40:03 am »
We failed trying to upgrade your site to Osclass 3.4.0. Heres is the error message: Unzip failed

If you experience any issues or need support, we will be happy to help you at the Osclass support forums

http://forums.osclass.org/

The Osclass team
« Last Edit: August 06, 2014, 02:32:30 pm by _CONEJO »

Aficionado

  • Guest
Re: We failed trying to upgrade your site to Osclass 3.4.0
« Reply #7 on: August 05, 2014, 12:42:18 am »
We failed trying to upgrade your site to Osclass 3.4.0. Heres is the error message: Unzip failed

If you experience any issues or need support, we will be happy to help you at the Osclass support forums

http://forums.osclass.org/

The Osclass team

There is an extra / in the rar and apparently this is a problem for some people.


Hello

  • Full Member
  • ***
  • Posts: 174
Re: We failed trying to upgrade your site to Osclass 3.4.0
« Reply #8 on: August 05, 2014, 12:42:51 am »
now what i do ?

Aficionado

  • Guest
Re: We failed trying to upgrade your site to Osclass 3.4.0
« Reply #9 on: August 05, 2014, 12:48:11 am »
now what i do ?

Wait a little bit, it will be fixed. Or do it manually (ftp).

Allways backup 1st.

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: I broke it, with the help of that upgrade.
« Reply #10 on: August 05, 2014, 01:10:30 am »
Hi aledia,

Seems to be that this syntax is not present until php 5.3.

Try to make this change at oc-includes/osclass/core/Object_Cache_Factory.php#L28

if($cache_class::is_supported()) {

to

if( call_user_func(array($cache_class, 'is_supported')) ) {

We will fix it in the next version.

Sorry for the inconvenience.

Regards

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: We failed trying to upgrade your site to Osclass 3.4.0
« Reply #11 on: August 05, 2014, 01:21:45 am »
Hi

the image attached tells you that you are at 3.4.

Code: [Select]
Current version 3.4
You can check in your homepage html code if in content generator tag there is this tag

<meta name="generator" content="Osclass 3.4.0" />

Regards

Hello

  • Full Member
  • ***
  • Posts: 174
Re: We failed trying to upgrade your site to Osclass 3.4.0
« Reply #12 on: August 05, 2014, 01:23:39 am »
yes its


<meta name="generator" content="Osclass 3.4.0" />


thanks for the help :)

chewyluke

  • Full Member
  • ***
  • Posts: 208
Stuck in Maintenance Mode
« Reply #13 on: August 05, 2014, 04:42:43 am »
Version 3.4 tried upgrading and failed. My site is stuck in maintenance mode. Where can I fix this?

Thanks

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Stuck in Maintenance Mode
« Reply #14 on: August 05, 2014, 05:17:48 am »
Login into admin and disable it in settings.

Another way, login via FTP and delete hidden .maintenance file in the root of Osclass (where your config.php file is).

That should fix it, then login as admin and disable maintenance mode in settings (if it is still enabled, but it shouldn't).