# PHP APM Agent is not picking up the routes

**URL:** <https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080>\
**Category:** APM\
**Tags:** fleet, php, infrastructure-observability\
**Created:** [January 30, 2024, 11:21am UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080 "2024-01-30T11:21:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_mehdi/32/121862_2.png) [@Ali\_Mehdi](https://discuss.elastic.co/u/Ali_Mehdi)\
**Post date:** [January 30, 2024, 11:21am UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/1 "2024-01-30T11:21:04Z")

</div>

**Kibana version** : 8.11

**Elasticsearch version** :8.11

**APM Server version** :fleet managed apm 8.11

**APM Agent language and version** :apm-agent-php v1.12.0

**Browser version** : Version 121.0.6167.85

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: Ubuntu22.04

**Fresh install or upgraded from other version?** Fresh Install

I am using fleet server for the deployment. APM Server in the same sever.

I have two php apps first is contain of the php-v7.4 and second is contain of the php-v8.2

In php-v7.4 i have dashboard in which each detail of the route called.

 ![Screenshot 2024-01-30 at 3.14.25 PM](https://us1.discourse-cdn.com/elastic/original/3X/7/5/75804b72c53706c1fd2ea8226b9c36e04642f992.png)

In php-v8.5 i have dashboard in which i details of the cli is given not the requests.

All these installations are default ?  
HOW TO SOLVE THIS ISSUE?

---

<div class="post-metadata">

**Author:** ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)\
**Post date:** [January 30, 2024, 12:39pm UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/2 "2024-01-30T12:39:56Z")

</div>

Hello, welcome to the community!

Have you followed the [guide](https://www.elastic.co/guide/en/apm/agent/php/current/configuration.html) to setup the APM agent?

I don't really understand what is the issue, are you trying to send traces from the second app that don't show up on the UI?

---

<div class="post-metadata">

**Author:** ![Ali\_Mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_mehdi/32/121862_2.png) [@Ali\_Mehdi](https://discuss.elastic.co/u/Ali_Mehdi)\
**Post date:** [January 30, 2024, 1:10pm UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/3 "2024-01-30T13:10:56Z")

</div>

In one app i can see routes information and in other i can not see the routes information.

After following the guide i have settled down the elastic then fleet then apm-server and now apm-agent

 ![Screenshot 2024-01-30 at 6.24.06 PM](https://us1.discourse-cdn.com/elastic/original/3X/5/2/52f8a05984e2329233799a9e01ac79678f5163fe.png)

From the above screenshot i am having the cli transactions but not the routes transaction details

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [January 30, 2024, 1:46pm UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/4 "2024-01-30T13:46:38Z")

</div>

Hi @Ali_Mehdi

Please take a look at [this section of Troubleshooting](https://www.elastic.co/guide/en/apm/agent/php/current/_agent_is_not_instrumenting_code.html#_open_basedir_issue)

Do you see the message mentioned there in the agent logs?

---

<div class="post-metadata">

**Author:** ![Ali\_Mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_mehdi/32/121862_2.png) [@Ali\_Mehdi](https://discuss.elastic.co/u/Ali_Mehdi)\
**Post date:** [January 30, 2024, 2:19pm UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/5 "2024-01-30T14:19:29Z")

</div>

HI @Sergey_Kleyman

I can see the diagnostics logs in the file, but i can not find any error in all the logs they are mostly giving me the information of the agent configuration and system informations.

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [January 30, 2024, 2:38pm UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/6 "2024-01-30T14:38:25Z")

</div>

> I can see the diagnostics logs in the file

I am not sure to which file you are referring - by default Elastic APM PHP Agent logs to syslog. Can you see log lines containing `[Elastic APM PHP Tracer]` in that log file?

In any case it's worth verifying if your issue is related to `open_basedir` PHP configuration option.  
Do you have `open_basedir` PHP configuration option set? It's best to get output of `phpinfo()` in the context of your application handling web requests.  
You can either follow steps in ["Collection of diagnostic information" section of the agent's online documentation](https://www.elastic.co/guide/en/apm/agent/php/current/_collection_of_diagnostic_information.html#_collection_of_diagnostic_information) or you can add call to `phpinfo()` to your application and capture its output.

Please note that executing `php -i` from the command line is much easier to get PHP configuration but PHP configuration used for command line might be different from the configuration used by PHP to handle web requests. That is why `php -i` is not suitable for this issue.

---

<div class="post-metadata">

**Author:** ![Ali\_Mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ali_mehdi/32/121862_2.png) [@Ali\_Mehdi](https://discuss.elastic.co/u/Ali_Mehdi)\
**Post date:** [January 31, 2024, 11:01am UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/7 "2024-01-31T11:01:56Z")

</div>

`service php8.2-fpm reload`

This was the solution to my error after reloading i can see all the routes details and queries details.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 28, 2024, 11:02am UTC](https://discuss.elastic.co/t/php-apm-agent-is-not-picking-up-the-routes/352080/8 "2024-02-28T11:02:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
