Following videos on youtube for quickstart. Get to point to set xhprof variables with command:
drush vset --always-set devel_xhprof_enabled 1

I get the error:

Fatal error: Class 'XHProfRuns_Default' not found in /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module on line 1008

Call Stack:
0.0009 394228 1. {main}() /home/quickstart/drush/drush.php:0
0.3175 22717664 2. _drupal_shutdown_function() /home/quickstart/websites/test.dev/includes/bootstrap.inc:0
0.3176 22717696 3. call_user_func_array() /home/quickstart/websites/test.dev/includes/bootstrap.inc:2990
0.3176 22717888 4. devel_shutdown() /home/quickstart/websites/test.dev/includes/bootstrap.inc:0
0.3176 22718620 5. devel_shutdown_xhprof() /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module:921

Any ideas?

Comments

JSCSJSCS’s picture

When I tried to set the variables with the drupal interface, I go this:

Warning: include_once(/home/quickstart/websites/log­s/xhprof/xhprof_lib/utils/xhprof_lib.php): failed to open stream: No such file or directory in devel_xhprof_enable() (line 546 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(): Failed opening '/home/quickstart/websites/log­s/xhprof/xhprof_lib/utils/xhprof_lib.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in devel_xhprof_enable() (line 546 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(/home/quickstart/websites/log­s/xhprof/xhprof_lib/utils/xhprof_runs.php): failed to open stream: No such file or directory in devel_xhprof_enable() (line 547 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).
Warning: include_once(): Failed opening '/home/quickstart/websites/log­s/xhprof/xhprof_lib/utils/xhprof_runs.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in devel_xhprof_enable() (line 547 of /home/quickstart/websites/test.dev/sites/all/modules/devel/devel.module).

bcmiller0’s picture

sounds like your XHPROF Directory: , setting in devel is incorrect.

bcmiller0’s picture

in other works the devel_xhprof_directory must point to wherever your xhprof source code is so it can access the libs, from teh xhprof/xhprof_lib directory .

there are 3 devel_xhprof settings, you can see them from the gui as well.

devel_xhprof_directory: "/mnt/xhprof"
devel_xhprof_enabled: 1
devel_xhprof_url: "http://10.10.210.201/xhprof"

chrowe’s picture

Component: Image Build » Drush
Category: support » bug

I am running QS v1.0

I got this same error after running the first drush vset command recommended by the screencast http://www.youtube.com/watch?v=Xjgwhn_SnZc

I just ran the other 2 commands and it worked the first time. When I dried to reproduce this issues I had some other issues and could not get XHPreof to work.

It recommends running 3 commands:

drush vset --always-set devel_xhprof_enabled 1
drush vset --always-set devel_xhprof_directory "/home/quickstart/websites/log­s/xhprof"
drush vset --always-set devel_xhprof_url "http://localhost/xhprof"

Maybe changing the order of the drush vset commands would help but now I can't reproduce the issue.
I also tried entering

Mixologic’s picture

It might be nice if the xhprof form for xhprof directory and XHProf URL were required if the checkbox is enabled. I was switching between environments and flipped on xhprof and didnt see that I forgot to fill in those fields, and finally ended up here. Perhaps a warning or something?

mike stewart’s picture

christowm’s picture

I ran into the same problem. Here is how I was able to solve it.

  1. Download a copy of xhprof: wget http://pecl.php.net/get/xhprof-0.9.2.tgz
  2. untar the archive: tar zxf xhprof-0.9.2.tgz
  3. Use the xhprof source from that folder structure in the devel module. In my case I had unpacked the archive in : /home/quickstart/xhprof-0.9.2
  4. I used this entry "/home/quickstart/xhprof-0.9.2/" for the xhprof directory field in the devel module

If you unpack the tar archive in some other directory then make sure to use your specific path. Once I took those steps I was able to get everything else to work.

MichaelCole’s picture

Status: Active » Closed (fixed)

Thanks for the fix christowm!

elvis2’s picture

To solve this problem I had to make sure that my file permissions and ownership were proper for profiler and xhprof directories.

chmod -R 770 /home/quickstart/websites/logs/profiler
chown quickstart:www-data -R /home/quickstart/websites/logs/profiler
chmod -R 770 /home/quickstart/websites/logs/xhprof
chown quickstart:www-data -R /home/quickstart/websites/logs/xhprof
sidharthap’s picture

Thanks @elvis, it works for me.

DarrellDuane’s picture

Issue summary: View changes

For a quick way to resolve this issue if your site is entirely down because of this error (as mine was since I'm using HHVM instead of PHP) from the shell:

[root@server]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 232178
Server version: 10.0.21-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use your_drupal_db_name
Database changed
MariaDB [your_drupal_db_name]> update variable set value = 0 where name = 'devel_xhprof_enabled';