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

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

Related

Laravel webfox/laravel-xero-oauth2 getting Class "App\Models\XeroAPI\XeroPHP\Models\Accounting\Invoice" not found

So I have installed the webfox/laravel-xero-oauth2 extension via composer and configured my xeroController and the webhook controller as defined in the docs for this (https://github.com/webfox/laravel-xero-oauth2) the connection works and I am able to show that Xero is connected.
I then started work on submitting an invoice and as per the last part of the docs i opened the link (https://github.com/XeroAPI/xero-php-oauth2-app/blob/master/example.php). To facilitate this I used a working non Laravel invoice app from inhouse and progressed well but when i run this on an environment where I can connect to Xero (I am using a staging site here rather than configuring ngrok or some such thing) and i get the error above. The code where this error has happened is as follows:
$xero = resolve(\XeroAPI\XeroPHP\Api\AccountingApi::class);
$xeroTenantId = $xeroCredentials->getTenantId();
$type = XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC;
$client = $this->client();
Now I searched in the api and found the reference to this in my projects vendor folder vendor/xeroapi/xero-php-oauth2/lib/Models/Accounting/Invoice.php on line 361 it is shown const TYPE_ACCREC = 'ACCREC'; So It seems I'm not referencing this correctly? On the inhouse this is being found with no issue (although the folder structure is not the same as in Laravel so not sure how helpful this is but it is in it's vendor folder and following the exact same path).
What have I missed? I use phpStorm and it is saying that this is an undefined namespace. I have also this message on the line where we connect to Xero but a dd has verified that this works, the error is shown after this line too. I have ran composer dump-autoload and I have also cleared out all caches to rule this out but same error.

Laravel deployment issue on Linux sharded server

I have built my Laravel application on a Windows10 machine. For the deployment on my Linux server (shared server), i have followed this youtube tutorial https://www.youtube.com/watch?v=x4VIWOj_9dA
My Application works fine on my developpement computer. The method of the tutorial works fine on window machine. But when i made the deployment on Linux with the same package i have tested on my Windows machine, for a page that does not call a controller, it works but for any page where a controller is called, i receive this error message (an example for a page that requires the kitContrller):
Illuminate\Contracts\Container\BindingResolutionException
Target class [App\Http\Controllers\kitController] does not exist.
My problem is that the target controller existes in the indicated folder without any case problem but the message says that it does not existe.
Please, help.
After some other verifications, i saw that the problem was in my router: In the router, i have written the name of the Controller with lower case (Example: kitController in stead of KitController.
k(Lower case) in stead of K(upper case): That was the problem. I have changed things and it works fine.
Thank u for suggestions.

Unable to locate the model you have specified - All i did was change servers

I have a codeigniter website, using the latest version of the frame work. I was hosting my website on Azure, and it was working fine - never any issues.
I've just moved all the files to a different server, a linux one - standard normal web hosting type server with cpanel.
My site loads up, however a lot of pages I use that require models, are giving off errors, as if the files do not exist
Unable to locate the model you have specified: UsersModel
Just note : I have read so many articles today, that you need to have uppercase / lowercase and all that stuff, but that's how i already have it setup, it just does not work since changing servers. and it worked perfectly fine yesterday on the Azure server.
Also, when going to the actual file in my address bar, it takes me to the 404 error. not sure if this has anything to do with it?
Did you change your base url in config file ?
All model , controllers, helper ,library name must me capital letter.
If you change server remove index.php from config file where you will get config['index']= ""; and save this.
Still you get error then save base url like domain/project_name/index.php

Laravel 4 localhost status 500

I pushed (bitbucket) a laravel 4 project from my imac and pulled it with another mac. What I get is a status 500 message if i try to visit /public.
I am using MAMP.
The strange thing is that every other laravel project is working fine. One project is even a copy of the project that doesn't work.
Any idea whats wrong?
Point Apache to a public directory instead of root one and use URLs without public in it.
Restart web server after that to make it work.

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