Laravel 5.1 post requests not working - apache

In my Laravel project when running php artisan serve everything work as expected. but when I use apache the post requests are not working and I'm just getting a response with status code 500.
anyone can help me solving this? thanks in advance

To get more info on the error, enable debug mode.
In .env(preferred):
APP_DEBUG=true
or in config/app.php:
'debug' => true,
This will enable displaying stack traces in the response on errors like this.
You can also have a look into app/storage/logs/laravel.log to see what error you have.

Related

WT 8-1: Getting HTTP GET on resource 'http://training4-american-api-maryumsiddique.us-e2.cloudhub.io:80/flights' failed: not found (404)

I'm doing mule 4 training and currently I'm on WT 8-1. I followed all the steps as they told and when I run the project it deployed successfully. But when I call "http://localhost:8081/american" from postman it gives me the following error.
Although the status is Started on Runtime Manager as below.
In API Manager the status is Active as well.
And I cannot figure out what's the issue. Can anyone please tell me what should I do?
Really appreciate the help 🙂
Likely your app deployed locally is not calling the right URL for the API deployed in CloudHub. Maybe the URL should be http://training4-...cloudhub.io/api/flights or something like it.

CKAN API Request doesn't work: `http://demo.ckan.org/api/3/action/package_list`

I've run into a strange problem that a simple API request doesn't work. I tried to call http://demo.ckan.org/api/3/action/package_list and http://127.0.0.1:5000/api/3/action/package_list, and both resulted in the error: "No such file or directory".
When I run http http://127.0.0.1:5000/api/3/action/package_list, I get "result": []
If I browse CKAN through it's user interface, I can see the datasets.
Before running this command, I activated the virtual environment and started up CKAN server.
Do anyone know what might be the problem??
p.s. this same command worked before, but it doesn't work anymore today.. and I've tried to restart the virtual machine.. since I'm pretty new to development, it could also be that I missed some pre-conditions. Any advice would be very much appreciated!
Thanks a lot in advance!
Qing

Heroku: http-error 410. Invalid response from API (I am not behind a proxy)

I am currently having some issues with heroku. I just installed it and tried to heroku create. It takes my credentials but so far i just get this
! HTTP Error: https://api.heroku.com/login 410 Gone
! Invalid response from API.
! HTTP 410
! {myMail myPw}
!
! Are you behind a proxy?
! https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy
I have been looking around for others with that issue but they all were behind a proxy. I am not. I also checked my firewall settings and also tried to run the command line client with admin rights. But nothing has proven to be successful so far. I'll keep trying and post an answer as soon as i figure it out. Maybe someone of you has an idea. Would be appreciated. Thanks in advance and
Greetings Chris
EDIT
Maybe some info. I'm running
Windows 10 Pro (V10.0.15063)
and a basic network setup with a router and DHCP
I had the same problem today.
When I type
heroku
in my Command Prompt, it promotes me to enter my email and after that my password. Then I got the same error message as you.
After that instead "heroku" I typed
heroku login
I entered the same email and password and everything was fine.
Ok. I made it work. Unfortunately I'm not really understanding why this worked which is pretty unsatisfying but I'll tell you what I did. I stumbled on some posts that were saying heroku-cli is outdated if that happens. First I tried to update it with npm using
npm update -g heroku-cli
which basically made heroku stop working alltogether because now the cli reported it needed node >7.X (and I was still running on 6.X). The node update I then made also didn't help because now heroku-cli was unable find the command bash.
In the end I just reinstalled heroku. After that (with at first getting the same error as in the beginning) I first did
heroku update
and after that heroku login worked. Now why I don't really grasp and maybe someone of you guys knows. But the version I had before heroku update was exaclty the same as afterwards
heroku-cli/5.11.12-8ae9780 (windows-amd64) go1.7.5
I found out the heroku.cl was blocked by my antivirus and unblocked it. Now its working flawless.
Updating Heroku worked for me.
heroku update

Struggling with net::ERR_INCOMPLETE_CHUNKED_ENCODING on production site of my Symfony2+PHP5.6+Apache 2.4.x app

We face the "net::ERR_INCOMPLETE_CHUNKED_ENCODING" errors on our production site and cant find any working solution. StackOverflow is full of questions on this subject and we tried this and that but no working solution found. Our system is based on Symfony2+PHP5.6+Apache 2.4.x running on CentOS7.
Symptoms are that app is working fine when server starts ... but after some time the browser reports "net::ERR_INCOMPLETE_CHUNKED_ENCODING" errors and doest show certain pages (because they are loaded incompletely). Restarting apache fixes this for some time but it appears again soon. StackOverflow contains a lot of different hints that doesnt help us to understand the source of the problem. Can anyone give us some REAL hint here?
After further investigation I found out that server sends incorrect content-lenght information to browser for some reasons and its the source of the error.
To adjust this I have enabled content gzipping by adding 'SetOutputFilter DEFLATE' to Apache config file see details here http://httpd.apache.org/docs/2.4/mod/mod_deflate.html . This simple setting caused 'ERR_INCOMPLETE_CHUNKED_ENCODING' error to disappear and apps are working correctly for now. Whats more by gzipping the content the bandwidth dropped significantly.
In the context of a Controller in Drupal 8 (works for Symfony Framework as well) this solution worked for me:
$response = new Response($form_markup, 200, array(
'Cache-Control' => 'no-cache',
));
$content = $response->getContent();
$contentLength = strlen($content);
$response->headers->set('Content-Length', $contentLength);
return $response;
Otherwise the response header 'Transfer-Encoding' got a value 'chunked'. This may be a problem for some browsers.

rails/heroku route error /stylesheets/all.css

I'm new to rails and very new to Heroku, but I've recently hosted my app up on Heroku and am getting the following error in my log:
Started GET "/stylesheets/all.css" for ...
ActionController::RoutingError (No route matches "/stylesheets/all.css"):
I stumbled across this forum (http://railsforum.com/viewtopic.php?id=38540) where someone was able to fix a similar problem by setting config.serve_static_assets = true in their config/environments/prodcution.rb, but this did not work for me. Does anyone have any thoughts on this? To clarify, I only get this error in production, not in dev. Thanks.
Also, rather interesting is that I am actually able to access /stylesheets/styles.css with no problem...
Why not just add a blank all.css file?