Debugging Tips: Difference between revisions

no edit summary
m (Protected "Debugging Tips" [edit=sysop:move=sysop])
No edit summary
Line 88: Line 88:
If Apache fails to start its more than likely the virtual drive will not be created. The following batch file will create a virtual drive and test the syntax. This batch file may be run with or without the servers running.   
If Apache fails to start its more than likely the virtual drive will not be created. The following batch file will create a virtual drive and test the syntax. This batch file may be run with or without the servers running.   


To save typing copy the following file [[Media:Uc apache syntax.txt | uc_apache_syntax.txt]] to folder “Uniform Server” rename the file to '''uc_apache_syntax.bat''' double click to run.
Save the following to a file named '''uc_apache_syntax.bat''' place the file in folder '''Uniform Server''' double click to run.
 
<pre>
:Batch file to check Apache configuration syntax
:Creates a virtual drive if it does not already exist
:Optionally removes the virtual drive created
:Place in folder ”Uniform Server” with other bat files
:File: uc_apache_syntax.bat
:Author: Mike Gleaves
:Version: 1.0
:Date: 25-1-2008
 
@echo off
 
:== Set drive to W change this as required
set Disk=W
 
:== create virtual disk and map folder udrive to it
subst %Disk%: "udrive"
 
:== Clear screen hides error if already created
cls
 
:== select drive, change to folder, run apache command,
 
%Disk%:
cd usr\local\apache2\bin
apache.exe -t
 
:== User option to remove virtual drive
echo.
echo.
SET remove_disk=N
SET /P remove_disk=Remove virtual drive %Disk% type Y or y press enter =
IF %remove_disk%==N goto :NOTREMOVED
IF %remove_disk%==Y goto :REMOVE
IF %remove_disk%==y goto :REMOVE
 
:NOTREMOVED
echo.
echo "Disk has not been removed"
goto :END
 
:REMOVE
echo.
echo "Disk removed"
subst %Disk%: /d
 
:END
echo.
pause
</pre>


File details and notes:
File details and notes:
Line 103: Line 154:
<tr>
<tr>
<td bgcolor="#f5f5f5">
<td bgcolor="#f5f5f5">
<nowiki>:</nowiki>Batch file to check Apache configuration syntax<br>
<nowiki>:</nowiki>Creates a virtual drive if it does not already exist<br>
<nowiki>:</nowiki>Optionally removes the virtual drive created<br>
<nowiki>:</nowiki>Place in folder ”Uniform Server” with other bat files<br>
<nowiki>:</nowiki>File: uc_apache_syntax.bat<br>
<nowiki>:</nowiki>Author: Mike Gleaves<br>
<nowiki>:</nowiki>Version: 1.0<br>
<nowiki>:</nowiki>Date: 25-1-2008<br>
@echo off
@echo off