# Error 500 Mautic 3.0.2 clean installation

**URL:** <https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [August 7, 2020, 11:15pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560 "2020-08-07T23:15:56Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 7, 2020, 11:15pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/1 "2020-08-07T23:15:56Z")

</div>

**Your software**  
My Mautic version is: 3.0.2  
My PHP version is: 7.2.32  
MariaDB 10.4.13-MariaDB  
PHP version: 7.2.32  
Apache version: Apache/2.4.39  
Distro Name: CentOS Linux release 7.8.2003 (Core)  
Kernel Version: 3.10.0-1127.18.2.el7.x86\_64  
**Your problem**  
My problem is:  
I am trying to perform a clean installation of Mautic 3.0.2

But, I still get the error below when trying to process /step/1.1

[https://www.tismail.com.br/installer/step/1.1](https://www.tismail.com.br/installer/step/1.1)

```
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@tismail.com.br to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

```

Does anyone know how to solve this?

**These errors are showing in the log:**  
`Script timed out before returning headers: index.php, referer: https://tismail.com.br/mem/installer/step/1`

Steps I have tried to fix the problem:  
I have already checked all folder permissions, PHP versions, MariaDB etc.

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 9, 2020, 6:53am UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/2 "2020-08-09T06:53:04Z")

</div>

For some weird reason, MariaDB 10.4 didn’t go well for me when I was trying to install mautic 3, could you try updating to 10.5 and retry.

Also, Error 500 can mean a hell lots of things, but this can generally be due to some misconfiguration on your server, make sure your server block is properly configured e.g your apache config.

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 9, 2020, 4:57pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/3 "2020-08-09T16:57:54Z")

</div>

> [@devsrealm](#):
>
> Also, Error 500 can mean a hell lots of things, but this can generally be due to some misconfiguration on your server, make sure your server block is properly configured e.g your apache config.

Hi @devsrealm,

Thank you for the informations.

The switch to MariaDB 10.4 was already an attempt to resolve, but it didn’t work. I will try 10.5 as informed.

Regarding Apache, I’ve done several revisions and nothing has resolved. Do you have any special tips on what to configure?

In fact, I use NGINX as well.

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 9, 2020, 5:34pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/4 "2020-08-09T17:34:20Z")

</div>

Unfortunately, after installation for MariaDB 10.5.4 the problem of error 500 remains the same. ☹

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 9, 2020, 5:40pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/5 "2020-08-09T17:40:01Z")

</div>

Should we try it with Nginx? I am very certain it would work using nginx as I have done a lots of installation with mautic 3 using nginx.

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 10, 2020, 1:06pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/6 "2020-08-10T13:06:00Z")

</div>

Yes, I am trying with Nginx but it is not working.

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 10, 2020, 1:16pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/7 "2020-08-10T13:16:57Z")

</div>

Do you mind sharing what you’ve tried, and the error you got?

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 10, 2020, 7:03pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/8 "2020-08-10T19:03:29Z")

</div>

Hi @devsrealm,

I made 3 MariaDB version changes, now I have the version: 10.5.4  
I updated the PHP version to: 7.2.32

**The only error I get is this:**

```
[Sun Aug 09 14:31:12.130171 2020] [core:error] [pid 1389:tid 140268422539008] [client 192.168.1.51:53020] Script timed out before returning headers: index.php, referer: https://www.tismail.com.br/installer/step/1
[Sun Aug 09 15:20:02.281552 2020] [core:error] [pid 1421:tid 140268422539008] [client 192.168.1.51:53208] Script timed out before returning headers: index.php, referer: https://www.tismail.com.br/installer/step/1
[Sun Aug 09 15:30:01.125826 2020] [core:error] [pid 1388:tid 140268447717120] [client 192.168.1.51:53240] Script timed out before returning headers: index.php, referer: https://www.tismail.com.br/installer/step/1
[Sun Aug 09 15:33:17.714073 2020] [core:error] [pid 1389:tid 140268372182784] [client 192.168.1.51:53242] Script timed out before returning headers: index.php, referer: https://www.tismail.com.br/installer/step/1
[Sun Aug 09 15:39:55.643899 2020] [core:error] [pid 1388:tid 140268439324416] [client 192.168.1.51:53248] Script timed out before returning headers: index.php, referer: https://www.tismail.com.br/installer/step/1

```

**This is Contents of File: `/etc/my.cnf`**

```
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d

# The following options will be passed to all MySQL clients
[client]
port = 3306

# The MySQL server
[mysqld]
port = 3306
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 2M
sort_buffer_size = 2048K
net_buffer_length = 16K
myisam_sort_buffer_size = 8M
log_error = /var/lib/mysql/tismail.com.br.err

# Don't listen on a TCP/IP port at all.
skip-networking

# required unique id between 1 and 2^32 - 1
server-id = 1

# Uncomment the following if you are using BDB tables
bdb_cache_size = 4M
bdb_max_lock = 10000

# InnoDB tables are now used by default
# innodb_data_home_dir = /srv/mysql
# innodb_log_group_home_dir = /srv/mysql
# All the innodb_xxx values below are the default ones:
# innodb_data_file_path = ibdata1:12M:autoextend
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 128M
innodb_log_file_size = 48M
innodb_log_buffer_size = 16M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

# End /etc/mysql/my.cnf
```

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 10, 2020, 10:37pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/9 "2020-08-10T22:37:48Z")

</div>

Your script is taking too long to execute and thus timed out. change your max execution time, find your php.ini, find the following, and change the values as follows:

```auto
memory_limit = 512M  
max_execution_time = 360 

```

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 11, 2020, 3:32pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/10 "2020-08-11T15:32:34Z")

</div>

> [@devsrealm](#):
>
> `max_execution_time`

Hi @devsrealm,

I made the informed adjustments and restart the Apache Web Server.  
I tried to install again and it didn’t work.

Any other tips?

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/faf050adecb3ab83b39ac640954444e658862708.png)

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 11, 2020, 4:53pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/11 "2020-08-11T16:53:08Z")

</div>

There are lots of stuff that might be affecting the installation behind the scene, without seeing what you’ve done right from the one set, it would be difficult to say what the underlying issue is.

Before we go further, could you list all your installed PHP module, use the following command to do that:

> yum list installed | grep -i php

Copy the output, and paste it here.

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 11, 2020, 5:24pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/12 "2020-08-11T17:24:22Z")

</div>

> [@devsrealm](#):
>
> yum list installed | grep -i php

Hi @devsrealm,

Thanks for you support.

Please check the log.

```
[root@mail ~]# yum list installed | grep -i php
cwp-suphp.x86_64 0.7.2-3 @cwp      
cwpphp.x86_64 7.2.30-3 @cwp      
[root@mail ~]#

```

---

<div class="post-metadata">

**Author:** ![adilson.costa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adilson.costa/32/3061_2.png) [@adilson.costa](https://forum.mautic.org/u/adilson.costa)\
**Post date:** [August 14, 2020, 4:36pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/13 "2020-08-14T16:36:04Z")

</div>

I **finally** managed to install Mautic !!!

Here is information about the problem I had in my environment to help the community.

Basically being able to discover that the problem was in the process of creating the Mautic tables. To reach this understanding, I ran the following command from the Mautic console on the command line:

`$> php bin/console mautic:install:data`

This command recreates all the Mautic tables, to my surprise, this process took more than 40 minutes to complete. That’s when I started to analyze the MariaDB settings and arrived at this configuration in the `/etc/my.cnf` file

```
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d

[mysqld]
query_cache_size = 64M
tmp_table_size = 64M 
max_heap_table_size = 64M 
performance_schema=ON
performance-schema-instrument='stage/%=ON'
performance-schema-consumer-events-stages-current=ON
performance-schema-consumer-events-stages-history=ON
performance-schema-consumer-events-stages-history-long=ON

skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 16K
myisam_sort_buffer_size = 8M

thread_cache_size = 16

slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
long_query_time = 1 

wait_timeout = 60 

# Don't listen on a TCP/IP port at all.
skip-networking
skip-name-resolve

# required unique id between 1 and 2^32 - 1
server-id = 1

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# InnoDB tables are now used by default
# innodb_data_home_dir = /srv/mysql
# innodb_log_group_home_dir = /srv/mysql
# All the innodb_xxx values below are the default ones:
innodb_data_file_path = ibdata1:12M:autoextend
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 2G
innodb_log_file_size = 48M
innodb_log_buffer_size = 16M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

innodb_file_per_table = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

```

As the script’s execution time is very long, the page falls due to time out and we received the famous error 500.

After all the settings, I started the installation process via the browser again.

If after all these configurations, you still return error 500 (you will be `YOURDOMAIN.COM/installer/step/1.1`), **you must wait for the process of creating the tables to finish** (check the processes running on MySQL) when finish, simply change to `YOURDOMAIN.COM/installer/step/1.2`, so the installation process will continue.

**Summing up:**

If error 500 occurs in step 1.1:  
`YOURDOMAIN.COM/installer/step/1.1`

After creating the tables, change to step 1.2:  
`YOURDOMAIN.COM/installer/step/1.2`

And finish the installation.

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [August 18, 2020, 10:10pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/14 "2020-08-18T22:10:35Z")

</div>

You can mark it as solved!

---

<div class="post-metadata">

**Author:** ![gary.harrison](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gary.harrison/32/2864_2.png) [@gary.harrison](https://forum.mautic.org/u/gary.harrison)\
**Post date:** [August 18, 2020, 10:23pm UTC](https://forum.mautic.org/t/error-500-mautic-3-0-2-clean-installation/15560/15 "2020-08-18T22:23:03Z")

</div>

Thanks for taking the time to posting your solution to the community. I’m sure your post will help others in the future!!!
