Skip to content

Commit 4f5eaf1

Browse files
committed
update README to reflect some changes
1 parent e53af0f commit 4f5eaf1

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

README.markdown

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,36 @@ Installation
5353

5454
* Install your favourite mix of PHP and web server
5555
* Install MySQL server
56-
* Clone the project to some folder
56+
* Clone the project to some folder of your choice.
57+
* Alternatively, for composer fans: add a repository m in the repositories section of your composer.json:
58+
<pre>
59+
{
60+
"type": "git",
61+
"url": "https://github.com/path-to-this-repo.git"
62+
}
63+
</pre>
64+
And then add the requirement `"xhprof/xhgui": "dev-master"` to your composer.json, then `composer update`.
5765
* Map the sub folder `xhprof_html` to be accessible over HTTP
58-
* Move `xhprof_lib/config.sample.php` to `xhprof_lib/config.php`
66+
* 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.
67+
* Copy `xhprof_lib/config.sample.php` to `xhprof_lib/config.php`
68+
* 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)
5969
* Edit `xhprof_lib/config.php`
60-
* Update the SQL server configuration
61-
* Update the URL of the service (should point to `xhprof_html` over HTTP)
62-
* Update the `dot_binary` configuration - otherwise no call graphs!
63-
* Update the `controlIPs` variable to enable access.
70+
* Update the SQL server configuration
71+
* Update the URL of the service (should point to `xhprof_html` over HTTP)
72+
* Update the `dot_binary` configuration - otherwise no call graphs!
73+
* Update the `controlIPs` variable to enable access.
6474
* For a development machine you can set this to `false` to disable IP checks.
6575
* Import the DB schema (it is just 1 table)
6676
* See the SQL at [xhprof_runs.php](https://github.com/toomasr/xhprof/blob/master/xhprof_lib/utils/xhprof_runs.php#L109)
6777
* Add a PHP configuration to enable the profiling
68-
* If using Apache you can edit your virtual host configuration
69-
* Add `php_admin_value auto_prepend_file "/path/to/xhprof/external/header.php"`
78+
* If using Apache you can edit your virtual host configuration
79+
* Add `php_admin_value auto_prepend_file "/path/to/xhprof/external/header.php"`
80+
* (optional) Add `SetEnv ENV_XHPROF_CONFIG /absolute/path/to/config.php` to your apache config to set location of config file for that host
81+
* (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');
82+
* (optional) Within a shell script, you can export `XHPROF_CONFIG=/absolute/path/to/config.php` to specify location of config file
7083
* Visit http://your-server/xhprof/xhprof_html/ and be amazed!
71-
* To get profiler information showing up there visit your page with a `GET` variable `_profile=1`.
84+
* To get profiler information showing up there visit your page with a `GET` variable `_profile=1`.
85+
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)
7286
* For example `http://localhost/?_profile=1`
7387

7488
We Are Working On

0 commit comments

Comments
 (0)