PHP exec problems mp3test.php (01/01)

ca.wahs_at_reggitr
Date: 11/26/04

  • Next message: PhpProgrammer: "PHP RPGs"
    Date: Fri, 26 Nov 2004 17:02:54 GMT
    
    

    Hey all, wondering if someone could give me a hand.

    Problem: Exec(), backticks, and system() won't work from a webserver prospective.
    I have a small page (see attached) that calls an external program that should, with the arguments
    provided, return one line of code with the length of the mp3 passed to it in seconds. This page
    works perfectly fine if run from the command line (php mp3test.php), but will not show anything,
    not even an error message, if run from a browser (through the apache server). I've tried
    removing the quotes from the command arguments, passing the whole command as a string var
    into an exec & system call, I chmod'ed the command it calls (/usr/bin/mp3info) to 777 just to
    make sure, I've changed the apache webserver's user to something other than apache,
    I've chown'd and chgrp'd the mp3info file to apache, I've copied the mp3info file to the php safe
    mode exec directory just to be safe (even though safe mode isn't on). I'm at the end of my rope.
    Does ANYONE have any idea as to how to fix this problem?

    System: Fresh install of Fedora Core 3 with EVERYTHING installed & updated, using Apache,
    PHP, and MySQL for the website I'm trying to build

    Get ahold of me @: rtigger at shaw dot ca - or just reply to this message :)
    begin 644 mp3test.php
    M/$A434P^"CQ"3T19/@H\/W!H<`IP<FEN="`B4W1A<G1E9"!M<#,@8V%L;#Q"
    M4CY<;B(["G!R:6YT(&`O=7-R+V)I;B]M<#-I;F9O("UP("<E4UQN)R`G+W9A
    M<B]W=W<O;75S:6,O,3(P."`M($%L;"!)($-A;B!$;RYM<#,G8#L*<')I;G0@
    K(F5N9&5D(&UP,R!C86QL/$)2/EQN(CL*/SX*/"]B;V1Y/@H\+TA434P^"@==
    `
    end


  • Next message: PhpProgrammer: "PHP RPGs"

    Relevant Pages

    • starting a external program(2)
      ... The use of a test.bat file in the exec() command just works fine. ... test.bat is a program that writes a logfile of a ping to the temp dirictory. ... The program to exececute is in de homedir from Apache ...
      (alt.php)
    • Re: wScript.Shell Problems
      ... the completion of the underlying process. ... However, the Exec procedure is ... Here is why i went to the RUN command, it is my understanding that the ... EXEC command does not allow for the BOOLEAN indicating wether the ...
      (microsoft.public.scripting.vbscript)
    • Re: Sleep freezing
      ... >> man exec. ... > form of a standard shell pipeline where each arg becomes one ... > word of a command, and each distinct command becomes a sub- ... The word "execute" means to replace the program running in the calling ...
      (comp.unix.shell)
    • Re: Literal pipes in [open "|cmd..."]
      ... If it's not an [exec] directive, ... away with the intermediary pipe directives entirely also (or more ... As for a new command with a clean syntax, the only way you're going to ... fileevent $ou write $arg ...
      (comp.lang.tcl)
    • Re: Expect scripting
      ... I reverted to what I am familiar with which is script and used exec ... COMPL is the exact prompt from the remote processor? ... If the command were to be entered to the telnet session to this ... I strongly recommend you read.- Hide quoted text - ...
      (comp.lang.tcl)