Hey Craft Community - I'm a new craft developer and I've spent hours trying to get my install up and running. I'm really under the gun to deliver something to a client and I've totally out of options.
High level: When I run MAMP and point it to my project I keep getting:
This page isn鈥檛 working localhost is currently unable to handle this request.
HTTP ERROR 500
I've tried stack exchange and everywhere to try to solve this. Any guidance or help would be completely incredible. I'm so desperate to get this project shipped.
Detail:
HOWEVER:
Any tips? Help? Please!
1.0.87.2.11Not sure how to get thisnone that I know ofI got the .env from the other developer and I still can't get this thing running. I wish there was better documentation about how to get an instance running and some kind of error vs. This page isn鈥檛 working localhost is currently unable to handle this request. I'm really in the dark and under a deadline - really desperate to find a solution. It was working on my machine, and it's still working on other devs. I just can't get the server to respond.
It's driving me insane that I can make a fresh install run but not this project.
John, not running MAMP here and have never seen a message like that, which looks like it's own (obfuscating) rewrite of what's going on; possibly just the 500 itself, which is a server error saying it failed 'internallly' trying to run the php code overall.
There's not much detail there, and Craft nor any other framework can help, because the server crashed.
What often causes such blind errors like this often, especially on new installations or re-installs, is not having enough memory etc. configured for the php runtime of the server.
You can try the settings Brad of the head team recommends, in his reply on another issue posting here: https://github.com/craftcms/cms/issues/3447#issuecomment-436682692
Be sure if possible to get help locally if you're not confident about the php.ini settings, or where the proper php.ini is, though you can easter egg to discover it.
Good fortune -- this is what I can suggest at this hour. Let us know if these or higher values get you running, and others can chime in when they see.
@narrishinsd - Thanks so much for the tips. I'm trying to figure out how to config the php.ini and struggling.
Where do I set this memory limit? I just searched my whole repo for memory_limit and a php.ini file and I can't find any of this.
I think my issue is I'm not experienced at all in Apache or MAMP - I've only worked with Rails / Node in the past. I'm really struggling to find any good docs or info on localhost config.
So sorry to be such a N00B. Really appreciate the direction and help.
John, don't concern at all at being new at this one of the many angles of today's software. We've all been there. And we each get to be there again, when we involve in another package.
Let's look at MAMP - and it looks like this php.ini matter is a little obscure there. Kind what tends to happen in an 'I'll do it for you' system. I turned up this page by googling mamp php.ini:
https://stackoverflow.com/questions/11691767/where-does-mamp-keep-its-php-ini
In it you'll find:
Let me fire just this information off to you, as I know you're wanting to start moving forward, and I'll come back with items to set.
And before long, there should be one of the Mac-using community, which is quite large, to come back who also still uses MAMP, and can give you good advice on the tricks there...
Ok, coming right back, if you're using MAMP Pro, here's what the online manual says, directly to change php's memory_limit:
https://documentation.mamp.info/en/MAMP-PRO-Mac/How-Tos/General/IncreasePHPmemoryLimit/
Yes, the doc is out of date, talking about php 5, but this likely hasn't changed.
Following Brad's advice, this is likely what you need, once you've used their editor to find it:
memory_limit = 256M;
I think they're a little confused in the doc, having that single '-quote beginning the example, but if the editor has such quotes, then you'd just replace the number to 256M anyway, so keep what it shows.
And it should be the same procedure, to find and set max_execution_time. I doubt that's your issue here, but it's good to know how to do this generally.
Ok, and would mention i'd looked up your company last night -- great things you work on, actually, was impressed....
@narrishinsd - Thank you so much for your kindness and help! I am starting to understand this more now. Let me give this a shot and see what happens. Thanks again!
You won't find php.ini in your repo - this is a configuration file for MAMP's PHP installation. You can edit it by going to the PHP tab in MAMP, and clicking the right arrow icon next to the PHP version. This opens a window where you can edit and save the file, and afterwards you'll want to restart your MAMP server(s).

@turnstylerj - Thanks so much!
Ahhh! Ok following the above I was able to come up with a different error - progress!
````
Warning: require_once(/Users/johnsalzarulo/code/poplar-blog/vendor/autoload.php): failed to open stream: No such file or directory in /Users/johnsalzarulo/code/poplar-blog/web/index.php on line 11
Fatal error: require_once(): Failed opening required '/Users/johnsalzarulo/code/poplar-blog/vendor/autoload.php' (include_path='.:/Applications/MAMP/bin/php/php7.1.20/lib/php') in /Users/johnsalzarulo/code/poplar-blog/web/index.php on line 11
````
Any thoughts?
Here is my index.php:
````php
/**
// Set path constants
define('CRAFT_BASE_PATH', dirname(__DIR__));
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');
// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH.'/autoload.php';
// Load dotenv?
if (file_exists(CRAFT_BASE_PATH.'/.env')) {
(new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();
}
// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
$app->run();
````
Does /Users/johnsalzarulo/code/poplar-blog/vendor/autoload.php exist in your project? If not, have you run composer install in your project root directory?
馃憤 馃弲 馃巻 Success. That was my issue composer install in my root directory fixed my issue. Thank you so much to @turnstylerj @narrishinsd and the craft community.
For real. Thank you thank you.
Most welcome, John, I am sure from @turnstylerj as well.
In future, you may want to join the Craft Slack -- lots of good information and discussion therve, plus works best for problems which aren't Craft's software releases, but about usage and so forth.
and there's an app for it... ;)
p.s. http://turnstyle.studio/ is quite a website, as well...