Skip to content

Commit

Permalink
update README to reflect some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezio committed Apr 20, 2018
1 parent 66640ac commit fd7bbcf
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,36 @@ Installation

* Install your favourite mix of PHP and web server
* Install MySQL server
* Clone the project to some folder
* Clone the project to some folder of your choice.
* Alternatively, for composer fans: add a repository m in the repositories section of your composer.json:
<pre>
{
"type": "git",
"url": "https://github.com/path-to-this-repo.git"
}
</pre>
And then add the requirement `"xhprof/xhgui": "dev-master"` to your composer.json, then `composer update`.
* Map the sub folder `xhprof_html` to be accessible over HTTP
* Move `xhprof_lib/config.sample.php` to `xhprof_lib/config.php`
* You can do it with an Alias directive or (if symlinks are enabled) by just symlinking `xhprof_html` to any location within your document root.
* Copy `xhprof_lib/config.sample.php` to `xhprof_lib/config.php`
* Alternatively, you can copy the config.php to any place you like, and then specify the location of the config file in your ENV, in a PHP constant, or via Apache / Nginx Env variable (see below)
* Edit `xhprof_lib/config.php`
* Update the SQL server configuration
* Update the URL of the service (should point to `xhprof_html` over HTTP)
* Update the `dot_binary` configuration - otherwise no call graphs!
* Update the `controlIPs` variable to enable access.
* Update the SQL server configuration
* Update the URL of the service (should point to `xhprof_html` over HTTP)
* Update the `dot_binary` configuration - otherwise no call graphs!
* Update the `controlIPs` variable to enable access.
* For a development machine you can set this to `false` to disable IP checks.
* Import the DB schema (it is just 1 table)
* See the SQL at [xhprof_runs.php](https://github.com/toomasr/xhprof/blob/master/xhprof_lib/utils/xhprof_runs.php#L109)
* Add a PHP configuration to enable the profiling
* If using Apache you can edit your virtual host configuration
* Add `php_admin_value auto_prepend_file "/path/to/xhprof/external/header.php"`
* If using Apache you can edit your virtual host configuration
* Add `php_admin_value auto_prepend_file "/path/to/xhprof/external/header.php"`
* (optional) Add `SetEnv ENV_XHPROF_CONFIG /absolute/path/to/config.php` to your apache config to set location of config file for that host
* (optional) If you include the header.php manually, you can define the location of the config file via define('XHPROF_CONFIG','/absolute/path/to/config.php');
* (optional) Within a shell script, you can export `XHPROF_CONFIG=/absolute/path/to/config.php` to specify location of config file
* Visit http://your-server/xhprof/xhprof_html/ and be amazed!
* To get profiler information showing up there visit your page with a `GET` variable `_profile=1`.
* To get profiler information showing up there visit your page with a `GET` variable `_profile=1`.
This will enable it (via cookie) until you disable it by adding the parameter `_profile=0` to any url (or removing the _profile cookie manually)
* For example `http://localhost/?_profile=1`

We Are Working On
Expand Down

0 comments on commit fd7bbcf

Please sign in to comment.