[nycphp-talk] is_executable() returns false? - Solution
Hans Kaspersetz
hans at cyberxdesigns.com
Sun Mar 30 15:32:11 EDT 2008
Hans Kaspersetz wrote:
> 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
>
>
>
The solution was that I needed to modify my open_basedir line in
http.conf for the virtual host and include /usr/bin. After I did this
for http, I struggled with why it wasn't working still reliably. Dur!
I also had to make this change in the SSL config for the site.
I think it is amazing that after being completely frustrated and after I
post to the list, minutes later I find the solution. Oh well......
Hans K
More information about the talk
mailing list