Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.