PHP WinBinder: Overlay

From The Uniform Server Wiki
Revision as of 07:29, 28 January 2010 by Ric (talk | contribs) (New page: {{Nav PHP WinBinder}} '''''WinBinder Overlayed on Uniform Server''''' A penalty of using this plugin is a significant increase in size. The plugin duplicates code that is already installe...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

 

UniServer 5-Nano
PHP WinBinder.

WinBinder Overlayed on Uniform Server

A penalty of using this plugin is a significant increase in size. The plugin duplicates code that is already installed.

If you check the size of folder UniServer\plugins\winbinder\php its around 9.8 MB a significant hit.

Solution is to copy files required for WinBinder to UniServer’s core and delete the above folder.

Copy files to core

Copy these folders and files to Uniform Server’s core:

  • Copy folder UniServer\plugins\winbinder\php\include to follder UniServer\usr\local\php
  • Copy folder UniServer\plugins\winbinder\php\resources to follder UniServer\usr\local\php
  • Copy file UniServer\plugins\winbinder\php\extensions\php_winbinder.dll to folder UniServer\usr\local\php\extensions
  • Copy file UniServer\plugins\winbinder\php\php-wb.ini to folder UniServer\usr\local\php
  • Delete folder UniServer\plugins\winbinder\php

Top

Adjust paths

Having moved folders and files our examples will fail, paths need to match the new configuration. Lets modify test9 to this new configuration.

Top

Batch file

Edit file UniServer\test_9_final.bat (If it does not exist copy it from folder UniServer\plugins\winbinder\alt_con_1)

Change this code

cd plugins\winbinder\alt_con_1
..\php\php.exe -c ..\php\php-wb.ini test_9.phpw

To:

cd plugins\winbinder\alt_con_1
..\..\..\usr\local\php\php.exe -c ..\..\..\usr\local\php\php-wb.ini test_9.phpw

Top

PHP Script

Edit file UniServer\plugins\winbinder\alt_con_1\test_9.phpw

Change this code

<?php
Include "../php/include/winbinder.php";       // Location Of Winbinder Library

To:

<?php
Include "../../../usr/local/php/include/winbinder.php";       // Location Of Winbinder Library

Top

Summary

Using WinBinder I have show how to create an alternative controller for running the servers in standard program mode.

Running the servers as a service you can add this functionality by adding a tab control. This will allow you to switch between standard and service.

The drop down menu allows you to quickly add additional functionality.

Top

Conclusion

This tutorial has shown how to use WinBinder for producing Windows application coded in PHP.

If you do not like Uniform Server’s control interface you now have the tools to create your own.

WinBinder remains an excellent PHP module for quickly programming windows applications.

Follow up tutorial.

Manually positioning controls is tedious WinBinder has an excellent tool “form editor” that removes this tedium. Scripts can become larges especially if you document code. The code packaging technique covered in this tutorial does not compile or reduce code size however there is an excellent tool PHC-Win that does.

Tutorial 2 covers both PHC-Win and “form editor”. PHC-Win has been packaged in Uniform Servers format and WinBinder repackaged for portability it includes “form editor” and original examples these are separate downloads.


Top