Running a system command from php
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Running a system command from php

From: jsw_nz <jswnz@xtra.co.nz>
Date: Fri Sep 09 2005 - 06:25:23 CEST

Helo, my first post here....

I am trying to run an agent application that converts and imports two
tables from MS Access into mySql.
(Intelligent Converters - Access2mySql)
I have run similar scripts to do mysql dumps using the system function.
Not sure if the paths included in the parameters are correct:

<?php
function import_data() {
$sourceFile = "C:\Program Files\Intelligent converters\myAccessDB.mdb";
$tableFile = "C:\Program Files\Intelligent Converters\whichTables.txt";
system("/Program Files/Intelligent Converters/A2SAGENT.EXE
--dest=st_staff --src=$sourceFile --tab_file=$tableFile --mode=1");
}
import_data();
?>

This syntax works fine in command line prompt, but somehow it is not
working when called from php. I have tried two versionn of this (one
using user/pass - not shown) and the one above.

Any pointers on running this, and getting results.

Cheers,
John
Received on Mon Oct 24 02:09:50 2005