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

Docker install: how do I get the vendor/autoload.php and vendor/perftools/xhgui-collector/external/header.php files? #276

Closed
therealgilles opened this issue Sep 13, 2019 · 10 comments

Comments

@therealgilles
Copy link

I am trying to use xhgui with tideways on mac os x 10.15. I used the docker instructions and the webserver came up. But I am not sure how to get access to the vendor files necessary to enable profiling with my php app.

Thank you for any guidance.

@therealgilles therealgilles changed the title Docker install: how do I get the vendor/autoload.php and vendor/perftools/xhgui-collector/external/header.php files Docker install: how do I get the vendor/autoload.php and vendor/perftools/xhgui-collector/external/header.php files? Sep 13, 2019
@therealgilles
Copy link
Author

I ran this to extract the files from docker:

docker cp <xhgui_app_container_id>:var/www/xhgui/vendor vendor

Is that the way to go?

@therealgilles
Copy link
Author

The 'wt' (wall time) parameter shows 0, so something must be amiss.

@markstory
Copy link
Member

You don't extract the header file. Instead you can use the xhgui-collector package in your application. The dockerfilenis more for hosting the gui.

@flip111
Copy link
Contributor

flip111 commented Apr 16, 2020

This happens because on startup you get to see

Looks like you haven't done any profiling

To get started with XHGUI you'll need to collect some profiling data.

The simplest way to get an application profiled, is to use external/header.php. This file is designed to be combined with PHP's auto_prepend_file directive. This can be enabled system-wide through php.ini. Alternatively, you can enable auto_prepend_file per virtual host. See the README.md file for more details.

Then you include the header.php file, but this one is from the "normal" non-dockerized source code. At the moment no method has been described in the readme how to get profile information into the docker container.

Instead you can use the xhgui-collector package in your application

I don't understand this comment. Even with using this package you still have the situation that your app is outside of the container, and xhgui + it's mongodb instance is inside the container. Possibly mongodb has a port open so you can put information inside it. But how? Including a header.php file sounded nice and easy ...

@glensc
Copy link
Contributor

glensc commented Apr 17, 2020

for saving samples, I recommend using the new package:

and yes, of course, it needs access to the same MongoDB instance, where GUI reads the data.

how you manage to do that depends very much on your setup.

If you have ideas for documentation update, PR's are most welcome :)

ps: you quote text, which is not from this issue (#276). it's confusing as hell as well.

@flip111
Copy link
Contributor

flip111 commented Apr 17, 2020

The main problem is getting data into the database, not to get it out.

ps: you quote text, which is not from this issue (#276). it's confusing as hell as well.

This issue is #276 maybe you are mixing up issues?

@glensc
Copy link
Contributor

glensc commented Jul 11, 2020

@flip111 What I tried to say, is that you quote text which origin is unclear:

Instead you can use the xhgui-collector package in your application

@glensc
Copy link
Contributor

glensc commented Jul 11, 2020

there's documentation update going on, you're welcome to review it: #293

@flip111
Copy link
Contributor

flip111 commented Jul 13, 2020

@flip111 What I tried to say, is that you quote text which origin is unclear:

Instead you can use the xhgui-collector package in your application

The origin is here #276 (comment)

@glensc
Copy link
Contributor

glensc commented Jul 14, 2020

docs merged, you should use the recommended library:

@glensc glensc closed this as completed Jul 14, 2020
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