laravel-5phantomjsphp-phantomjs

How to configure/enable php-phantomjs on shared hosting server


I am using PHP-Phantomjs http://jonnnnyw.github.io/php-phantomjs/ to capture the content of my website, tools I am using Laravel v5.0 and PHP-Phantomjs v4.0 it is working perfect on my local MAC machine but the problem is.

I have uploaded files manually as I had to do always to the server and there is no difference in files, but when I try to generate image following error occurs.

FatalErrorException in ContainerBuilder.php line 419:
syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH)

I think the phantomJS exec file I have uploaded is not compatible, or is there something else I have to do to enable the phantomJS on GoDaddy server?


Solution

  • You're getting this error because, finally block of try-catch was added in PHP 5.5. So the reason it wont't work, you have older version of PHP on your production server.