Click to See Complete Forum and Search --> : system() doesn't work


angel22
07-18-2005, 02:51 PM
hi:

my project is: indexing all kind of files for simple search engine in php,
as I mentioned before: I'm working in winXP,apache server with php

my problem is when I'm trying to call a converter program called "ABC Amber PDF converter" within my script using system().

this program support Command Line as follows:

"C:\Program Files\ABC Amber PDF Converter\abcpdf.exe" ["SourceFile"] ["DestinationFile"] [DestinationIndex]

but when I called it throgh my script,it doesn't work

$pdf="d:\AppServ\www\moodel\CLEF.pdf";
$text="d:\AppSev\www\clef.txt ";
$type=4;//for text

system(" $arg $pdf $text $type");

I'm wondering why and how can i come over this problem, is there anything in my php.ini file that I must change... please help me

thorpe
07-18-2005, 06:38 PM
how are you populating the $arg variable? i think this has to do with the fact that you have spaces in some of your directory names. your going to need to enclose the path to your exe in quotes. ie, you might try something like;

$arg = '"C:\Program Files\ABC Amber PDF Converter\abcpdf.exe"';

angel22
07-19-2005, 04:46 AM
hi

I've tried this with no results, do u have any other suggestions...please