phpwampserverxhprof

xhprof on WampServer 2.2


I am trying to get XHProf working on my WampServer.

I have downloaded the dll from: http://dev.freshsite.pl/php-extensions/xhprof/file/details/xhprof-0103-for-php-53-vc9.html and renamed to xhprof.dll in C:\wamp\bin\php\php5.3.9\ext (Which is the dir listed for extensions in phpinfo())

Php.ini path from phpinfo(): C:\wamp\bin\apache\Apache2.2.21\bin\php.ini

Extensions listed in that file:

 extension=php_curl.dll
 extension=xhprof.dll
 ;extension=php_dba.dll
 extension=php_mbstring.dll
 ;extension=php_exif.dll
 ;extension=php_fileinfo.dll
 extension=php_gd2.dll
 ;extension=php_gettext.dll
 ;extension=php_gmp.dll
 ;extension=php_intl.dll
 ;extension=php_imap.dll
 ;extension=php_interbase.dll
 ;extension=php_ldap.dll
 ;extension=php_ming.dll
 ;extension=php_mssql.dll
 extension=php_mysql.dll
 extension=php_mysqli.dll
 ;extension=php_oci8.dll
 ;extension=php_oci8_11g.dll 
 ;extension=php_openssl.dll
 ;extension=php_pdo_firebird.dll
 ;extension=php_pdo_mssql.dll
 extension=php_pdo_mysql.dll
 ;extension=php_pdo_oci.dll
 ;extension=php_pdo_odbc.dll
 ;extension=php_pdo_pgsql.dll
 extension=php_pdo_sqlite.dll
 ;extension=php_pgsql.dll
 ;extension=php_phar.dll
 ;extension=php_pspell.dll
 ;extension=php_shmop.dll
 ;extension=php_snmp.dll
 ;extension=php_soap.dll
 ;extension=php_sockets.dll
 ;extension=php_sqlite.dll
 ;extension=php_sqlite3.dll
 ;extension=php_sybase_ct.dll
 ;extension=php_tidy.dll
 ;extension=php_xmlrpc.dll
 ;extension=php_xsl.dll
 ;extension=php_zip.dll

But when I restart WampServer and the services associated with it, no XHProf information appears in phpinfo()

I am looking for a way to fix this, or a further way to investigate why this extension isnt loading

Thanks


Solution

  • You are using WampServer 64-bit, but the xhprof.dll is made for the 32-bit architecture and isn't compatible. Ony my own Windows 7 machine I got this error in the apache_error.log:

    PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.8/ext/php_xhprof.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
    <br />
    <b>Warning</b>:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.8/ext/php_xhprof.dll' - %1 is not a valid Win32 application.
     in <b>Unknown</b> on line <b>0</b><br />
    

    It doesn't seem that there is a 64-bit version at this time, so you are limited to options of what you can do. The first choice is to use the 32-bit version of WampServer (on a development machine I can't see too many drawbacks with this). The second is to sweet-talk the makers at fresh-site to compile/support 64-bit. Good luck!