# Current problems

***

### I'm getting an error message saying **`you don't have the rights to connect to this application`**?

Several parameters can be linked to this message.

* ***No profile associated with the user***: make sure that each user who logs in has a profile. If this is not the case, your profile [authorisation rule](https://glpi-plugins.readthedocs.io/en/latest/oauthsso/rules.html) may be incorrect or missing.
* ***Temporary SQL queries***: SQL queries can saturate the temporary folder if they are too voluminous. The method is to automatically kill certain queries that take too long (thus avoiding excessive temporary storage). Please refer to the command [**`pt-kill`**](https://docs.percona.com/percona-toolkit/pt-kill.html)

  *Example of command* (to kill all "SELECT" requests that last longer than 61s)" `perl /usr/bin/pt-kill --busy-time 61 --match-info "SELECT|select" --kill --victims all --daemonize`
* ***Problem of rights on GLPI folders***: make sure that the owner of the GLPI folders is the user of your Web server (apache, www-data, etc.) and that the permissions are correctly set:

<pre class="language-{"><code class="lang-{"># find <a data-footnote-ref href="#user-content-fn-1">/var/www/glpi</a> -type f -exec chmod 644 {} +
# find <a data-footnote-ref href="#user-content-fn-1">/var/www/glpi</a> -type d -exec chmod 755 {} +
# chown <a data-footnote-ref href="#user-content-fn-1">www-data.</a> <a data-footnote-ref href="#user-content-fn-1">/var/www/glpi</a> -R
</code></pre>

***

### What can I do about the message telling me that the timezones are not accessible?

If the timezones are not activated, you will not be able to select the country you are in. Follow the [official documentation](https://glpi-install.readthedocs.io/en/latest/timezones.html) to activate your timezones.

{% hint style="danger" %}
**This operation may affect all your other databases. Check the impact before making any changes.**
{% endhint %}

***

### Why do I get the error message **`A link to the SQL server could not be established. Please check your configuration`** ?

This may be due to several parameters:

* Check that the mysql service is started and (re)start it if necessary
* Check the presence of your database and the rights granted to the user of this database
* Check that the GLPI configuration file is present and has sufficient permissions
* Check the logs **`sql-errors.log`** in the **`files`** folder

***

### Why do I get an error message **`SSL certificate problem: unable to get local issuer certificate`** when I try to activate my subscription key in marketpalce?

This problem comes, usually on Windows, from a missing configuration. PHP has not been configured to integrate the CA certificate shop and therefore cannot check the chain of our certificate when it tries to connect to it.

To remedy this problem :

* Download and extract **`cacert.pem`** following the instructions at <https://curl.se/docs/caextract.html>
* Save it on your server in a location readable by the Web server user
* In your php.ini, put the location of the **`cacert.pem`** file in the \[curl] and \[openssl] section

```yaml
[curl]
curl.cainfo = "C:\mywebsite\php\extras\ssl\cacert.pem"

[openssl]
openssl.cafile = "C:\mywebsite\php\extras\ssl\cacert.pem"
```

* Restart your web server and your PHP FPM server if necessary

***

### How do I configure Redis to manage sessions in GLPI?

* **`session.save_handler`** must be set to redis in php.ini.
* **`session.save_path`** must contain a valid configuration such as :

  `tcp://127.0.0.1:6379?persistent=1&timeout=2.5&read_timeout=2.5&retry_interval=30`

***

### What should I do if sessions fail with Redis?

* Check that Redis is configured on the correct port (default 6379).
* Increase the timeout to stabilise the connection.
* Enable session locking in 20-redis.ini :

```
extension=redis.so
redis.session.locking_enabled = 1
redis.session.lock_expire = 60
redis.session.lock_wait_time = 50000
redis.session.lock_retries = 2000
```

***

### What should I do if GLPI has problems with menus or tokens in a shared front-end environment?

* Make sure that the **`files/`** folder is shared between all the front-ends (in the case of a multi-server installation),
* Check the permissions of the shared folder.
* Check the logs

***

### Why do I get an SQL error ‘Out of range value for column “computertypes\_id”’ in the GLPI logs?

This error is often caused by an incorrect or incomplete rule that modifies the computer types in GLPI, resulting in an attempt to write an invalid value (for example, **`-1`**) to the computertypes\_id column in the database.

***

### What can be done to avoid `/tmp` filling up because of SQL queries?

* **Optimise SQL queries**: Examine the default views and searches in GLPI and encourage users not to add too many columns to their queries.
* **Redirect tmp\_dir in MySQL**: Configure the MySQL tmp\_dir directory outside the `/tmp` partition to avoid impact on the system. More information in the [official documentation](https://glpi-install.readthedocs.io/fr/latest/install/index.html)

***

### How can you identify the users responsible for large queries in GLPI?

It is difficult to identify users directly on the basis of the queries that fill `/tmp`, as users can add an unlimited number of columns to their searches, thus generating large SQL queries.

***

### Why is the /tmp folder filling up abnormally?

The problem comes from MySQL. When queries are too long, it needs to write to temporary tables (<https://dev.mysql.com/doc/refman/8.0/en/internal-temporary-tables.html>), and by default this happens in the server's /tmp directory.

* Examine users who have too many columns in their default views or who add too many columns to their searches (e.g. juan.meneses), as this generates very large queries on the MySQL server, which doesn't seem to be large enough to handle them properly.
* Configure MySQL's tmp\_dir outside the /tmp file system (in a different folder from the one used by the system itself).
* Implement an automated system (such as the Percona pt-kill toolbox <https://docs.percona.com/percona-toolkit/pt-kill.html>) to automatically kill SELECT queries on MySQL that last longer than X seconds, thus preventing disk space from being saturated by overly large queries.

[^1]: :man\_raising\_hand: *depending on your configuration*
