Windows install problems with 0.8

Having trouble installing serendipity?
Post Reply
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Windows install problems with 0.8

Post 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...
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post 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()?
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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...
Post Reply