Fresh Install - Site is offline

Mautic 4.1.2 (i think… whatever is provided rn when using git clone GitHub - mautic/mautic: Mautic: Open Source Marketing Automation Software.)

My PHP version is: 7.4 (I have AMPPS running 7.1 too, unsure which is actually being used by Mautic and i have no idea how to tell)
My MySQL version is: 5.6.37
Apache: 2.4.27
OS: CentOS 7 with AMPPS for Linux (legacy version)

I am : Installing
Installing via: Command Line

These errors are showing in the installer : N/a - the installer does not even start.

These errors are showing in the Mautic log : N/a - no logs are created or exist

My problem is : I deployed the Mautic files and pre-requisites using this guide https://kb.mautic.org/knowledgebase/installation/how-to-install-mautic-on-a-localhost

I did everything in the guide and got as far as trying to launch http://localhost/mautic. I was originally presented with a 403 Forbidden error (You don’t have permission to access /mautic/index.php on this server.). The has now been changed, see ‘Steps I have tried…’ section below

Steps I have tried to fix the problem : I edited .htaccess in 2 ways, both with the same result:

  1. commented out:
    <FilesMatch “.php$”>
    Require all denied

  2. Changed the same parameters:
    <FilesMatch “.php$”>
    Require all granted

The result is a ‘Site is offline’ error, The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

I have also tried to apply permissions to the /usr/local/ampps/www/mautic directory with chmod but being a relative noob with Linux i think i’m doing it wrong. I usually get an error message about syntax (where i think i’m missing the 3-digit value) or i get ‘unknown user’ when trying to use ‘apache’ as the username to which i want to give the permissions

I have checked the apache logs which do detail errors but i’m not getting much out of the traditional ‘Googling’ approach. I’ll put the log results in a separate comment on this thread.

Help please, i’ve been round in circles with this in both CentOS and Windows, always the same result!!!

Apache logs (this is when i am getting the Site is offline error):

[Fri Apr 29 13:35:24.896451 2022] [php7:notice] [pid 17560] [client 127.0.0.1:49840] ParseError: syntax error, unexpected ‘string’ (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) - in file /usr/local/ampps/www/mautic/app/bundles/CoreBundle/Release/Metadata.php - at line 7

Hi,

After git clone try:

git fetch origin 4.x --tags
git checkout 4.2.2

@mzagmajster

I’m not sure i understand what relevance this has (i’m new to git).

I have already downloaded mautic to the local location. Are you suggesting i run the same download (git clone) command and then run the commands you have provided?

Can you explain how or why this would resolve my issue with getting mautic to actually run??

EDIT: running the commands you have suggested after cloning the mautic files from github just outputs this error:

[root@localhost www]# git fetch origin 4.x --tags
fatal: Not a git repository (or any of the parent directories): .git
[root@localhost www]# git checkout 4.2.2
fatal: Not a git repository (or any of the parent directories): .git
[root@localhost www]#

as before, i don’t really understand the relevance of your suggestion against the issue i am having trying to load mautic

You have to go into the folder you have cloned.

This actually detaches the HEAD of git to Mautic version 4.2.2. Its to ensure that files on the filesystem will actually be that of Mautic release 4.2.2

so i retried your commands from the mautic folder and it worked to get the tags and cleaned the cache…

but my site is still saying it’s offline

i’m now going to try and fresh install all over again, this time i will run thre git commands as a standard user and not while sudo. i was wondering if i’vre inadvertently made the folder and contents root permission only and it’s not refusing to run when a standard user loads it

Its always good to reset to correct permissions after you are done wit git (or any other administration) task.

You can check logs in var/logs for details on the error, maybe it will give you some clues as to what is actually wrong.