...

View Full Version : php: browser and command-line difference



jog
06-23-2006, 12:55 PM
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

fci
06-23-2006, 01:05 PM
try doing:

echo shell_exec('blahblah 2>&1');
the 2>&1 will redirect the errors to stdout so that you can see them.

jog
06-23-2006, 01:29 PM
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


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!!

fci
06-23-2006, 01:35 PM
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/framework/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.

jog
06-23-2006, 01:47 PM
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!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum