I’ve tried googling around but apparently I am the only one with this issue.
I installed mautic according to the manual and all seems fine, the web side of it works as it should out of the tin. Not so much the php cron jobs. To investigate I sshed into my host (on justhost.com) to try to debug the issue.
I am running php 5.4 and if I run php console from the app folder it returns an error
My error_log says:
PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(’ in marketing/app/console on line 18
which should be: use SymfonyBundleFrameworkBundleConsoleApplication;
I believe I installed everything and in the manual there’s no reference to Symfony separate installation. Am I missing something?
Thanks
I’ve tried googling around but apparently I am the only one with this issue.
I installed mautic according to the manual and all seems fine, the web side of it works as it should out of the tin. Not so much the php cron jobs. To investigate I sshed into my host (on justhost.com) to try to debug the issue.
I am running php 5.4 and if I run php console from the app folder it returns an error
My error_log says:
PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(’ in marketing/app/console on line 18
which should be: use SymfonyBundleFrameworkBundleConsoleApplication;
I believe I installed everything and in the manual there’s no reference to Symfony separate installation. Am I missing something?
Thanks
Since it’s failing in the PHP namespace declaration:
https://github.com/mautic/mautic/blob/staging/app/console#L18
My guess is that your PHP is a bit older than 5.4.
Thanks for the answer escopecz, you are already pointing me in the right direction. I wasn’t sure if it was an installation issue. It seems more an “environment” one
I am/was quite confident I am running php 5.4
cPanel 11.52.2
Apache 2.2.31
PHP 5.4.24
MySQL 5.5.42
Perl 5.10.1
Strangely enough I created a test page
http://marketing.paolopelloni.it/test.php
and this returns PHP 5.6!
Having said that I forced PHP5.4 via php.ini in the app folder, just to get an extra error:
Failed loading /usr/php/54/usr/lib64/php/modules/ZendGuardLoader.so: /usr/php/54/usr/lib64/php/modules/ZendGuardLoader.so: undefined symbol: zend_new_interned_string
Status: 500 Internal Server Error
Content-type: text/html
I tried also disabling fast cgi but with no luck
Which I believe it has to do with an extra line in the php.ini. Commented and the error goes away but status 500 is still there, and so the error on line 18.
Is there any extra module I should install?
It seems like a server setting issue. Consult it probably with your hosting provider. I’m not a skilled sysadmin.
If this can be of any help to anyone else. php app/console does not work … but the trick from escopecz of commands.php does.
See: https://gist.github.com/escopecz/9a1a0b10861941a457f4
I have opened a ticked with justhost.com to understand why the cli php returns an error and I will update here again for the benefit of others.
In my case I had to use right php version on CLI