LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2003, 05:17 PM   #1
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30
Question Is it possible to have PHP trigger a C program ?


I'm trying to find out the viability of writing php script which handles a database through MySQL, and then outputs the results in a GUI which is written in C.

Can this be done ? What are the basics that I need to know about interfacing the two ?

JC
 
Old 07-12-2003, 05:38 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
is there any reason why the gui cant talk to mysql directly?
 
Old 07-12-2003, 05:58 PM   #3
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
No, there isn't. I was trying to simplify my project. I was thinking it might be better to handle all of the logic with PHP script, and turning to C to produce a GUI which would trigger PHP commands. I guess I had that backwards.

The reason I am exploring this is because there will be an admin interface which uses PHP (it will be browser based), and I was trying to not reinvent the wheel.

If possible, I would like C to handle only the GUI application.

JC
 
Old 07-13-2003, 09:03 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Take a look at this:
http://www.php.net/manual/en/ref.exec.php

You probably want exec or system.
 
Old 07-13-2003, 11:20 AM   #5
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Talking

Thanks. That looks like exactly what I need to know.

JC
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP chat program jilljack Programming 2 10-14-2005 05:46 AM
trigger 0.5.1.c mirto Slackware 2 09-08-2005 06:34 AM
How executing c program with php? payal_shah Programming 6 04-08-2005 10:44 PM
Need help in PHP PROGRAM mgrapr Linux - Newbie 1 02-28-2004 04:04 AM
want to execute a php file in a c++ program Mr_ss Programming 1 10-10-2001 03:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration