Forum
Running Perch on Localhost (MAMP)
Hi,
I have installed Perch Runway into the public folder of a new site, on my local hard drive and I am using MAMP to run the localhost. I've run the setup and everything ran smoothly (no errors). I can log into the site and everything looks fine. I created a .htaccess file as instructed and placed this in the root directory.
When I click the view page by the default home page, it takes me to the directory I use to store all my local sites. In this case, Users/Grant/Sites. However, when I manually enter the local url into the browser window, https://localhost/120-globe-library-website/Public/ I receive a 'Sorry, that page could not be found.' error.
This is my first time installing Runway on a localhost, so will freely admit I've probably done something stupid! Help would still be appreciated
You should point your virtual host to the site root. Someone might be able to suggest how you do that with MAMP.
MAMP is pointing at Sites, that isn't the issue, I'm running other php sites in 'sites' and they work fine. In any case, when I navigate to https://localhost/120-globe-library-website/Public/ I receive a 'Sorry, that page could not be found.' error. Hence I believe this is linked to Perch, not MAMP
Hi,
Just found the debug mode, hence thought this may help?
~~~ Debug Message - Perch Runway 3.0.10 [5] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate, pr.routeOrder, s.settingValue AS siteOffline FROM jggfu_pages p LEFT JOIN jggfu_page_routes pr ON p.pageID=pr.pageID LEFT JOIN jggfu_settings s ON s.settingID='siteOffline' UNION SELECT NULL AS pagePath, pr2.routePattern, pr2.routeRegExp, pr2.templatePath AS pageTemplate, pr2.routeOrder, NULL AS siteOffline FROM jggfu_page_routes pr2 WHERE templateID!=0 ORDER BY routeOrder ASC, pagePath ASC Using master page: /templates/pages/errors/404.php [1] SELECT regionKey, regionHTML FROM jggfu_content_regions WHERE regionPage='/errors/404' OR regionPage='*' ORDER BY regionPage DESC Request time: 0.1384 Process time: 0.1309 Memory: 2.4352
Please post your Diagnostics Report.
Perch Runway: 3.0.10, PHP: 7.0.0, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 7e72f9690b1498a1bead7a637c33a831c0d2f655 $, with PDO Server OS: Darwin, apache2handler Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10) App runtimes: <?php $apps_list = [ ]; PERCH_LOGINPATH: /120-globe-library-website/public/perch PERCH_PATH: /Users/Grant/Sites/120-globe-library-website/public/perch PERCH_CORE: /Users/Grant/Sites/120-globe-library-website/public/perch/core PERCH_RESFILEPATH: /Users/Grant/Sites/120-globe-library-website/public/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: localhost DOCUMENT_ROOT: /Users/Grant/Sites REQUEST_URI: /120-globe-library-website/public/perch/core/settings/diagnostics/ SCRIPT_NAME: /120-globe-library-website/public/perch/core/settings/diagnostics/index.php
Thank you
You don't appear to have Perch installed in the root, you have it installed in a folder.
I'd suggest pointing a local vhost to that folder so Perch is in the root of your site, otherwise you are going to have constant issues.
https://foundationphp.com/tutorials/vhosts_mamp.php
If I have understood correct (probably not!), I have changed my MAMP root folder to ~/Sites/120-globe-library-website/public. So this is now my root (I believe).
However, I now just get the error, 'The requested URL /120-globe-library-website/public/perch/core/runway/start.php was not found on this server.'
Sorry for being a pain
Hi,
This is now resolved.
I moved the site into the htdocs folder of MAMP. I've never had to do this before, hence the confusion. Thanks for the help
Hello Grant,
I'd advise getting MAMP PRO. I ran into many issues running Perch on MAMP free and almost abandoned Perch altogether because of it. Rachel told me to look into virtual hosts - I did and decided it was too hard, but then found out MAMP Pro wraps the whole virtual host process into a UI - you literally name your host then choose a folder for the site.
Made developing multiple sites with Perch on MAMP a breeze. Worth the cost twice over.
P.S. - Just remember the port number when accessing e.g. https:local.yoursite.dev:8888
Hi @tony,
Thanks, I did look at pro and found it confusing! So in pro, the root site doesn't need to be in htdocs folder of MAMP? If that's the case, that would be very handy.
After your message, I decided to give MAMP pro another go, and I've got myself into a bit of a pickle!!!
I created a host (the-globe) and selected the folder I wished to use. In my case Users/Grant/Sites/120-globe-library-website/Public/. This is where I originally wanted my Perch install as this is where my Sass renders to. Hence if I wish to make some style changes, this is nice and easy.
In MAMP pro, I select the arrow next to the Name: ie the-globe. This launches https://the-globe:8888. However, the page is blank? I checked the .htaccess is moved, which it is.
Any ideas?
Hi Grant
MAMP PRO is great for local dev but there's so many things that could be wrong. A blank page normally means there's a php error.
I would recommend you check these MAMP things first before you jump into Perch Runway:
I would also recommend but not prescribe:
Hope this helps,
Jon
Hi @Jon,
Thanks for the advise it's really helpful. I decided to start again, as I haven't done a huge amount with Perch currently.
Following you're very good advise, I have changed port numbers and localhost is running, checked and double checked.
I've created a host, dev.theglobelibrarystokesley.org. However, on logging in, get the error: Sorry, your license key isn't valid for this domain. This license key is for local testing only, so can only be used on a non-public domain.
So it is seeing dev.theglobelibrarystokesley.org as public domain?
You're welcome. You need to enter the local url into your Perch account license screen on the Perch site. It must match whatever you are using locally (and on production and/or staging).
Yes, that's a public domain.