We are trying to get PHP7.0 data by One Agent for Appmon7.0.
Environment is CentOS7 + Apache2.4 + PHP7.0.
I could not collect PHP7.0 data after the step below.
1. I installed Classic Agent7.0 for Web-Server.
2. I added LoadModule in /etc/httpd/conf/httpd.conf.
3. I added extension in /etc/php.ini.
(I also tried adding extension in the ini file in /etc/php.d)
4. I rolled out Web-Server Agent to One Agent by Dynatrace Client7.0. https://www.dynatrace.com/support/doc/appmon/inst...
**I could collect PHP data by same step in CentOS6 + Apache2.4 + PHP5.3 environment.**
In /opt/dynatrace-7.0/log, there are no logs for PHP, there are just WebServer Agent(Apache) logs.
In /var/log/httpd/error_log, there are logs like below;
PHP Warning: PHP Startup: dtphpagent (bootstrap failed, see dtagent log for details): Unable to initialize module\nModule compiled with module API=0\nPHP compiled with module API=20151012\nThese options need to match\n in Unknown on line 0
What should I confirm to collect PHP7.0 data? Are there any other steps which I need to do?
Solved! Go to Solution.
I'd like to help you to find a solution to your problem.
I've been able to reproduce your problem with CentOS Linux release 7.3.1611 and the Software Collections (SCL) release of PHP 7.0 (link: https://www.softwarecollections.org/en/scls/rhscl...
My configuration also uses the Software Collections release of HTTPD 2.4 (link: https://www.softwarecollections.org/en/scls/rhscl...
You've mentioned that you've added the httpd module and php extension configurations with the <root>/etc/../.. directories. Note that in my case, the default SCL installation actually makes it's own root directory in /opt/rh/httpd24/root/ and /opt/rh/rh-php70/root/ and so I had to find my configurations files in etc/ directories at those paths instead. This is obviously environment dependent.
These are the specific versions of the software as configured:
[andy@localhost log]$ httpd -vServer version: Apache/2.4.25 (Red Hat)Server built: Apr 27 2017 12:17:04
[andy@localhost log]$ php -v
PHP Warning: PHP Startup: dtphpagent (bootstrap failed, see dtagent log for details): Unable to initialize module
Module compiled with module API=0 PHP compiled with module API=20151012 These options need to match in Unknown on line 0PHP 7.0.10 (cli) (built: Nov 3 2016 08:06:03) ( NTS )Copyright (c) 1997-2016 The PHP GroupZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies
I've tested this configuration with our latest AppMon 2017 May release and I was able to see the issue that you have reported. I need to go back to our labs to check why this is the case, as we should be supporting this flavor of PHP (Zend) according to our set up instructions located here: https://www.dynatrace.com/support/doc/appmon/inst...
Although I am not very familiar with the environment; my initial thoughts are that it has to do with the particular way in which the CentOS packages are set up for PHP 7, as they are not natively available through the core repositories and it may be these case that there are additional checks required to ensure the environment is configured correctly. Did you have any issue with the web server configuration? as I was still seeing some issues in my test instance without the agent loaded at all. Again forgive me, as I'm not very familiar with the particular set up for CentOS.
Hi @yuki s., PHP Agent dev here. 🙂
The reason for the behavior you describe is straightforward: PHP Classic Agent does not support PHP 7.0. For that you need to enable PHP OneAgent (the newer, more advanced technology). Please consult the release notes or contact me directly and I will provide you with detailed instructions.
Thank you for your kind reply, we would try another way to collect PHP7.0 data (not by Appmon7.0 one agent). I would answer the question you gave me.
> Did you have any issue with the web server configuration?
We could see Apache data form Appmon client, so I think there was no other issue with web server configuration.
I would like to close this question, thank you for your kindness.
If anyone else finds this question , there is a knowledgebase article concerning the mismatching API error: https://community.dynatrace.com/community/display/...
In short: either switch to 7.1 bootstrap agent or use some other agent to download liboneagentloader.so and use that one to include the agents.