tags:

views:

376

answers:

2

I am trying to install apc with command

yum install apc

it's giving me following error

Parse error: syntax error, unexpected T_RETURN, expecting T_FUNCTION in /usr/local/lib/php/Archive/Tar.php on line 251

what could be the reason ?

A: 

That's a PHP error, for a piece of software. Without the PHP code it would be difficult to solve the problem. Contact the package maintainer for the distro of Linux you are using and ask them to solve the problem, because StackOverflow probably isn't the best place for it ...

phalacee
+1  A: 

In usr/local/lib/php/Archive/Tar.php, there is some code like this:

class someClass{

    function something(){

    }

    return $x;

}

around line 251. A return statement is outside of a function, and because there cannot be any commands besides function declarations outside of a function that is in a class, it is causing an error

If this is a APC error, you will want to contact the distributor, as they might be providing a bad copy of source code to more people that you.

If this is your code, you might want to fix it.

Chacha102