Forum

Thread tagged as: Problem, Error, Addons

Problem with Categories - Fatal error

Hi,

I initially upgraded one of my installations to Perch 2.6.2 as I was interested in testing out the new categories element. However, after just trying to complete a simple test (add set + categories and then render), I got the following message:

Fatal error: Using $this when not in object context in E:\KDL_Projects_Open\kdl_mtc\www\admin\core\apps\categories\PerchCategories_Categories.class.php on line 102

As I have a forthcoming project anyway, I purchased another new licence of Perch 2.6.2 and did a complete clean install. I then just added a single set with some categories and added:

<?php perch_categories(); ?>

to the example page, to provide a quick simple test that everything was working.

Again, it produced the above error.

Any ideas why this is happening.

I have placed below the small diagnostic report, in-case there is something to be gleaned from this.

Perch: 2.6.2, PHP: 5.3.5, MySQL: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (2.6.2), assets (2.6.2), categories (2.6.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /admin
PERCH_PATH: E:\KDL_Projects_Open\kdl_mtc\www\admin
PERCH_CORE: E:\KDL_Projects_Open\kdl_mtc\www\admin\core
PERCH_RESFILEPATH: E:\KDL_Projects_Open\kdl_mtc\www\admin\resources
Image manipulation: GD
PHP limits: Max upload 256M, Max POST 256M, Memory: 256M, Total max file upload: 256M
Resource folder writeable: Yes
HTTP_HOST: qm.kdl
DOCUMENT_ROOT: E:/KDL_Projects_Open/kdl_mtc/www
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php

Thanks,

Andy

Andrew Kennedy

Andrew Kennedy 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll take a look into it - sorry for the inconvenience.

Not a problem Drew. If I had more time (I need to log off now), I would have also tried it on a 'live' server, as this is running on a local XAMPP installation.....just in-case something is off with my local windows set-up.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a PHP 5.3 issue - or rather a code compatibility issue with PHP 5.3. If your server has a modern version of PHP you won't hit this.

I'm fixing it for Perch 2.6.3.

Thanks, I will look at installing a newer version of XAMPP and this should sort it out.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch 2.6.3 is out, so hopefully you should be good to go.