thegadgitman Posted February 5, 2010 Share Posted February 5, 2010 I am trying to call up an on screen keyboard with a very simple code on Localhost. However the PC just makes a BONG sound and nothing opens but the file is shown in the TASK MANAGER as running, but it is not. What am I doing wrong. hvk.exe is the prog I am trying to run and is in Localhost directory. <?php exec("hvk /SHOWKEYBOARD"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/ Share on other sites More sharing options...
oni-kun Posted February 5, 2010 Share Posted February 5, 2010 I am trying to call up an on screen keyboard with a very simple code on Localhost. However the PC just makes a BONG sound and nothing opens but the file is shown in the TASK MANAGER as running, but it is not. What am I doing wrong. hvk.exe is the prog I am trying to run and is in Localhost directory. <?php exec("hvk /SHOWKEYBOARD"); ?> Is safe mode off? Did you place it in the 'safedir' that php requires exe's to be in for them to be run? Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007428 Share on other sites More sharing options...
thegadgitman Posted February 5, 2010 Author Share Posted February 5, 2010 Sorry am very new to PHP but am trying to learn fast. How do I check, or turn on and off safemode and where is the 'safedir' Sorry if I seem thick but I need to learn. THANK YOU Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007441 Share on other sites More sharing options...
thegadgitman Posted February 5, 2010 Author Share Posted February 5, 2010 OK have checked safe mode etc in PHP.ini Safemode is off and files in correct directory. This does not work. PC goes BONG and file opens in file Manager, but does not run. <?php exec("hvk.exe"); //Call on screen keyboard ?> This code works fine, windows keyboard opens, WHY ???? I need to use the keyboard above. <?php exec("osk.exe"); //Call windows on Screen keyboard ?> Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007450 Share on other sites More sharing options...
oni-kun Posted February 5, 2010 Share Posted February 5, 2010 Try using system() Are you sure that program can be run under the command line? And are you sure you have permissions to run it? (administrator) Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007451 Share on other sites More sharing options...
thegadgitman Posted February 5, 2010 Author Share Posted February 5, 2010 Thanks, same results using system. Just a Bong sound and file appears in Task Manager. Yes the file can be run from command line. I also have the same problem with other .exe files. HOW do I change the permissions ?? Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007453 Share on other sites More sharing options...
thegadgitman Posted February 5, 2010 Author Share Posted February 5, 2010 JOB DONE. Have to change Apache Permissions. Control Panel, Admin Tools, Services. Look for Apache 2.2, Double click. Select Log On, Tick Box - Allow services to interact with your desktop. Apply setting, re-start Apache. BINGO. File now opens. THANKS for the help. Quote Link to comment https://forums.phpfreaks.com/topic/191060-help-with-exec-command-not-running-file/#findComment-1007465 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.