Mautic Community Forums

Installation on Linux not running

Hi there,



I’m installing Mautic onto CentOS 6.5 server with XAMPP as the platform. I’ve copied over the latest ZIP from GitHub, installed Composer, ran the “composer install” command and when I navigate to the root in a browser, I get the following error thrown from the catch block in index.php:



“The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

System administrators, check server logs for errors.”



I’ve done the same steps that I did on my Windows 7 box which worked first time with no problems. My guess is at this point, it’s down to file permissions (as that’s what always catches me out with Linux) as I don’t actually see any error logs created anywhere.



The mautic directory has the following permissions:

Code:
drwxr-xr-x 11 root root 4096 Jan 16 15:35 mautic

And the permissions inside that directory are:
Code:
drwxr-xr-x 2 root root 4096 Jan 14 21:29 addons drwxr-xr-x 7 root root 4096 Jan 14 21:34 app drwxr-xr-x 2 root root 4096 Jan 14 21:34 bin drwxr-xr-x 3 root root 4096 Jan 14 21:29 build -rw-r--r-- 1 root root 3603 Jan 14 21:29 composer.json -rw-r--r-- 1 root root 220334 Jan 14 21:29 composer.lock -rw-r--r-- 1 root root 3922 Jan 14 21:29 CONTRIBUTING.md -rw-r--r-- 1 root root 12862 Jan 14 21:29 favicon.ico -rw-r--r-- 1 root root 1695 Jan 14 21:29 Gruntfile.js -rw-r--r-- 1 root root 2343 Jan 14 21:29 index_dev.php -rw-r--r-- 1 root root 2618 Jan 16 15:35 index.php -rw-r--r-- 1 root root 38457 Jan 14 21:29 LICENSE.txt drwxr-xr-x 7 root root 4096 Jan 14 21:29 media -rw-r--r-- 1 root root 1767 Jan 14 21:29 offline.php -rw-r--r-- 1 root root 394 Jan 14 21:29 package.json drwxr-xr-x 6 root root 4096 Jan 14 21:29 plugins -rw-r--r-- 1 root root 15061 Jan 14 21:29 README.md -rw-r--r-- 1 root root 149 Jan 14 21:29 robots.txt drwxr-xr-x 5 root root 4096 Jan 14 21:29 themes drwxr-xr-x 2 root root 4096 Jan 14 21:29 translations -rw-r--r-- 1 root root 29610 Jan 14 21:29 upgrade.php drwxr-xr-x 36 root root 4096 Jan 14 21:34 vendor

If I add a quick
Code:
echo `whoami`;
in at the top of the index.php file, it tells me that it's being run by "daemon", which I assume is the XAMPP service?

All help greatly appreciated.

Hi there,

I’m installing Mautic onto CentOS 6.5 server with XAMPP as the platform. I’ve copied over the latest ZIP from GitHub, installed Composer, ran the “composer install” command and when I navigate to the root in a browser, I get the following error thrown from the catch block in index.php:

“The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.
System administrators, check server logs for errors.”

I’ve done the same steps that I did on my Windows 7 box which worked first time with no problems. My guess is at this point, it’s down to file permissions (as that’s what always catches me out with Linux) as I don’t actually see any error logs created anywhere.

The mautic directory has the following permissions:

drwxr-xr-x 11 root   root    4096 Jan 16 15:35 mautic

And the permissions inside that directory are:

drwxr-xr-x 2 root root 4096 Jan 14 21:29 addons drwxr-xr-x 7 root root 4096 Jan 14 21:34 app drwxr-xr-x 2 root root 4096 Jan 14 21:34 bin drwxr-xr-x 3 root root 4096 Jan 14 21:29 build -rw-r--r-- 1 root root 3603 Jan 14 21:29 composer.json -rw-r--r-- 1 root root 220334 Jan 14 21:29 composer.lock -rw-r--r-- 1 root root 3922 Jan 14 21:29 CONTRIBUTING.md -rw-r--r-- 1 root root 12862 Jan 14 21:29 favicon.ico -rw-r--r-- 1 root root 1695 Jan 14 21:29 Gruntfile.js -rw-r--r-- 1 root root 2343 Jan 14 21:29 index_dev.php -rw-r--r-- 1 root root 2618 Jan 16 15:35 index.php -rw-r--r-- 1 root root 38457 Jan 14 21:29 LICENSE.txt drwxr-xr-x 7 root root 4096 Jan 14 21:29 media -rw-r--r-- 1 root root 1767 Jan 14 21:29 offline.php -rw-r--r-- 1 root root 394 Jan 14 21:29 package.json drwxr-xr-x 6 root root 4096 Jan 14 21:29 plugins -rw-r--r-- 1 root root 15061 Jan 14 21:29 README.md -rw-r--r-- 1 root root 149 Jan 14 21:29 robots.txt drwxr-xr-x 5 root root 4096 Jan 14 21:29 themes drwxr-xr-x 2 root root 4096 Jan 14 21:29 translations -rw-r--r-- 1 root root 29610 Jan 14 21:29 upgrade.php drwxr-xr-x 36 root root 4096 Jan 14 21:34 vendor

If I add a quick echo `whoami`; in at the top of the index.php file, it tells me that it’s being run by “daemon”, which I assume is the XAMPP service?

All help greatly appreciated.

@cocovan You checked your apache error log file?

Someone asked the same question in the Slack chat a moment ago. Mautic needs the same permission as any other PHP app:

http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress

Thanks both for your help. Checking the error logs shows it was a permissions thing and then the SO link eventually led me here which sorted me out (similar fix):

http://stackoverflow.com/questions/5165183/apache-permissions-php-file-create-mkdir-fail