Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003979 [Quercus] major always 04-03-10 16:20 05-13-10 07:42
Reporter domdorn View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.6
Summary 0003979: is_executable is broken
Description is_executable delegates to com.caucho.vfs.Path.isExecutable().
However, this seems to be broken, which then breaks various PHP applications that require external binaries (e.g. ImageMagick) and check if they are executable before calling them (e.g. Typo3, PHPGallery).

<?
touch("someprogram.sh");
chmod("someprogram.sh", 0700);

if( file_exists("someprogram.sh"))
{
    echo "SUCCESS";
}
else
{
    echo "FAILED: someprogram.sh should have been created";
}
echo "
";

if( is_executable("someprogram.sh") === true){
    echo "SUCCESS";
}
else
{
    echo "FAILED: someprogram.sh should be executable";
}
echo "
";

if( is_executable("/bin/bash") === true){
    echo "SUCCESS";
}
else
{
    echo "FAILED: /bin/bash should be executable";
}
echo "
";

if( is_executable("/bin/sh") === true){
    echo "SUCCESS";
}
else
{
    echo "FAILED: /bin/sh should be executable";
}
echo "
";

?>
Additional Information SUCCESS
FAILED: someprogram.sh should be executable
FAILED: /bin/bash should be executable
FAILED: /bin/sh should be executable
Attached Files

- Relationships

- Notes
(0004568)
nam
05-11-10 17:19

It's not possible to determine if a file is executable in pure Java. But a possible workaround is to run a shell script that tests the file for executability.
 
(0004575)
nam
05-13-10 07:42

php/160y
 

- Issue History
Date Modified Username Field Change
04-03-10 16:20 domdorn New Issue
05-11-10 17:19 nam Note Added: 0004568
05-13-10 07:42 nam Status new => assigned
05-13-10 07:42 nam Assigned To  => nam
05-13-10 07:42 nam Status assigned => closed
05-13-10 07:42 nam Note Added: 0004575
05-13-10 07:42 nam Resolution open => fixed
05-13-10 07:42 nam Fixed in Version  => 4.0.7


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker