Web Design and Development Forums

Server side executables

This is a discussion on "Server side executables" within the PHP Forum section. This forum, and the thread "Server side executables are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > PHP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Dec 30th, 2006, 15:23   #1 (permalink)
Reputable Member
 
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 217
Server side executables

This is probably super basic, but can someone get me started on how to execute a server-side executable via a link on a (client side) web page? I just want to click a button on a web page on the client and have it execute "ontheserver.bat".

I'm running IIS5 on a Windows XP machine. I'm using version 4.4.2 of php. Note that this is entirely internal - home LAN only - and I am the only user, so security is not an issue.
__________________
"There is no heavier burden than a great potential."~ Charlie Brown

Last edited by Donny Bahama; Dec 30th, 2006 at 15:54.
Donny Bahama is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 30th, 2006, 15:50   #2 (permalink)
Reputable Member
 
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 217
Re: Server side executables

I found this thread: Run .EXE program via PHP and I've read http://www.php.net/manual/en/function.exec.php but I'm getting an "unable to fork" error when trying to execute this code:
PHP: Select all

<?php
exec
('start /B "window_name" "notepad.exe"');
?>
__________________
"There is no heavier burden than a great potential."~ Charlie Brown

Last edited by Donny Bahama; Dec 30th, 2006 at 15:55.
Donny Bahama is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 30th, 2006, 16:53   #3 (permalink)
Reputable Member
 
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 217
Re: Server side executables

I found the answer here: http://www.somacon.com/p255.php - sort of... it has to do with permissions for the Internet guest account "IUSR_WEB_SERVER_MACHINE_NAME". Now that I fixed that, it executes ontheserver.bat - which creates a directory and a test.txt file within the new directory - but the page itself doesn't return after running ontheserver.bat. It just sits there "Loading..."
__________________
"There is no heavier burden than a great potential."~ Charlie Brown
Donny Bahama is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 30th, 2006, 17:33   #4 (permalink)
Rob
Head Admin & CEO
 
Rob's Avatar
 
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,311
Blog Entries: 7
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Server side executables

put an 'exit' as the last line of your bat.... if that doesnt work, try 'stop'
__________________
Rob Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com

My Mrs's site:- Student Midwife Forums

I am currently unavailable for private work
-------------------------------------------------
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 30th, 2006, 17:59   #5 (permalink)
Reputable Member
 
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 217
Re: Server side executables

LOL! Rob - you ROCK, my friend!

I had *just* figured that out and was coming back to post my findings! This works:
PHP: Select all

<?php
$ret 
system('start /B C:\website\usbuirt\ontheserver.bat');
?>
IF you use "exit" on the last line of the batch file.
__________________
"There is no heavier burden than a great potential."~ Charlie Brown
Donny Bahama is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
lan, php, server side executables

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java server side technologies asim Webforumz Cafe 0 Jun 20th, 2007 07:47
Trouble with Server Side Includes BGarner ASP Forum 3 Jan 20th, 2007 17:16
Client-Side VS Server Side Scripting redev2006 JavaScript Forum 1 Jul 30th, 2005 19:30
server side scrollable message boxes using asp wheatus ASP Forum 5 Mar 22nd, 2005 11:37
do server side includes affect performance? spinal007 ASP Forum 13 May 5th, 2004 12:34



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 05:09.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59