Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a C++ binary compiled using VC++2008, this code uses my GPU (NVIDIA GT 8600) for some calculations. The program first checks for the graphics card vendor using the glGetString(GPU_VENDOR) function in openGL.

When I run this program from the command line it works without any problems. But if I execute the same command through PHP, using WAMP, it does not detect my vendor as NVIDIA and instead returns 'Microsoft Corporation' and exits saying my hardware does not support the GPU related functions I'm using. I'm not able to understand the difference in executing a command through WAMP instead of directly from command line. Why should only the former one fail?

It works even if i execute the php code directly from command line. This suggests that something's going wrong in WAMP. If anyone has any ideas at all, it would be of great help if you could post them here.

share|improve this question
up vote 1 down vote accepted

It's running it in background mode (non-interactive) in which case something like this will happen. When you run it manually, you're running it interactively in your current session which has graphical capabilities while a background mode session would not.

share|improve this answer
Yes, that does seem to be the problem... i forgot to mention I'm using windows 7, which does not allow services to access the display devices as all the services run in session 0. I think that's what's happening to the wampapache service i start. – Slartibartfast Jul 17 '10 at 3:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.