...
- Download "Laragon" from this LINK or our fixed archived HERE
- Execute the installer downloaded, first option ONLY chose "Run Laragon when Windows Starts", rest uncheck.
- Once installation is complete, it should start Larafon in your "Taskbar"
- Double click to open the interface, if the service started, chose "Stop", we'll need to do some quick configuration to Laragon
- One-Stop, select the gear icon on the top right of the windows to configure the Laragon
- In "General" you should have the setting as follow, except for the "Document Root" and "Data Directory", rest should follow as highlighted
- Under Service & Ports, make sure have following service also. Important is the Apache port with "8888"
- Mail Catcher and Mail Sender shall disable as we do not need such service as follow:
- Once configured, just save by closing this "Preferences" windows with "x" icon on top right.
Then you shall "Start All" - If all is correct, you should have this in the Laragon window.
- Now we'll put an "index.php" file into the "Root" Directory. Open the WWW root directory by clicking the "Root" Icons
- It will open your directory root folder windows and should only have 1 file called "index.php"
- Right-click open the index.php and "edit" with notepad.exe
Once you have the file open, remove all the contents in the file and replace them with the following codes:
Code Block language php linenumbers true <?php header('Access-Control-Allow-Origin: *'); $printer = "\\\\localhost\\RETAIL-LABEL-PRINTER"; $CMD = $_REQUEST['CMD']; if($CMD != "") { $tmpfname = tempnam(sys_get_temp_dir(), 'LBL'); file_put_contents($tmpfname, $CMD); $newname = str_replace(pathinfo($tmpfname, PATHINFO_EXTENSION), 'prn', $tmpfname); echo $newname; file_put_contents($newname, $CMD rename($tmpfname, $newname); copy($newname, $printer); rename($tmpfname, $newname); unlink($newname); }
- Now Laragon can "close" and it shall be hiding in the taskbar and automatically startup with Windows by default.
- Save it and that all, you can "test" it by calling from browser: http://localhost:8888/ and should have the following screen.
This is fine because we are waiting for the label print command from the Retail Label Printing program.
...