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

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?

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.

Related

Azure App Service recently started throwing an error: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.1.4.0

I didn't change anything, and my Azure App Service started throwing the error:
An error occurred while starting the application.
FileLoadException: Could not load file or assembly'Microsoft.EntityFrameworkCore, Version=2.1.4.0 ...
Which seemed odd, so I tried adding Microsoft.EntityFrameworkCore v2.1.4 with Nuget, and from that i just get a white error screen with
This page isn’t working
[WEBSITE] is currently unable to handle this request.
HTTP ERROR 500
With no other errors.
This all works perfectly fine locally (as always...) - I am not sure where to go from here? Any ideas? Thank you.
The error is because of the different versions between packages.
Please use this command in PM.
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 2.0.3
For more details, you could refer to this issue.

How to trace a "unexpected '?'" syntax error in a Laravel/PHP app?

I deployed my Laravel application to my web hosting site. Everything transferred successfully, but every time I login I get some message about parse syntax unexpected ? but its not telling me where its coming from this happens also on my other pages.
I'm using PHP 7.0 on my hosting site and Laravel 5.4. it will mean so much if you can help me understand what is going on. I can't provide you with a code because I don't know where the error is coming from. It doesn't tell me what line or anything. Please do not tell me the solution is in this similar question where it says "parse error" duplicate because I tried that and nothing happened
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
The question marks are a feature of php 7.1. As you have said in the comments, the version on the server is only 7.0.
see http://php.net/manual/en/migration71.new-features.php for more information about this feature.

intervention-image with laravel 5.2 on ubuntu-server breaks the other calls

I am using laravel 5.2 to write services for a mobile app. all the calls are working fine. My project is deployed in ubuntu server.
Now I want to resize the uploaded images inorder to maintain same performance. I thought of trying intervention-image.
In local machine it worked fine. I installed intervention-image and set the provider and alias name, I included the alias name to controller. Once I do that and update the server, all the other calls are getting effected. I am getting 505 error.
It's the intervension-image which is causing this problem, I checked with previous upload and I am getting all the calls. Any suggestions?
I suggest you create a dev environment like your production , use vagrant . About error 505 check you error log file to have more detail about the bug

Deploying laravel app on Fortrabbit - 403 internal server serror

I followed the setup to deploy laravel app on fortrabbit but now I am stuck with this error:
Error 403
Internal server error
Overload: More requests than the App can handle.
A script stops with an error. Are your config files up to date? Maybe turn on debugging to trace the error.
There is an error in the .htaccess file.
Something else. Please check the fortrabbit status.
I have checked the configurations but I keep find a cause for that or even a solution for this issue.
That's not really a good question to post her on StackOverflow. It's too specific - probably App- or even service-related. For such cases: please try customer support.

My website is throwing "PHP Fatal error: Call to undefined method CI_Lang::lang()"

I created a website using CodeIgniter Framework 2.1.0 that was originally working well. Yesterday, I integrated this i18n code into the site for multi-language support.
Now, when I upload my site to cpanel and open it, I get this error in my log file:
[21-Nov-2011 10:19:04] PHP Fatal error: Call to undefined method CI_Lang::lang() in XXXX
However, the website is working well on my localhost server (xampp for Windows). What's wrong?
See the thread attached to the library: http://web.archive.org/web/20120112092127/http://codeigniter.com/forums/viewthread/179036. In the first post is attached a modified library that claims to alleviate the buggyness of the original.
There is also a post on the first page there referencing an error similar to yours:
After copying the files as described in the article I get the
following error: Fatal error: Call to undefined method
CI_Lang::CI_Lang() in
/www/websites/audio-machinery/application/core/MY_Lang.php on line 32
Though he seems to be calling CI_Lang, not Lang. His solution appears to have been to use the code attached to the forum thread.
Also, cpanel is a control panel for hosting, not a hosting provider. But your hosting provider may be causing issues (e.g. if using older versions of PHP which do not work with newer version of CI. Often hosting providers will give you the ability to choose which version of PHP you are using--usually found in cPanel).
have you uploaded ALL the new files to your live server? that error implies that the code is not found or available to the script.
I came accross the same problem.... it was working fine on localhost but when loaded on live server it gives me undefined error... the problem appears becuase I created file with name My_Lang.php and My_Config.php as on live server it is case sensitive.... so I changed it to MY_Config.php and MY_Lang.php .... it works fine now.... Hope it will work for you too

Resources