# PHP script timed out before returning headers

> Directadmin throws an error: suPHP error script timed out before returning headers

- Canonical URL: <https://carlossura.com/blog/script-timed-out-before-returning-headers/>
- Author: Carlos Sura
- Published: 2022-09-17
- Tags: apache, linux, php, directadmin, suphp

I was working with **DirectAdmin** and this time it was set to use **suPHP** (for some weird reason). Anyway, when trying to run a PHP script from the Drupal site, it returned an error: **"Script timed out before returning header"**.

Looks like **suPHP** ignores **php.ini**, so I needed to increase the timeout in Apache configuration, with the following steps:

```
vim /etc/httpd/conf/extra/httpd-default.conf
```

Now, update the following line:

```
Timeout 60
```

To your own value:

```
Timeout 300
```

Don't forget to restart apache:

```
systemctl restart httpd
```
