Forum
Problems getting started with Perch using MAMP
Hi
I've setup MAMP locally and both the Apache and MySQL servers have green lights so I presume everything there is ok.
I've added the perch runtime to a php page (with the correct file path), and added a basic page function to it, but when I try to view the webpage in a browser I only get the Source Code detailing the two php functions. So I can't get the backend to display / connect with the webpages.
Your setup instructions highlight this as something not working but don't offer any solutions, can you help?
Many thanks
Ben
Health check
PHP 7.1.8 is up to date MySQL 5.6.35 is up to date Image processing available Summary information
Perch: 3.0.10, PHP: 7.1.8, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, 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_blog' ]; PERCH_LOGINPATH: /tele_tracks_test/perch PERCH_PATH: /Applications/MAMP/htdocs/tele_tracks_test/perch PERCH_CORE: /Applications/MAMP/htdocs/tele_tracks_test/perch/core PERCH_RESFILEPATH: /Applications/MAMP/htdocs/tele_tracks_test/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:8888 DOCUMENT_ROOT: /Applications/MAMP/htdocs REQUEST_URI: /tele_tracks_test/perch/core/settings/diagnostics/ SCRIPT_NAME: /tele_tracks_test/perch/core/settings/diagnostics/index.php
Can you describe exactly what you're seeing? I don't fully understand this:
Hi Drew
Thanks for your help Here's What I get in the browser window:
I'd like to attach screenshot - but don't seem able to do it.
Not sure if I've set up the database in phpMyAdmin - if that helps
Many thanks
Ben
Does your file have a
.php
file extension?Hi Drew,
Yes, it's a .php page...
All I get is a white page with the source code rather than the webpage.
My suspicion is that I haven't set up the database correctly. MAMP gives me a green light for the MySQL and Apache servers.
Many thanks for your help
Ben, do me a favor and in the template you have posted replace this
<?php include('../perch/runtime.php'); ?>
with this<?php phpinfo(); ?>
Lets first establish if you have php working... What do you get?
Hi Drew
I'm currently reconfiguring the database settings in phpMyAdmin - I think this is the issue.
Many thanks
Ben, Maybe this is beginners luck.... but last week I decided to make the jump to MAMP PRO on my dev machine...
It literally took less then 5 minutes to install, map to my project's directory and it was up and running perfectly out of the box. I didn't have to make a single edit or config in any of the dozens of sites I have on DEV, nor did I have to make changes within MAMP.
So that being said... I don't see why you would need to fiddle with settings, config or otherwise to have this going. It should just work.
Maybe the free version of MAMP is different, but the $59 for pro (plus 14 days free to try) is far cheaper than spending a day fighting the free version.
Did you try my example above?
Hi Robert
thanks for your response - I get the same outcome with <?php phpinfo(); ?>
I've just found some phpMyAdmin instructions on wordpress.org, I hadn't set up the database correctly... just testing now
OK, Still the
<?php ?>
tags should not be passing through without being parsed.... but this could be something to do with how WP handles template parsing and such. I do not use or understand WP, except to say isn't it also a CMS? If so, why would one use (2) CMS's to handle the same content?... Please understand I am just asking questions, not passing judgement on anyone... I just like to understand whats up... :)Hi Robert
I'm not using Wordpress, I'm using Perch on a local server with MAMP, only I can't find any decent database setup instructions with MAMP, so I searched Google and found the Wordpress site which was good.
I've got it working now thanks