Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    jog
    jog is offline
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php: browser and command-line difference

    Hello,

    I've got a problem with a php script. It has a 'system' call to another program. The thing is, that in command line, the call is successful and in the browser is not.

    First thing I think is that it can be a problem of permissions (the user in the browser is apache, and in the command line is me). But, is there anything that often causes differences between the command line and the browser in php?

    Thanks in advance

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try doing:
    Code:
    echo shell_exec('blahblah 2>&1');
    the 2>&1 will redirect the errors to stdout so that you can see them.

  • #3
    jog
    jog is offline
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it gives me a

    sh: R: command not found
    R is the name of the program I try to call. (but R is in the path, I don't know why I obtain this error)

    If I change to the complete path
    Code:
    echo shell_exec('/usr/local/bin/R blablabla')
    then I obtain:

    ***glibc detected***/usr/local/lib/R/bin/exec/R: double free or corruption (!prev)
    and I haven't got any idea about what this error wants to say... any help? thanks!!

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found this description of the error:
    Hi,

    As far as i know, the newer glibc version are using some kind of protection mechanism against malloc overflows. When the boundary information between chunks is overwritten due to a overflow, glibc will detect. I don't know a technique to bypass this mechanism. I'd be glad if someone can provide me with information about bypassing this protection mechanism.
    http://www.metasploit.com/archive/fr.../msg00953.html

    to fix it, I would try installing a different version/package of R or compiling from source... but if it isn't affecting the running of the actual program then I wouldn't worry about it as much, maybe report it as a bug.
    Last edited by fci; 06-23-2006 at 02:39 PM.

  • #5
    jog
    jog is offline
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but if it isn't affecting the running of the actual program then I wouldn't worry about it as much, maybe report it as a bug.
    no, it still doesn't make the call to R. Let's try to install another version of R... thank you!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •