Connecting Tech Pros Worldwide Forums | Help | Site Map

how do i make apache user run C programm

Member
 
Join Date: Jan 2008
Location: SA
Posts: 44
#1: Sep 29 '09
Hi everyone, i am trying to use php file to run C program but nothing actually is happening when i use exec() ,system(). i thought about the permission problem
but i don't know how do i go about making apache user to run C program.

please anyone help.

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,678
#2: Sep 29 '09

re: how do i make apache user run C programm


Quote:

Originally Posted by ogo796 View Post

but nothing actually is happening when i use exec() ,system().

then check the function return values or the log files (error log)


Quote:

Originally Posted by ogo796 View Post

but i don't know how do i go about making apache user to run C program.

what’s that got to do with the PHP programme?
dheerajjoshim's Avatar
Needs Regular Fix
 
Join Date: Jul 2009
Location: Bangalore, INDIA
Posts: 283
#3: Sep 29 '09

re: how do i make apache user run C programm


Do you want to call C functions in PHP?? or you want to execute a C program in PHP. If you want to call a C function in PHP you can use ZEND or SWIG....

Have you tried executing your C program in PHP as

Expand|Select|Wrap|Line Numbers
  1. echo `a.out` ;
  2.  
a.out is out file of your C program

Regards
Dheeraj Joshi
Reply