Problem in executing external program in php

Discussion in 'PHP' started by rizwan051, Dec 8, 2007.

  1. #1
    Hello,

    I have apache 2 , php5 on windows 2003 server. I want to execute the external command like,

    system( 'c:/PHP/safedir/pdftk.exe C:/AppServ/www/mylegalwork/images/pdf_files/PROD-5298b6/MLW_Demo_Form_1.pdf dump_data_fields > C:/AppServ/www/mylegalwork/images/pdf_files/PROD-5298b6/rizwan')

    basicaly pdftk.exe is pdf utility. I have put it in safe directory. The problem is when i try to access the page its not execute the command. I have try it with passthru, exec and with shell_command but all do nothing. Its working fine on my local machine and on linux server where i install pdftk but on windows 2003 server its not working. I have found an article at http://bugs.php.net/bug.php?id=20951 which says there is security issue thats why its not allow php to execute the command. If anyone of you know anything about it than do let me know. I really want to run the command.

    Thanks,
    BR
    Rizwan
     
    rizwan051, Dec 8, 2007 IP
  2. DocZ80

    DocZ80 Peon

    Messages:
    145
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you tried to replace '/' characters with '\\' ?
     
    DocZ80, Dec 8, 2007 IP