Current location: Hot Scripts Forums » Programming Languages » PHP » executing c from php


executing c from php

Reply
  #1 (permalink)  
Old 09-15-09, 01:00 AM
reshma reshma is offline
Newbie Coder
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 2 Times in 2 Posts
executing c from php

hi guys

I want to call a C program from within a php code.... i tried to figure out how to go bout it but haven't been able to narrow down to any conclusion....can someone please help me out with this...

Thanks !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-15-09, 01:09 AM
captcha captcha is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-15-09, 01:21 AM
reshma reshma is offline
Newbie Coder
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 2 Times in 2 Posts
the thing is that i do not want the output of the C code. I just want the code to be executed...in that case i am not sure if shell_exec will help....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-15-09, 01:26 AM
captcha captcha is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 09-15-09, 01:30 AM
reshma reshma is offline
Newbie Coder
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 2 Times in 2 Posts
thanks i will do that....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 09-18-09, 12:52 AM
reshma reshma is offline
Newbie Coder
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 2 Times in 2 Posts
hey i tried to do something like this

exec('/root/desktop/navit');

it gives me an error which says "Could not find home directory. Using current directory as home directory" and also another errro saying "cannot display, GTk warning"

I am actually trying to use navit.exe and display a map....

can someone plssss help me out with this...


Thanks !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 09-18-09, 04:19 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
do you have the permission to access your desktop through php?

Try placing the navit application inside your website root, and calling it from there.
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 09-18-09, 06:55 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Also - you may need to use navit.exe, not just navit.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 09-19-09, 10:09 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by reshma View Post
exec('/root/desktop/navit');

it gives me an error which says "Could not find home directory. Using current directory as home directory" and also another errro saying "cannot display, GTk warning"
You may need to change (cd) to the correct directory first. I've had similar problems and sometimes that's the fix.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 11:17 AM
help with error messages.. please APuppyDog PHP 2 10-06-06 12:09 AM
PHP Not Working ProjectJustice PHP 2 06-25-06 08:37 PM
PHP Runner , Preview PHP files ! moslehi@gmail.com General Advertisements 3 12-08-04 04:01 PM


All times are GMT -5. The time now is 08:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.