PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 22nd, 2000, 11:00 AM
tors10 tors10 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 2 tors10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi folks,
I'm desperately trying to get an external program (i.e. Notepad for test use) running.
I'm using PHP3 and Apache under WinNT.
Everything I tried failed:

system ("notepad.exe");
or
exec ("notepad.exe");
or
popen("notepad.exe", "w");
or
echo `notepad.exe`;

Each time a new process "NOTEPAD.EXE" has been created, but it's only visible within the task-manager without the possibility to kill it.
The PHP-script seems to be still active for a long, long time.

Any helpful ideas are very welcome. Thanx.

Reply With Quote
  #2  
Old May 22nd, 2000, 02:02 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
Well, you're trying to run a windows program from a language that wasn't intended for the desktop. I'm not sure exactly what the problem is, but it's probably something about running in a non-console mode that can't open a new window.

The question is "Why try executing a windows program from a webserver?" Try executing a command-line program, or, better yet, create a small batch file that does something file-based, like write some text into a file or something. Or for example starting or stopping a WinNT service: "net stop Spooler" or "net start Spooler".

Reply With Quote
  #3  
Old May 24th, 2000, 08:27 AM
tors10 tors10 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 2 tors10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi rycamor,
thanx a lot for your ideas. The problem I had(!) was much more complex as just starting notepad.
The thing I'm doing is to invoke via PHP a CORBA-Client on the webserver which is accessing the appropriate CORBA-Server somewhere within the network.
The problems were:
(1) My webserver (Apache) was running with wrong permissions
(2) The client forgot all environment variables when it was invoked by PHP/Apache

#2 is really a silly thing. I set up a few variables in the client-code and yeahhh, it works!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > executing programs with php

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap