Monday, August 25, 2014

Re: problems while upgrading from cakephp 1.2.5 to 2.5.3

Thank you Jeremy  - that worked!

On Friday, August 22, 2014 10:03:44 PM UTC-4, Dallas wrote:
I have migrated from  cakephp 1.2.5 to Cake 2.5.3 by installing new cake, importing old database and importing files.  I have made changes to file as per the migration guides but I am getting this error:Error: syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION)
File: /home/dallasrosie/public_html/musicthatjumpedtheshark.com/app/Controller/GroupsController.php
Line: 43
here is line 43 of GroupsController.php:
  // Pass through the request and response objects 
// AND declare the visibility of the method
public function __construct($request = null, $response = null)
{
    parent::__construct($request, $response);
}
        $this->Layout = 'home';
        $this->PageTitle = 'Music That Jumped the Shark ~ groups';
        
        // get the random ad links
        include('includes/ad_selection.php');
        $this->set('top_ads', $_ads_top_link);
        $this->set('side_ads', $_ads_side_link);
        $this->top_ad_links = $_ads_top_link;
        $this->side_ad_links = $_ads_side_link;
    }
    
    // DEBUG
    public function under_construction()
    {
        $this->layout = 'temp';
        
    }
I am getting this message on all pages like this: musicthatjumpedtheshark.com/groups   ..../genres ...

and on the blogs/   page I get this error?
Error: Call to a member function parseAccept() on a non-object
File: /home/dallasrosie/public_html/musicthatjumpedtheshark.com/lib/Cake/Controller/Component/RequestHandlerComponent.php
Line: 157
here is line 157:
   if (!$resp->is_valid)
            {
                # set the error code so that we can display it
                $comment_errors['captcha'] = '<span class="error">incorrect response</span>';
                $ret = false;
            }
        }
        
        // validate comment
        if($data['comment'] == '')
        {
            $comment_errors['comment'] = '<span class="error">comment may not be empty</span>';
            $ret = false;
        }

Please help.  I don't know if I should be using some kind of shell to upgrade - I don't know how to use them yet.  Any suggestions are GREATLY appreciated.
Thank you.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: