NYCPHP Meetup

[nycphp-talk] is_executable() returns false?

Hans Kaspersetz hans at cyberxdesigns.com
Sun Mar 30 14:55:27 EDT 2008


Hi guys and gals,

I have a weird problem with is_executble(), it is returning false when 
it seems like it should return true.  This is on a cpanel server with 
the following:

Apache 1.3.x
PHP 5.2.5
RHE


Here is my test script:

<?php
clearstatcache();

$r = is_executable("curl");  // The offending function.

echo "Is Exec: ";
echo  ($r)? "True":"False";  //Getting printable output.
echo "<br><br>";

exec("curl --version", $output);  // Actually executing it to make sure 
it is there.
print_r($output);
?>

Here is my output:

---- out put to the browser -----

Is Exec: False

Array ( [0] => curl 7.15.3 (i686-pc-linux-gnu) libcurl/7.15.3 
OpenSSL/0.9.7a zlib/1.1.4 [1] => Protocols: tftp ftp telnet dict ldap 
http file https ftps [2] => Features: Largefile NTLM SSL libz )

---- end of output ---------------

I am not sure where to go from here.  I wish I didn't have to deal with 
this, but the is_executable function is buried in xcart and I don't want 
to start moding the core.  It seems like I might have some other problem 
that I am just not seeing.

Thanks in advance,
Hans K







More information about the talk mailing list