laravel-blog-tutorial icon indicating copy to clipboard operation
laravel-blog-tutorial copied to clipboard

Having a issue just after downloading this contact form tutorial app

Open Sumair1981 opened this issue 8 years ago • 2 comments

Ussalaam-Ou-Alaikum And Wishes Curtis, hoping you would be good. I am having a problem after downloading the source code from here : https://github.com/jacurtis/laravel-blog-tutorial/releases/tag/part_40 as i am trying to run : php artisan serve i am getting this error : Notice: Constant LARAVEL_START already defined in /Applications/XAMPP/xamppfiles/htdocs/Blog-part-40/bootstrap/autoload.php on line 3 PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Applications/XAMPP/xamppfiles/htdocs/Blog-part-40/bootstrap/autoload.php on line 3

it your Part 40 - Sending Email from Contact Form [How to Build a Blog with Laravel 5 Series]

why i would be getting this error could you help me out.

Regards Muhammad Sumair Kaleem Web Engineer from karachi sindh pakistan west south asia

Sumair1981 avatar Aug 24 '17 00:08 Sumair1981

Change your php.ini changed as follows: memory_limit = 512MB to memory_limit = 536870912 this will work.

vickymessii avatar Jan 12 '18 07:01 vickymessii

Eh, be careful changing your memory limit, it can cause lots of long term problems in your application. That is a bandaid, not a solution.

Generally I see this error because you have a loop somewhere that is executing far too many times. This can be caused for many reasons though, sometimes it can be not calling a class correctly or not correctly importing a class at the top of your file. It is also common when you use a reserved word for a classname or import more than 1 of the same class. Try to fix the actual code, without changing the memory limit. Changing the memory limit isnt an adequate solution unless you specifically have a reason that your server is going to use more than half a gig of memory (which is highly unlikely while running a test server that is maintaining one active connection).

jacurtis avatar Jan 19 '18 04:01 jacurtis