Different shebang for server running as program and server running as a service?Perl Shebang Server runnig as program Server running as service
Posted 15 December 2014 - 10:31 PM
Posted 17 December 2014 - 01:44 PM
Your solution "I can solve the problem using absolute" is correct! It is a requirement for Window XP.
However I noticed you are using Windows 7 there is a more elegant solution that allows you to use the Unix shebang "#!/usr/bin/perl" when running the servers either as a standard program or service.
Create two new files (link_create.bat and link_delete.bat) in folder UniServerZ with the following content:
rem working directory current folder pushd %~dp0 rem save us path set us_path=%cd% rem change to top level cd \ rem create link mklink /D usr %us_path%\core\perl rem restore original popd pause
rem working directory current folder pushd %~dp0 rem save us path set us_path=%cd% rem change to top level cd \ rem delete link rd usr rem restore original popd
Run link_create.bat (right click on file link_create.bat and run as administrator) allow program to make changes. This creates a symbolic link to the Perl executable.
Start UniController. From the Perl tab run "Force Unix Shebang" you only need to perform this once.
From UniController start Apache and check your Perl scripts run.
Close Apache and UniController.
Start UniService install and run Apache. Again check your Perl scripts run.
Note: To remove the link double click on file link_delete.bat
All the best
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users