kernel interface not handled request in laravel - php

I have one running project on LIVE server and I have just download it and try to run in the localhost,
but it gives error
This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500
I have started to debug step by step from index.php by adding exit()
i have reach to public/index.php and inside that the ERROR comming from
$response = $kernel->handle(
$request = Request::capture()
)->send();
I have check the $request it was giving the response but $kernel->handle is not handling the request as i think.
Please guide me on this what should I approach next?

Can you check the storage/logs/laravel.log file? This file may give you a better idea of the actual issue.
One more thing you can try running the composer dumpautoload command.

Related

PHP - Laravel error : Symfony\Component\Finder\Exception\DirectoryNotFoundExceptionon my cPanel

I mistakenly ran my laravel application on debug mode in my production environment, and it threw an error for me to change App_debug:true to App_debug:false, which I did, ever since then, my site has been throwing an HTTP ERROR 500
"This page isn’t working admin.robyhub.com is currently unable to handle this request.
HTTP ERROR 500"
I then went on to my cpanel terminal and tried to clear the logs on the config file but it gives me the below error.
[thehcerl#premium261 admin.robyhub.com]$ php artisan config:clear
Symfony\Component\Finder\Exception\DirectoryNotFoundException
The "/home/thehcerl/admin.robyhub.com/resources/lang/ha" directory does not exist.
at vendor/symfony/finder/Finder.php:590
586▕ } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
587▕ sort($glob);
588▕ $resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob));
589▕ } else {
➜ 590▕ throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
591▕ }
592▕ }
593▕
594▕ $this->dirs = array_merge($this->dirs, $resolvedDirs);
+2 vendor frames
3 app/Providers/TranslationServiceProvider.php:40
Illuminate\Support\Facades\Facade::__callStatic()
4 app/Providers/TranslationServiceProvider.php:27
App\Providers\TranslationServiceProvider::phpTranslations()
Cpanel Terminal
Ever since I changed debug to false on my .env from my laravel project main directory because the laravel documentation warned me to not use debug mode on a non-local environment. I expected my application would automatically stop receiving the laravel debug config solutions and would run properly.
This is not a very generic error, it's as a result of an error on my part, I created language folders that I did not link to my PHP "translationProvider.php" file, so it invariably gave me that issue.
I was using a purchased template from Envato so I hadn't taken the time to get the full inner working of the backend at the time.
If anyone has a similar error I hope this will guide you not to make the mistakes I made, and meticulously look through your code when making changed or edits.
Thanks, happy coding.

PHP / Laravel and Jenkins

I'm Integrating Laravel and Jenkins, and it seems to be working.
The only problem I have is that all my tests are used with base Url : http://localhost.
So All my tests fails because it says:
http://**localhost**/path/to/uri] failed. Received status code [500].
So, all the test fails because I guess I don't know
Where should I define what should be the http://localhost to be the baseUrl I want.
What should I put here, or where should I configure it... I could log ssh to my Jenkins machine and curl my url to see what's the response to see if it is responding well, but I'm quite unsure how should this work...
Any help will be appreciated!
Open TestCase.php which is inside test folder. There you should have protected $baseUrl which should be your application URL.

laravel 5.1 white screen error;

I am working on a project and i just completed some tasks; eventually we need to deploy it on ftp for test.
I am stuck right there when it shows only the blank page; .htaccess file is working, index.php is also reachable; it works up to line 50 of index.php:
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
// upto this every thing is fine but
After this line echo command is not working means error is right there
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
I set appropriate permission to folders storage and bootstrap; and php version is 5.5.9.
How can i shoot this problem; it took really long time what's the problem with it
I know it's an old post, but I reached here looking for the same error.
Turned out to be a malformed .env file.
I wanted to set the APP_NAME with spaces and was setting the variable like this:
APP_NAME=CAFS API
The correct implementation is to surround the string with quotation marks:
APP_NAME="CAFS API"
Only a guess able answer is here possible.
I guess you are missing a php module like curl or you did not enable fopen wrappers for http/url. This depends what "Illuminate\Http" is using.
Try to enable the php error log.

Setting up php-sdk-gae with symfony2

I'm trying to run symfony2 with a hello world sample bundle inside php-sdk-gae.
I'm following the instructions provided in https://developers.google.com/appengine/docs/php/ and I can run the demo with the development controller (i.e: configuring app.yaml as following:
application: helloworld
version: 1
runtime: php
api_version: 1
handlers:
- url: /bundles
static_dir: helloWorld/web/bundles
- url: /favicon.ico
static_files: helloWorld/web/favicon.ico
upload: helloWorld/web/favicon.ico
- url: /.*
script: helloWorld/web/app_dev.php
It works fine, and I am able to get a Hello World after running the server and load /hello/World page
But when I try to run it with the production controller (app.php instead app_dev.php), I get an internal server error.
Request URL:http://mysite.local:8080/hello/World
Request Method:GET
Status Code:500 Internal Server Error
The only clue is in the console window where I launched the server, showing the lines ...
ERROR:root:php failure (255) with:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.4.15
Content-type: text/html
If I make some changes in app.php files, I realize that it works fine with following AppKernel loading lines:
$kernel = new AppKernel('prod', true);
$kernel = new AppKernel('dev', false);
$kernel = new AppKernel('dev', true);
But not with the default configuration for the production enviroment ('prod',false).
I'm launching GAE server with this command:
google_appengine/dev_appserver.py --php_executable_path=/home/jon/php-sdk-gae/php-5.4.15/installdir/bin/php-cgi helloWorld/
I'm new in GAE, and I wonder Where can I find logs to get some more information about this error.
There is an uncaught exception in your production environment. Thats the reason for the http 500 error.
Let me quickly explain AppKernel::__construct
$kernel = new AppKernel($environment, $debug);
The first argument is the environment , the second one is the debug option.
If you set debug to true , symfony will try to catch exceptions and show you a nice stracktrace.
This covers the first and the third case where you don't get the http 500 error ( caused by an uncaught exception ).
$kernel = new AppKernel('prod', true);
$kernel = new AppKernel('dev', true);
Now you state the error is NOT thrown in dev environment with debug set to false.
$kernel = new AppKernel('dev', false);
This means in dev environment there is no exception.
Now you have to check the production log file to find out which exception has been thrown.
Use tail -f to see the live changes made to that file in your shell ( i.e. bash ) or if not available open the file in your editor and look for exceptions at the end.
tail -f app/logs/prod.log
In the symfony2 standard edition logfiles can be found at
app/logs/%kernel.environment%.log
... with %kernel.environment% being one of dev/prod/test
The problem is related with .htaccess file shipped with Symfony 2.2
I can use without any problem an application in symfony 2.0, and my application with Symfony 2.2 also works if I replace the web/.htaccess file shipped with Symfony 2.2 with the one shipped with Symfony 2.0
Maybe it is something related with the change made in order to avoid duplicate content (/app.php/something and /something), because since Symfony 2.2, /app.php redirects (301) the request.
I believe the problem is the lack of write support on the filesystem imposed by GAE. Also, symfony seems to rely on tempnam() function that's disabled in versions lower than 1.9.18 which is not public available at the moment I'm writing this.
There is also a problem with caching.
Maybe the problem is this, I've tried in localhost a project with developement version, all right. And when it's deployed to GAE it fails.
Maybe that helps.
http://www.ideato.it/planet-ideato/symfony2-su-google-app-engine/

Unable to set symfony project getting error on app.php

I have setup new project of symfony. app_dev.php/register is working good but when i switch to app.php/register then getting error
Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please e-mail us at [email] and let us know what you were doing when
this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
i have clear cache also but still getting this error. please give me solution i am in hurry because my project is goes final but now i am stucked here cannot publish it on live server
if you access it over app.php and get that error. you should try to setup debug modus of app.php file.
to do this you alter following line in the file web/app.php
$kernel = new AppKernel('prod', false);
to
$kernel = new AppKernel('prod', true);
this way symfony tells you what the problem is and i guess it has to do with the routing...

Categories