Configuring Apache Webserver in High Sierra

Hi -- I attempted to set up the local host by following the instructions on this website.


https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps


I have to add that I'm not exactly au fait with Terminal, but I got as far as point 11 here:



But instead of the "Hello From Sites Folder!" message and the PHP7 window above, I received the unwelcome message:


Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting identifier (T_STRING) in /Users/my username /Sites/index.php on line 9


Of course, I've no idea what this means or how to proceed. Any help appreciated. Thanks.



Posted on Mar 11, 2023 1:38 PM

Reply

Similar questions

6 replies

Mar 12, 2023 3:02 PM in response to BobTheFisherman

Thanks Bob. Yes, there is file named index.php at the location indicated in the error message. The index.php file

contains the lines:


<?php

echo “Hello From Sites Folder!”;

phpinfo();

?>


When I rename the index.php file at the location and create a new index.html file I get:


{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf610 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \paperw11900\paperh16840\margl1440\margr1440\vieww13340\viewh9400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\fs28 \cf0 }


Thanks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Configuring Apache Webserver in High Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.