Error 500 working with MAMP

It could be a simple thing to fix but I have no idea of what’s failing…
I keep on getting “localhost is currently unable to handle this request.” 500
.htaccess is set to RewriteBase /
It’s a simple site. I haven’t touched index.php
no idea what’s happening as it’s same config as a site that does.

Do you get any errors in the error logs (MAMP/logs). Have you tried without setting the RewriteBase? Have you changed anything else, like removed any standard folders or renamed them?

1 Like

I have just tested a standard ‘plainkit’ instal of Kirby on the latest version of MAMP - no changes made whatsoever to any file - and it works.

1 Like

Thanks for the help!

this is what I get:

[02-Apr-2016 17:27:06] PHP Notice: Use of undefined constant DIR - assumed ‘DIR’ in /Applications/MAMP/htdocs/2016/index.php on line 6
[02-Apr-2016 17:27:06] PHP Warning: require(DIR/kirby/bootstrap.php) [function.require]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/2016/index.php on line 6
[02-Apr-2016 17:27:06] PHP Fatal error: require() [function.require]: Failed opening required ‘DIR/kirby/bootstrap.php’ (include_path=’.:/Applications/MAMP/bin/php/php5.2.17/lib/php’) in /Applications/MAMP/htdocs/2016/index.php on line 6

line 6 of index says: require(DIR . DS . ‘kirby’ . DS . ‘bootstrap.php’);

Line 17 of .htcaccess: RewriteBase /kirby

even setting that line to RewriteBase /2016 nothing, or even commenting it.

On Mamp, it should not be necessary to set the Rewrite base at all. What PHP version are you using?

Is there any content in the Kirby folder?

1 Like

PHP 5.2.17

Kirby folder is a fresh install, it weirdly only happens in a 2 sites, I have 2 that are fine. What should I look into those that are fine to see what´s the difference?

It has momentarily worked on MAMP PRO, but when switching to lite it has failed (╯°□°)╯︵ ┻━┻

That’s what I thought, Kirby requires at least PHP 5.3, but you should use the highest version that is available to you. MAMP now has PHP 7 support.

1 Like

FML, switched to PHP 5.4.10 and it works

So this was the problem the PHP version. I’m running MAMP on Yosemite OSX and latest Kirby.

Thanks all for your help

On an offtopic, how can I update MAMP without loosing my htdocs folder?

I don’t think the htdocs folder gets overwritten when updating, at least I haven’t experienced it. Make a backup before updating, then you can just copy everything back into the htdocs folder in case anything goes wrong.

1 Like

I didn’t see any “update” options (fail for them), just download new. So thanks for the help @texnixe I’ve had this problem a few days. You made me happy today :sweat_smile:

Fine, then it improves my positive karma :joy:

1 Like

+1000 but beware I might come back around :smiling_imp:

You are always welcome :slight_smile:

1 Like