Completed

PHP Script to Execute C Files

Hi,

I am writing a PHP script that upload a file that execute other c files by using system calls fork(), and exec(), and execl().

Unfortunately exec() and execl() functions did not work.

In more details, the PHP script , execute exec() function to execute p1 which is the executable file of p1.c, and the p1.c program calls execl("./p2", "./p2", "[url removed, login to view]","[url removed, login to view]", NULL); to execute p2 which is the executable file of p2.c. As the result shows in screenshot file of the output; execl() function did not execute and have the following out

Process 1 is running.

Process 1 is forking a new child process.

Process 1 is running.

Process 1 is forking a new child process.

The child of Process 1 is running.

The child of Process 1 is replacing itself.

YOU'LL NEVER EVER SEE THIS LINE :(

It should have the following output:

Process 1 is running.

Process 1 is forking a new child process.

Process 1 is running.

Process 1 is forking a new child process.

The child of Process 1 is running.

The child of Process 1 is replacing itself.

Process 2 is running

Process 2 is expecting 2 arguments

Process 2 receives 2 arguments

I got this

And I got this

Process 2 is done. Goodbye!!

That means this printf("YOU'LL NEVER EVER SEE THIS LINE :( \n"); will never execute if the execl() is working at p1.c program.

To see the whole project how it works, please follow the follwing steps:

1- put all folder in some directory in your computer.

2- click on this URL : http://localhost/enc/

3- Upload p1 file from app folder

4- click on upload button to see the result.

5- look at PHP script, and P1.c, P2.c for more details.

Please check the attached files and send me privatge message if any query.

I am expecting bids only from the serious bidders.

Deadline: 1 day.

Payment after successful completion of the project and delivery.

Cheers!

Skills: C Programming, PHP, Software Architecture

See more: writing to a file in c, writing programming in c++, writing process steps, writing in script, writing a script, writing a computer program, the writing process steps, steps to writing, steps to computer programming, steps of writing process, steps of the writing process, steps in writing process, steps in the writing process, see your computer writing, script writing work, script writing program, script writing app, printf c programming, php script null, php program to upload files

About the Employer:
( 7 reviews ) Dhaka, Bangladesh

Project ID: #2618937

Awarded to:

TechNinja2020

2 years of professional PHP experience and I've already solved your [login to view URL] check your PMB for the attachment

$50 USD in 0 days
(1 Review)
1.4

3 freelancers are bidding on average $40 for this job

pablotorres

i can do it

$30 USD in 7 days
(82 Reviews)
5.6
suriyant

Both C/PHP programming experience more than 10 yrs, I can do it now!

$40 USD in 1 day
(17 Reviews)
4.8
TV5D1bn9X

Custom software development: w w w . The Administrator removed this message for containing contact details which breaches our Terms of Service . i o

$50 USD in 1 day
(0 Reviews)
0.0