Connect with us

How to solve This page isn’t working HTTP ERROR 500 in Laravel

kizinho

Published

on

Follow
DEVELOPER PROGRAMMING: How to solve This page isn’t working HTTP ERROR 500 in Laravel [New  Developer Programming] » Naijacrawl
Photo: Naijacrawl
site

In case you ran into this problem This page isn’t working www.example.com is currently unable to handle this request HTTP ERROR here is the cause and how to fix it. First, it must not be an error from your code, it is an error from querying large data from your database. So request ran out of memory, to fix it follow this step.

In your Laravel root project folder locate this file

vendor/laravel/framework/src/Illuminate/
Database/Connection.php.

Insert this line of code after line 324 

ini_set('memory_limit', '-1'); 

or follow the code snippet or image below:


 public function select($query, $bindings = [], $useReadPdo = true)    {        return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {            if ($this->pretending()) {                return [];            }            // For select statements, we'll simply execute the query and return an array            // of the database result set. Each element in the array will be a single            // row from the database table, and will either be an array or objects.            ini_set('memory_limit', '-1');         

   $statement = $this->prepared($this->getPdoForSelect($useReadPdo)                              ->prepare($query));            $this->bindValues($statement, $this->prepareBindings($bindings));            $statement->execute();            return $statement->fetchAll();        });    }


Click Here To Comment


site


kizinho

Adike Kizito is a top-rated software developer, blogger, sports, and entertainment lover. He is the CEO of these popular websites Naijacrawl.com and Mp3ager.com. He operates his software developing task through Kizzsoft.com,... Read More

Continue Reading
Click to comment

Be first to comment


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Mastering laravel Routes

    kizinho

    Published

    on

    DEVELOPER PROGRAMMING: Mastering laravel Routes [New  Developer Programming] » Naijacrawl
    Photo: Naijacrawl
    Hi, folks, we have successfully mastered MVC in the last class, if you missed it go back here.We have talked about routes and where they can be found in the project, will do a quick freshened up in routes.Laravel routes simply accept a URI and a Closure, providing a very simple and expressive method of defining routes:Before we start using a route, take note of the following :Available Router Methodsget - you use get when you want to get resources from the databasep...
    Continue Reading

    How to Upgrade Laravel Application from Version 5 to latest Version 8

    kizinho

    Published

    on

    DEVELOPER PROGRAMMING: How to Upgrade Laravel Application from Version 5 to latest Version 8 [New  Developer Programming] » Naijacrawl
    Photo: Naijacrawl
    Hi, Folks, have you feels like Laravel continuous released of new versions has let you down and you can't cope with it any longer, don't worry this article is a quick guide for you, that has I upgrade naijacrawl from 5.8 to the latest 8 versions.All you need to know before upgrading your old laravel.External packages might fail to install, so isolate your packages firstInstall fresh laravel applicationThank me later.First, all you will do to be successful when upgra...
    Continue Reading

    Mastering Laravel MVC (Model View Controller) and Folder Structures

    kizinho

    Published

    on

    DEVELOPER PROGRAMMING: Mastering Laravel MVC (Model View Controller) and Folder Structures [New  Developer Programming] » Naijacrawl
    Photo: Naijacrawl
    Hi, folks, we have successfully created the laravel project in the last class, if you missed it go back and create a new laravel project here.Before going to MVC (Model View Controller) let's serve up the project for development purposes using the following commandphp artisan serve output resultStarting Laravel development server: http://127.0.0.1:8000 incase if you want to serve your project from a different port number, use the following command belowphp artisan...
    Continue Reading

    Latest


    Download Naijacrawl App today

    Fastest way to read on the go

    Download the Naijacrawl App.