Overview
Artifact ID: | ea92447562a5442f14ef5692ce7b924bc44ff3b0 |
---|---|
Ticket: | c8c0b78c840e4df9aefd2687bf6cac5abfce08e5
Windows 7: "fossil ui" and "fossil server" fail |
User & Date: | wolfgang 2010-10-15 21:28:39 |
Changes
- comment changed to:
OS: Windows 7 Ultimate With fossil.exe installed in C:\Windows\system32, "fossil ui" and "fossil server" fail to start the web server. On each attempted access to http://localhost:8080 , the command prompt outputs: <pre>'"fossil"' is not recognized as an internal or external command, operable program or batch file.</pre> Windows Firewall is off and there are no other firewalls installed. <hr /><i>anonymous claiming to be Arnel added on 2010-10-08 18:03:34:</i><br /> Are you able to edit your PATH variable and add another folder (e.g., C:\Users\<username>\Documents) where you can transfer fossil.exe instead? Fossil probably does not understand %SystemRoot%\system32, which is what's on PATH for that folder. <hr /><i>wolfgang added on 2010-10-10 12:32:16:</i><br /> This is not a problem of fossil. The mentioned error message is a MS Windows message, documenting, that the requested command is not found in the path. So you should check: * is the path really correct * how do you call fossil, MS Windows doesn't use the path variables in all call variants <hr /><i>anonymous claiming to be arichardson (op) added on 2010-10-15 09:10:18:</i><br /> >Arnel added on 2010-10-08 18:03:34:<br> >Fossil probably does not understand %SystemRoot%\system32, which is what's on PATH for that folder. I think you've hit on the problem here. It works perfectly well on XP though, which is why I'm puzzled. I will try your suggestion but ultimately will end up with Fossil back in system32, where (IMO) it belongs. >wolfgang added on 2010-10-10 12:32:16:<br> >This is not a problem of fossil. I believe it is. Please see below for my reasons. >The mentioned error message is a MS Windows message, documenting, that the requested command is not found in the path.<br> ><br> >So you should check:<br> ><br> >is the path really correct<br> >how do you call fossil, MS Windows doesn't use the path variables in all call variants<br> Looks like you didn't read my ticket. I'll explain again: At the command prompt, I'm running "fossil ui". ("fossil server" does the exact same thing.) There is a known good, open fossil in the working directory. Fossil opens a web browser (Firefox in this case) and gives it the path "localhost:8080" as expected. The problem occurs when Firefox accesses localhost:8080. Fossil is definitely listening on 8080/tcp because it reacts to connections on localhost:8080. The way it reacts is to output this error on stdout: '"fossil"' is not recognized as an internal or external command, operable program or batch file. instead of returning a web page to the browser. You're right that this error is generated by the OS, but I believe the flaw is in Fossil. IMO Arnel's suggestion is correct, that Fossil is not interpreting %SystemRoot%\system32 properly. I will now attempt to prove it. <hr /><i>anonymous claiming to be arichardson added on 2010-10-15 09:13:21:</i><br /> I mean, I will attempt to prove it in 8 hours or so, when I get home from work and have access to my Windows 7 box. <hr /><i>anonymous claiming to be Arnel added on 2010-10-15 11:28:11:</i><br /> I can confirm "fossil server" works with fossil.exe inside the %SystemRoot%\system32 folder from a Windows 7 box I'm using. With "fossil ui" I'm getting the "'http:' is not recognized...batch file" message. Which is odd, considering I can run "start http://127.0.0.1:8080/" from within the C:\Windows\system32 folder. <hr /><i>anonymous claiming to be Arnel added on 2010-10-15 11:34:02:</i><br /> Sorry, I forgot to add: "fossil ui" does provide the error message I described earlier when I ran it from the command-line, *BUT* if I open a browser and go to http://localhost:8080/ it opens the web UI for Fossil. <hr /><i>drh added on 2010-10-15 13:58:28:</i><br /> I think the problem comes about because Fossil tries to run a copy of itself by calling system() with argv[0] being used as the command name. Apparently on windows, argv[0] is not a reliable name for the program that is being run. Does anybody have any suggestions for an alternative way to get a windows program to run a copy of itself? <hr /><i>rwilson added on 2010-10-15 15:30:22:</i><br /> is this recently introduced? i've been using fossil on windows 7 64 bit since it was released with no problems (not counting a few hiccups along the way in the win32 build). i haven't updated my build for about six weeks, so i'm not experiencing this issue (Fossil version [7aae4ef068] 2010-09-03 01:57:41). <hr /><i>drh added on 2010-10-15 16:13:52:</i><br /> Nothing has changed in this area recently. I think the people that are having problems simply have an unusual windows configuration. <hr /><i>wolfgang added on 2010-10-15 16:37:14:</i><br /> For my XP machine, argv[0] is correctly filled with the complete path. A windows 7 Home Premium machine shows only the filename(fossil.exe), not the complete path. Both tests used a standard cmd.exe console starting fossil with <kbd>fossil help ver</kbd> and fossils install directory in environemt variable PATH. => * on XP argv[0] seems to be filled with the complete path, so that the environment is not used * on Win 7 is only the filename stored in argv[0]. This way it depends on the environment/registry settings, whether fossil is found or not. The contents of argv[0] can be tested with fossil help ver The name of the binary, displayed in the output is replaced with argv[0]. Windows uses diffent ways to find a binary (calling via cmd.exe or calling by explorer,..). So if argv[0] doesn't contain a full path, the error may appear. I've found a link to some information, how to get the application location: [http://msdn.microsoft.com/en-us/library/ms683197]: <pre> DWORD WINAPI GetModuleFileName( __in_opt HMODULE hModule, __out LPTSTR lpFilename, __in DWORD nSize ); </pre>