wex-alpha Posted April 26, 2006 Report Share Posted April 26, 2006 I posted previously about thid problem. I am trying to make a Joomla release on the stick, but I am always hitting the same problem Nice Admin told me to look for previous posts concerning this issues, and I did... but without success. This is what I have done:This is my modified bat file: Name: Start Server File: Created By: The Uniform Server Development Team: Edited Last By: Olajide Olaolorun (empirex): Comment: After start, go to apanel directly.: To Developers: Implemented %www%, and %apanel% @echo off rem use: start mysql console - to start mysql at server start and display consolerem use: start mysql - to start mysql at server startrem use: start nomysql console - to display console diskw\home\admin\program\pskill.exe Apache.exeIF NOT ERRORLEVEL 1 goto startedset Disk=%1IF "%Disk%"=="" set Disk=wrem create the disksubst %Disk%: "diskw"IF ERRORLEVEL 1 goto hintset apachepath=\usr\local\apache2\set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.set programit=%Disk%:\home\admin\program\set closeit=%programit%close.bat %Disk% %Disk%:cd \usr\local\php // [color=red]erased IF "%2"=="mysql"[/color]start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnfCLSecho The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/]set www=\www\set apanel=\home\admin\www\start %apanel%\redirect.htmlIF "%3"=="console" goto consolestart %programit%uniserv.exe "%apacheit%" "%closeit%"goto end:console%apacheit%%closeit%goto end:hintCLSecho The disk %Disk% is busy. Use 'Disk Start.vbs' [disk letter]goto pause:startedCLSecho ERROR!!! echo One of the instances of Apache server is started. Use Stop.bat:pauseecho .pause:end To mention I have changed redirect.html to go to http://localhost where resided Joomla. When I start that modified bat, localhost will not start... its just repeating to load, I think at that point mysql is not loaded at all. I went to http://localhost/apanel and manually clicked run mysql, after that localhost was able to start normally. Can anyone help me with this?This is irritating, I see the power of uniform server, and its right under my fingers, yet I cant useit damn mysql Thanks Quote Link to comment Share on other sites More sharing options...
wex-alpha Posted April 26, 2006 Author Report Share Posted April 26, 2006 I have worled hard on this problme, and I was able to find a workaround for it. I used autoit program for automating tasks in windows. Here is the code that makes it all work. Run("diskw\usr\local\mysql\bin\mysqld-opt.exe") Run("Server_Start.bat") But one other problem remains... its the fact that apache remains loaded, even when when we close browser (which is normal).That leads to another problem, if I startit again, I got error message to run stop. There should be a way to do if statement in start.bat to check if apache is already loaded. If yes, proceed, if no load it. Now I am lost, couse I am not skilled in batch thingies... if someone would help, it would be greatly appreciated. Thank you Quote Link to comment Share on other sites More sharing options...
wex-alpha Posted April 26, 2006 Author Report Share Posted April 26, 2006 I am sorry if this sounds like a monologue, but I am not used to sit and wait. I search for answers... Anyway, I have overlooked the following line from start.batt diskw\home\admin\program\pskill.exe Apache.exe Apparently it should terminate any existing apache process. I think that line is wrong, it should be: diskw\home\admin\program\pskill.exe Apache.exe c Maybe I mispelled it, couse I am home now, and my files are at work PC That works, but with small problem, that i need to get rid of. Assume I start my start.exe start program. It loads WAPM and runs my web page. Once I close it, apache proccess remains loaded. If I click again on start.exe program the diskw\home\admin\program\pskill.exe Apache.exe c kills the apache threads as it should, but also terminates itself with error.Next run is ok. Now, is there a way to terminate any existing apache process, and yet continue with batch execution? I hope i was not too complex. Thank you Quote Link to comment Share on other sites More sharing options...
megan Posted April 26, 2006 Report Share Posted April 26, 2006 Hello - I know nothing of Joomla, however to start mysql on server startup without having to go to the admin, open Server_Start.bat (original unchanged file) and about line 28 remove the IF statement from 'IF "%2"=="mysql" start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf' so that it reads:start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf as for the problem with the looping redirect you can fix that, just open diskw\home\admin\www\refresh.html in a text editor. get rid of the javascript redirect and add the following code to the document head: (you may have to play with the time delay interval ). You might also want to add a little "Starting Servers..., Please Wait..." message to the content area. hth ~megan Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted April 26, 2006 Report Share Posted April 26, 2006 Thanks megan All the troubles he had to put himself to get it working... Most of what you did seem to cause more problems than help you. Here is the post i was talking about: http://forum.uniformserver.com/index.php?showtopic=275 Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
wex-alpha Posted April 26, 2006 Author Report Share Posted April 26, 2006 Thanks for detailed response. I cant wait to try that tomorrow. I will let you know Quote Link to comment Share on other sites More sharing options...
wex-alpha Posted April 28, 2006 Author Report Share Posted April 28, 2006 This worked like a charm. Thanks again Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted April 30, 2006 Report Share Posted April 30, 2006 Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.