Trouble installing PHP-Payments

Go To StackoverFlow.com

1

I recently installed Sparks (package manager for CI) and now I'm trying to install a spark named: codeigniter-payments found at http://getsparks.org/packages/codeigniter-payments/versions/HEAD/show

Looking into the spark folders and some reading on the site, it seems this spark has a dependency on PHPPayments found at http://payments.calvinfroedge.com/index.html

When I try to run my code I run into this error message: Parse error: syntax error, unexpected T_STATIC in /home/a3374546/public_html/codeigniter/sparks/codeigniter-payments/0.1.4/src/php-payments/lib/payment_utility.php on line 21

This error points to these lines of code:

//Ignore classes that should be ignored
foreach(static::$autoload_ignore as $ignore)
{
    if(strpos($class, $ignore) !== false) return;
}

In addition, I had to change some file references such as:

dirname(__DIR__) 

to

dirname(dirname(__FILE__))

I want to ask is there a dependency for PHPPayments and by extension codeigniter-payments to have PHP 5.3.X before it will work? On a related note, is it possible to make changes to make it work with 5.2.X .

According to 000webhost.com (my hosting), the version they run is: PHP Version 5.2.17

Edit: Added System info:

Apache ver. 2.2.19 (Unix)

PHP version 5.2.* -> As mentioned above, php info states version 5.2.17

MySQL ver. 5.1

Codeigniter version: 2.1.0

Codeigniter Payments: 0.1.4

PHP payments: 67202cf *not sure if this is a version # but this was the # at the end of the zip file

2012-04-03 22:41
by Zigu
See http://stackoverflow.com/questions/4668557/parse-error-syntax-error-unexpected-t-static You need at least PHP 5. - Basti 2012-04-03 23:03
PHPPayments is not well documented giving no requirements, however from the error and code you show in your question it's clear that it makes use of Late Static Binding (LSB) which needs PHP 5.3 or higher. You can not make it work with PHP 5.2.X easily - hakre 2012-04-03 23:14
What platform are you running on (windows, etc.) @Zigu ?? I am the author - Calvin Froedge 2012-04-04 01:13


0

It was indeed version incompatibility.

2012-08-15 07:31
by Zigu
Ads