Jump to content
The Uniform Server Community

Brinman

Member
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About Brinman

  • Rank
    Newbie

Previous Fields

  • Main OS
    Windows Vista
  1. I've spent some more time looking into this and have discovered some more pieces to the puzzle. I'm not sure if this is only a problem on Windows 7 x64 or all Windows 7 installs or if other windows installations are affected. I'm running Windows 7 x64, so I know it's a problem for ME running under windows 7 x64. Anyway, I have fixed things a little bit. At least I can now stop the services from the unitray menu. I'm unable to restart the services, rather I have to stop and uninstall, and then reinstall and start. I did this by creating a bat file as follows: @echo off cls COLOR B0 mode con:cols=65 lines=20 TITLE UNIFORM SERVER - Stop and Uninstall Service rem ################################################### rem # Name: Really_Shut_Down.bat rem # Created By: Mike Brinson rem # Edited Last By: Mike Brinson (Brinman) rem # V 1.0 28-6-2009 rem ################################################## rem ### working directory current folder pushd %~dp0 net stop apaches1 net stop mysqls1 sc delete apaches1 sc delete mysqls1 rem ### restore original working directory popd I named this file "really_shutdown.bat" and placed it in C:\UniServer\unicon\tray_menu. Then I edited C:\UniServer\unicon\tray_menu\UniTray1.ini and on line 116 changed the existing code: Type: item; Caption: "Stop and Remove All Services"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php 7";ShowCmd: hidden; Glyph: 1 with this code: Type: item; Caption: "Stop and Remove All Services"; Action: shellexecute; FileName: "really_shutdown.bat"; ShowCmd: hidden; Glyph: 1 This worked for stopping both the apache and mysql services and removing them from the list of registered services. My problem now I'm working on is getting the "Restart Apache" and "Restart MySQL" functions to work from within Apanel (http://localhost/apanel) The problem appears to be with the service name that the apache service is registered with. Well, that, and also that the line of code for restarting the apache service appears to be incorrect. In the file c:\uniserver\home\admin\www\services_control.php on line 92 it reads: $cmd ="start ".US_APACHE_BIN."/".get_apache_exe()." -k graceful"; From what I could discover online there is no "graceful" parameter for the -k option of apache.exe Instead it should be $cmd ="start ".US_APACHE_BIN."/".get_apache_exe()." -k restart"; This is just based on the output from apache.exe /? which is (for me) c:\UniServer\usr\local\apache2\bin>apache /? Usage: apache [-D name] [-d directory] [-f file] [-C "directive"] [-c "directive"] [-w] [-k start|restart|stop|shutdown] [-k install|config|uninstall] [-n service_name] [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] Options: -D name : define a name for use in <IfDefine name> directives -d directory : specify an alternate initial ServerRoot -f file : specify an alternate ServerConfigFile -C "directive" : process directive before reading config files -c "directive" : process directive after reading config files -n name : set service name and use its ServerConfigFile -k start : tell Apache to start -k restart : tell running Apache to do a graceful restart -k stop|shutdown : tell running Apache to shutdown -k install : install an Apache service -k config : change startup Options of an Apache service -k uninstall : uninstall an Apache service -w : hold open the console window on error -e level : show startup errors of level (see LogLevel) -E file : log startup errors to file -v : show version number -V : show compile settings -h : list available command line options (this page) -l : list compiled in modules -L : list available configuration directives -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings) -S : a synonym for -t -D DUMP_VHOSTS -t -D DUMP_MODULES : show all loaded modules -M : a synonym for -t -D DUMP_MODULES -t : run syntax check for config files -T : start without DocumentRoot(s) check So, the correct option should be -k restart. Anyway, after changing this the issue now seems to be that the service name that the apache service is registered with does not match the name that is being referenced within uniserver's settings. When I attempt to run the apache -k restart command directly from the commandline in the c:\uniserver\usr\local\apache2\bin\ directory I get the following response: ....[error] (OS 2)The system cannot find the file specified. : No installed service named "Apache2.2". So I've been looking through the code to try to figure out where the name for the apache service gets set as ApacheS1 and I cannot find it. There is an option to name the service using -n "name" and maybe that's being used in the code somewhere and it's just not taking. I don't know. Any of the core developers care to weigh in on this and possibly offer a solution? Thanks!
  2. I've got the EXACT same issue. I've been messing around with it for an hour or so now. I also notice that when I right click on the Aestan tray menu and choose to "stop and remove all services" that it has no effect on the services. Well, I take that back. Looking at the services it does disable the "ApacheS1" service and makes it so that I can't manually remove the service from the commandline using "sc delete apacheS1". When I try that (after clicking on the "stop and remove all services" option) then I get the message "the specified service has been marked for deletion" For some reason the "mysqlS1" service is unaffected and I am able to remove it with the "sc delete mysqlS1" command. I do run the start.exe file as an administrator. Can't figure this one out. I guess I'll have to run it normal instead of as a service.
×
×
  • Create New...