Server unable to handle request in laravel 5 - php

I installed Laravel 5 by it's installer and I'm facing a issue with 500 error. I changed chmod with no change (755 for root and o+w for storage).
Running server with php -S localhost:8888 ~/bloggy/public
I have no idea what is doing this.

I think you must run Laravel in the root folder (/bloggy) and not in /public, because in the Laravel File Structure, the public folder is used by Laravel to read assets, css, javascript and other files that you could pass to the view by Laravel helper.

I encounter the same problem. Every request I made it gave me
Server unable to handle request in laravel 5.
I got this error because I configure auth.php and made some mistake in auth.php. I restored auth.php to its original and this fixed my problem.
Hope this helps. Cheers

Related

Run laravel project in localhost

I have installed laravel by composer create-project laravel/laravel –-prefer-dist
after this run php artisan serve command to laravel project directory and get this result.
Laravel development server started: http://127.0.0.1:8000
But when i go to http://127.0.0.1:8000 in browser laravel project not running and give error
This site can’t be reached
127.0.0.1 refused to connect.
but http://localhost/laravel/public/ it is working. Can anyone tell me that what is proper way to run this laravel project.
Try to run in different port
php artisan serve --port=9000
and then try http://127.0.0.1:9000 will work.
As might be on port 8000 something already running on your system will not make it work.
And you can also run your laravel project without artisan serve command
If anyone wants to make the application public, the more easy and fastest way is:
Rename the "server.php" file in root directory, in "index.php"
Move your .htaccess from public folder to root directory
Make your directory accessible to Apache2 (set all file permissions
to 777).
At starting level, you can use url like this http://127.0.0.1:8000 with port-number. but in further level you must working with simple url like http://localhost/laravel/public/.
One more thing - you should remove "public" keyword from url, so you access direct your root-project. Review this link - Laravel 5 - Remove public from URL
I had that problem too! And couldn't solve it. So I installed openserver from https://ospanel.io/ and put my site on the folder domains (Windows 10), then I just start Open Server and click "My Sites" and choose my site - it opened in my browser which set by default on Open Server program and click the folder on my browser cooled "public" and there you go -> your site is working.
I now that isn't solve the problem with cmd and start thought cmd and server like http://127.0.0.1:8000, but you can take access to your local site through http://'your site'/public/'your pages'
Good luck!
Changing the port will help.
php artisan serve --port=9000
worked for me
Try this
php -S 127.0.0.2:8000 -t public/
It will start your local development to http://127.0.0.2:8000 which will work great.
OR
You can try instead
php -S 127.0.0.1:8000 -t public/ It will work in any browser as compare to command php artisan serve which open url http://127.0.0.1:8000.
Successfully landed to Laravel page by the following steps.
Note: This is after the successful installation and configuration.
Was in /var/www/html/
Created the project using the following command after Laravel installation successfully
$laravel new firstapp
here firstapp is my project
cd to firstapp (folder created with project creation with $laravel new firstapp)
serve using the following command
$ php artisan serve
The project ready to serve with the following statement as below
Laravel development server started: http://127.0.0.1:8000
You can access the laravel page using the following URL
http:///firstapp/public/
Sometimes this occur when you have installed an anti virus software. Anti-virus deleting your "server.php" file. For that you can create an exception in anti-virus for "server.php" file or creating a "server.php". You can find relevant code for the file searching. Basically server refuse to connect occurs when the "server.php" deleted or removed from the file path.

Laravel controllers not working in another computer

I just copied my laravel project from one pc into another. I changed the .env file accordingly for new domain url (it's in localhost bytheway).
However when I click the links, namely login, register, they say the requested URL not found on this server.
I tried to run php artisan serve command, but it says
[Error Exception] No such file for directory.
But the artisan file is there. I'm afraid the domain still pointing to previous one, hence the error.
Is there anywhere else I need to change the pointing url?
After copying the directory you should always run composer update secondly make sure you have.
i fixed it by enabling module rewrite option in apache extension in WAMP

Laravel 5.4: 500 ISE without any error output

I've been recently working on a laravel app and when I finished it, I decided to upload it to a server through FTP. I've set up all the proper folders in the storage/ directory and chmodded them to 777. ModRewrite is setup on the server, but I still get a 500 ISE without any log stack displayed in browser. I don't have access to Apache logs, so cannot check what's wrong. Please, could you give me some suggestions on what can be wrong and how to fix this? (The app was working absolutely fine on my local server on PC)
Finally got it working by executing:
php composer.phar dump-autoload
php composer.phar install
(The second one only generated optimized class loaders, because everything was installed earlier)
php artisan key:generate
Assuming permissions are right, I'd say it has to do with missing encryption key.

Laravel 5.2 HTTP error 500

I have made a website with Laravel 5.2 and now want to put it in my VPS. I installed LAMP on my server, and put my project in /www/ directory. I can access my server, however, when I try to access /public, I get an HTTP 500 error. Both my /bootstrap/cache and /storage are writable. Do you have any suggestions, what should I do? Thanks for your help!
Sorry, just made a mistake on changing rights of bootstrap and storage folders... Very sorry... Everything works now!

how to access the laravel project after installation?

I have installed the laravel 5 on my local machine.And made the changes in the database.php file in config folder.I have set my credential.Now I am accessing the folder http://localhost/laravel/public/ but it displays html page with this content. Whoops, looks like something went wrong.What configuration should I set apart from this database.php so that it works fine.
This will likely happen to you everytime you create a new Laravel project. The problem is that your webservice (apache/nginx) doesn't have read/write permissions for the storage folder. From the root of your installation perform a chmod 777 -R ./storage and that should get you to the welcome to Laravel screen you should expect for an installation, and from that point on you should now get the error reporting if you have debug mode set as true. If you are still having trouble, you may need to provide access to the ./public folder as well.
You can run laravel application when you have successfully installed in your machine, Add '/public' in url after root folder. Means you have installed app on www.firstlaravel.com and your root folder is 'first'.
So you can run app using like => www.firstlaravel.com/public

Categories