How to use xhgui with MAMP for wordpress?

I am quite new to apache and PHP.
I currently have a wordpress running locally (MacOS) with MAMP.

I use xhgui (https://github.com/perftools/xhgui) which works fine.
For instance, it profiles itself when I put auto_prepend_file = “/path/to/xhgui/external/header.php” into the global php.ini.

Read More

But mamp seems to use its own php.ini (as indicated by phpinfo). So I added the same line there.
Still, xhgui does not profile it.

What am I doing wrong?

PS: I am running with “php -S 0:8080 -t webroot/” and not through a vhost via mamp, since I could not get it to work. Can this cause the problem?

Edit: my vhost

<VirtualHost *:8888>
    php_admin_value auto_prepend_file "/Users/me/Desktop/xhgui/external/header.php"
    DocumentRoot "/Users/me/Documents/path/to/wordpress"
    ServerName localhost
</VirtualHost>

Related posts

1 comment

  1. I had the same problem and i solved it exporting a varibale.

    In my case, i ran the following command in the console:

    export PHP_INI_SCAN_DIR=/Library/Application Support/appsolute/MAMP PRO/conf
    

Comments are closed.