Page 1 of 1

Windows install problems with 0.8

Posted: Tue Dec 21, 2004 8:59 pm
by mgroeninger
Ok, so the new installer looks great, but it uses is_executable, which is not available on Windows when php < 5

By changeing:

Code: Select all

 foreach ($path as $dir) {
                if (@is_executable($dir . '/convert') || @is_file($dir . '/convert')) {
                    return $dir . '/convert';
                }
            }
To:

Code: Select all

 foreach ($path as $dir) {
                if (@is_file($dir . '/convert')) {
                    return $dir . '/convert';
                }
            }
You can get it working.... A version check wouldn't be too hard here, I think...
I just went for the quick fix...

Posted: Tue Dec 21, 2004 10:45 pm
by tomsommer
Hrrm,, Interesting indeed - but:

1) is_file doesn't check for permissions to execute

2) you can still install without the binary being executable, so it's not halting the install process per say.


Do you know how to solve (1) on Windows? stat()?

Posted: Wed Dec 22, 2004 9:21 am
by mgroeninger
I played with stat a little....

Honestly, it seems like (on windows) both stat and file_perms return executable if the file suffix is "exe", regardless of permissions. :roll:

What is the point of asking if its a file or if its an executable? Should those be ands? (&& rather then ||)

Could you nest the is_executable inside the file check? The file check will fail on windows boxes no matter what, since /convert will be /convert.exe... (I think)

I've never used imagemagick, so I'm not sure what the best thing to do is...