views:

290

answers:

4

I know that this sounds odd, but believe me, it's what is happening. Here are my system settings:

Windows7
Apache 2.2
PHP 5.2.12
Xdebug 2.0.5

I have XDebug configured in my PHP.ini file. When I run php -m, I do in fact see that Xdebug is loaded. Now, if I start Apache AS A SERVICE (or by the Apache Monitor), and run phpinfo(), it is NOT showing Xdebug as being loaded.

However, (now here's the crazy part), if I go to my Apache bin directory, and simply run httpd.exe, and then go and look at phpinfo(), Xdebug now shows as being loaded!

Also, comparing some phpinfo() when started via service or by command line, it looks like the php.ini file is the same for either case. Everything looks the same except for the Xdebug being loaded part.

Please, if you have any ideas it would be greatly appreciated.

A: 

I had a similar problem with Xdebug in Windows/IIS - php -m showed the module as loaded, but phpinfo() did not. Turned out to be a permissions issue - once I set the xdebug .dll to give read access to anonymous users, it started working. I'd check permissions on that .dll to make sure that whatever user Apache is running as has access to it.

Ryan Mitchell
A: 

I have a similar issue with windows 7, wampserver2 and xdebug. Thanks for describing it or I never would have found it. If I ever find a fix I'll let you know. I tried permissions Ryan but it did not fix it.

php -i and php -m show that xdebug has loaded. phpinfo() does not. Unlike yourself I cannot get xdebug to load by running httpd in the console. When I run httpd in the console I get the same result as not running it in the console.

There are no warnings in the logs. In relation to php I only get the below.

[Thu Jun 24 11:20:55 2010] [notice] Apache/2.2.11 (Win32) PHP/5.2.0 configured -- resuming normal operations
John Deverall
I solved my issue as I was using wampserver2.0 and naively assumed I could use c:\wamp\bin\php\php5.2.0\php.ini to affect my configuration.In actual fact one must use c:\wamp\apache\Apache2.2.11\bin\php.ini to configure php on the wamp server.
John Deverall
A: 

Generally there is different configuration files for each possible way of invoking an instance of php: HTTP/CLI etc (at least this can be the case on *nix)

I would suggest doing a search on your system for php*ini and see if you have multiple files with differing/missing Xdebug settings.

nathan-unleashed
A: 

It's possibly a buggy version/combination. I had a different issue (XDebug was not recognising some variables), the problem cleared up when I when up to 2.1.0.

http://xdebug.org/download.php

Mark Flint