Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant get APM to Log the stuff in PHP7.0 FPM #37

Open
ChrisWesterfield opened this issue Mar 17, 2016 · 3 comments
Open

cant get APM to Log the stuff in PHP7.0 FPM #37

ChrisWesterfield opened this issue Mar 17, 2016 · 3 comments

Comments

@ChrisWesterfield
Copy link

Hi
I would like to add APM to my applications
But somehow the database tables aren't created during the run of the scripts.
I have enabled the opcache of php7
I also have the tideways profiler installed.

heres my php-fpm pool config

[cp]
user = #########
group = ##########
listen = /home/####################/run/php.sock
listen.owner = ############
listen.group = ##############
listen.mode = 0660
pm = dynamic
pm.max_children = 30
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_spare_servers = 8
php_flag[display_errors] = off
php_admin_value[error_log] = /home/##########/logs/php5-fpm.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 512M
php_admin_value[opcache.file_cache] = "/home/############"
php_admin_value[apm.mysql_enabled]=1
php_admin_value[apm.mysql_error_reporting]=E_ALL|E_STRICT
php_admin_value[apm.mysql_host]=localhost
php_admin_value[apm.mysql_user]=###########
php_admin_value[apm.mysql_pass]=#######################
php_admin_value[apm.mysql_db]=##########
php_admin_value[apm.socket_path]=/home/##########/run/php-apm.sock
php_admin_value[apm.application_id]=#####################
php_admin_value[apm.socket_enabled]=0
php_admin_value[apm.sqlite_enabled]=0
php_admin_value[apm.statsd_enabled]=0
php_admin_value[apm.mysql_port]=3306

where is my mistake?

@patrickallaert
Copy link
Owner

Hi,

Can you try without tideways and/or xdebug if activated?

I notice that you defined apm.mysql_error_reporting to E_ALL|E_STRICT. That might be the issue. While configured within PHP (ini_set, php.ini,...), PHP knows what are the values of E_ALL (32767) and E_STRICT (2048) which means that E_ALL|E_STRICT = 32767 (in PHP 7). I am, however, not sure that your web server knows those values and is probably not computing that correctly and tries to pass the string "E_ALL|E_STRICT" which is then received by PHP as the integer value "0" which means => report nothing.

Do you see APM in a page with phpinfo() and does the configuration match your configuration file? You will be able to validate my possible theory looking at the apm.mysql_error_reporting value.

The tables are supposed to be created by APM, but the database should be created in advance. Does the DB user has access to table creation?

You can test this connecting to your DB with:

$ mysql -u<USER> -p<PASSWORD> <DATABASE>
> CREATE TABLE test ( `test` varchar(255) DEFAULT NULL  );
> DROP TABLE test;

Cheers.

@Lewiscowles1986
Copy link

So this extension works with PHP7 or no?

@jamesstout
Copy link

@Lewiscowles1986 yes it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants