Comments (10)
This is actually already implemented: https://github.com/puphpet/vagrant-puppet-lamp/blob/master/modules/php/manifests/custom/xhprof.pp
The only way to get xhprof working with php 5.4 is to compile it in. This does everything necessary... I've simply never actually used xhprof.
Once it's installed, what process should I follow to get it working?
from puphpet.
I prefer install xhprof over pecl, see e.g. http://queirozf.com/reminders/installing-xhprof-php-profiler-on-ubuntu
xhprof itself is just an profilling backend, so there is nothing more todo than install it over pecl and include/activate it via php.ini.
In case you also like to add a gui for it - which most people will probably need - you may also install http://xhprof.io/. To get it running you need to
- create a database for persisting the data
- define a database user
- clone the gui into a vhost/document root
- maybe create a dedicated vhost
- adjust the PDO config within the GUI tool
But at first, the GUI is not needed IMO.
from puphpet.
Using pear xhprof will be installed in version 0.9.3 (just tested it on my 12.04 + PHP 5.4 machine). I think we should go this (out-of-the-box) way and not the manual installation way contained in the xhprof.pp.
from puphpet.
you mean pecl
not pear
?
from puphpet.
Oh of course. Had no coffee yet this morning :)
from puphpet.
you should fix that ☕ :-)
from puphpet.
Copy/paste this into a file:
<?php
$XHPROF_ROOT = "/var/www/xhprof";
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php";
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php";
// start profiling
xhprof_enable();
for ($index = 0; $index < 1000; $index++) {
$x = array(1,2,3,4);
array_reverse($x);
}
//end profiling
$xhprof_data = xhprof_disable();
$xhprof_runs = new XHProfRuns_Default();
$run_id = $xhprof_runs->save_run($xhprof_data, "foobar");
Open the file in your browser, then go here: http://192.168.123.101/xhprof/xhprof_html/index.php?
Change out with your specific IP address.
from puphpet.
great, thanks
from puphpet.
Have to reopen. xhprof integration currently does not work an a nginx machine properly. Do not know yet where the problem is caused.
from puphpet.
php location for nginx is missing, so php pages are not interpreted.
from puphpet.
Related Issues (20)
- Failed to start The PHP 5.6 FastCGI Process Manager
- Windows 10 provision error
- Error: While executing gem ... invalid option: --no-rdoc HOT 5
- Error: Evaluation Error: Error while evaluating a Resource Statement
- Can't start vagrant box: "gpg: keyserver receive failed: keyserver error" HOT 1
- Apache redirects to https HOT 2
- Centos7 partial failure HOT 1
- elasticsearch version is wrong
- Mariadb install failed HOT 1
- elasticsearch 2.4.6 not installed
- rsync auto not work
- synced_folder: few projects
- Failed to create the host-only adapter HOT 3
- r
- PGAdmin 4 - not able to connect through SSH Tunneling HOT 1
- Do not have permissions to write to a file HOT 1
- PHP not working in fresh bento/ubuntu-16.04 box HOT 5
- Finite number of databases allowed
- puphpet.com is offline HOT 16
- Install Puphpet site en development computer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puphpet.