magicdude4eva / port25-bouncehandler

Port25 PowerMTA bounce handler for Interspire and MailWizz
MIT License
73 stars 42 forks source link

PHP Error #7

Closed wgalafassijr closed 7 years ago

wgalafassijr commented 7 years ago

Hi,

I have this error: cat /var/log/pmta/bounce-2017-03-24-0000.csv | /usr/bin/php bouncehandler.php PHP Parse error: syntax error, unexpected '[' in /opt/pmta/bouncehandler/providers/bounce-provider-interspire.php on line 37

magicdude4eva commented 7 years ago

Can you check what is on line #37 - it perhaps the file is wrong - see here: https://github.com/magicdude4eva/port25-bouncehandler/blob/master/providers/bounce-provider-interspire.php#L37

wgalafassijr commented 7 years ago

Hi, Thanks for the the help.

Yes i have the same on my line #37 http://prntscr.com/ep0fsl

wgalafassijr commented 7 years ago

Some idea?

magicdude4eva commented 7 years ago

Can you download the master zip and see if that works: https://github.com/magicdude4eva/port25-bouncehandler/archive/master.zip

wgalafassijr commented 7 years ago

Thanks for the help:

i have the same error:

cat /var/log/pmta/bounce-2017-03-24-0000.csv | php bouncehandler.php
PHP Parse error: syntax error, unexpected '[' in /opt/pmta/bouncehandler/providers/bounce-provider- interspire.php on line 37

On line 37 i have: $apiInterspireListIDs = [];

Some other idea?

wgalafassijr commented 7 years ago

Any other tip?

lakkisinghal commented 7 years ago

Hi, Looks like you are running PHP version < 5.4. This [] works on >=5.4 version. You can replace this '[]' with 'array()'. Hope this will work.

magicdude4eva commented 7 years ago

Thanks @lakkisinghal if this works. On our environment we are running PHP7. Anything below PHP5.6 should really be considered outdated - i.e. <5.4 will not receive any updates/fixes and support ended July 2016.

wgalafassijr commented 7 years ago

Updating php version solved the issue. Thanks for all.