Mautic Community Forums

Parse error with SMS Bundle - Problem Installing 1.4 on server

Hey guys, not a PHP programmer. Uploaded top level folder, went to domain/subfolder/installer and got this error

Parse error: syntax error, unexpected ‘[’ in /home/content/95/10822095/html/testmautic/mautic/app/bundles/SmsBundle/Controller/Api/SmsApiController.php on line 37



Any idea if this is a bug. Or did iI do something wrong…



I unzipped at local host

Renamed extratced folder 1.4.0 to mautic

created new folder at host

uploaded mautic to new folder



and like I said from the start went to… and got the error above. Would appreciate any help or advise thanks.

Hey guys, not a PHP programmer. Uploaded top level folder, went to domain/subfolder/installer and got this error
Parse error: syntax error, unexpected ‘[’ in /home/content/95/10822095/html/testmautic/mautic/app/bundles/SmsBundle/Controller/Api/SmsApiController.php on line 37

Any idea if this is a bug. Or did iI do something wrong…

I unzipped at local host
Renamed extratced folder 1.4.0 to mautic
created new folder at host
uploaded mautic to new folder

and like I said from the start went to… and got the error above. Would appreciate any help or advise thanks.

Oh no. That is PHP 5.4 syntax. I created a pull request fixing it:

https://github.com/mautic/mautic/pull/1732

But I’d recommend to update your PHP version anyway. It is not supported by PHP itself for quite a long time:

http://php.net/supported-versions.php

Thanks @escopecz. Got rid of that error but got a new one. Should I open a new thread just in case?

Fatal error: Cannot redeclare class SessionHandlerInterface in /home/content/95/10822095/html/mautic/app/cache/prod/classes.php on line 387

It seems like a cache issue. Remove app/cache directory and let it regenerate on a page load.

Hey @escopecz removed cache and it worked:) Thanks. However, hate to bother you with this but got error when trying to install database. Pretty sure it’s got nothing to do with Mautic but still clueless so gotta ask.

An error occured while attempting to connect to the database: SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

It can be for many reasons like wrong username, password, host, port or that the MySql server is down. Maybe you’ll be able to find more information in the MySql logs.