Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having a issue just after downloading this contact form tutorial app #20

Open
Sumair1981 opened this issue Aug 24, 2017 · 2 comments
Open

Comments

@Sumair1981
Copy link

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

@vickymessii
Copy link

vickymessii commented Jan 12, 2018

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

@jacurtis
Copy link
Owner

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 jacurtis reopened this Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants