1. Graphic User Interfacex. PhPCryptor InterfacePhPCryptor – Main InterfaceUsing the Interface PhPCryptor includes menus ( A ), toolbar ( B ), project explorer ( C ),
processing output windows ( H ) and also includes four tabs in the right pane to handle the project parameters and process control,
Encoder Parameters ( D ), License Parameters ( E ), Project Output files header's & Decoder Errors Manager ( F ),
Run encodig process ( G ).
a. Menu OptionsPhPCryptor includes the following menu options:
b. PhPCryptor Toolbar
c. Project ExplorerUseful window to customize the properties of project elements.
d. Encoder Parameters
e. License Parameters
f. Decoder Parameters
F1 - Encoded files message header.
F2 - Decoder errors messages.
ENCODED HEADER MESSAGES LIST:
DECODER ERROR MESSAGES LIST:
g. Processing Controls
Compilation Process dialog -
PhPCryptor allow the user to take full control during the compilation; especialy the big projects,
at any time the user can suspend the compiling process, set the process priority and resume the compilation process.
Abort button allow to cancel the current job.
2. Create a New Projectx. PhPCryptor Project During this chapter, using a real project as an exercise you'll learn step by step, how to create a project,
add the items, setting the output directory, setting encoding parameters, setting licensing parameters,
customize the decoding error messages, compile the project and finally explore the results.
To setup and compile project with PhPCryptor, only two steps are required, (1) specify the input sources
and (2) setup the Project Key from License Parameters dialog. All the other parameters are optional;
The default parameters setting fulfill the need for the most projects.
Simulation project :
The project developed for PHP5; Files extension are *.php and *.inc for include files.
a. Creating a New ProjectTo create a new project file :
Starting PhPCryptor will automaticly start a new project and configure the parameters to default state. b. Add Items to the ProjectStep 1:
Click Add items topic from menu or toolbar or Encoder dialog box to display folder browser.
Step 2 - Define items path :
from folder browser select the target directory and then click OK to display the application folder scanner dialog box.
Step 3 - Scan the selected path
After closing the folder scanner, the application explorer and the input path are updated.
To avoid any name colision with differents input sources, each input source (SRC) is wrapped within unic (SRC ID).
c. Setting the Output Directory Optional setting. PhPcryptor set the default output path to 'user\documents\phpcryptor'.
To set a custom output path following steps below.
Step 1: Click Output Directory Topic to display Folder Browser from Application menu or from Encoder dialog box
Step 2 - Define items path : windows folder browser
d. Setting the Encoder Parameters
The default setting fits the project needs. Set PHP version to PHP5; Set PHP Tags to 'PHP long tag';
no need to add PHP file extension the default list fulfill the project needs.
Check the Filtering option, all the files with extension correspond to {filtering file extension list},
will be ignored (not compiled, not copied).
e. Setting the License Parameters
PhPCryptor main task is to compile the sources to byte code that don't allow any access to the source code.
This section allow the developer or any source code owner to push forward and take full control of his intelectual proprties, where and when his sources will work.
For the current project, just basic security is required, no time limit and no binding.
f. Setting the Decoder Parameters
This section allow the project owner when deployed, running smoothly and to keep informed the users, the professional and the server administrator.
For the project, we need to update the MSG_CONTACT and keep all the default message configuration unchanged.
Select MSG_CONTACT and click edit button > input the e-mail address for the project administrator > click OK to confirm the changes and close the dialog box. g. Save the ProjectBefore compiling save the project. Saving the project the first time is accomplished in two steps. Step 1: Set the file name.
Click Save topic from menu or toolbar to display save as dialog box.
Set the the file name and close the Save As dialog box. A second dialog box is displayed to supervise the saving process. Step 2: Set the password to protect the saved project file and close dialog box.
h. Compile the ProjectTo compile the current project, click Compile topic from menu or toolbar to launch the compiling process.
After starting compilation. The application bring Encode Project Tab to the front to allow supervising the compilation. For long project, the Tab allow to set the process priority, suspend, resume and abort the process. For each item processed, a message is displayed in both Tab window and Log window. 3. Explore the Compiled Projectx. Compiled Project During this chapter, using a real project as an exercise you'll learn step by step, how to create a project,
add the items, setting the output directory, setting encoding parameters, setting licensing parameters,
customize the decoding error messages, compile the project and finally explore the results.
To setup and compile project with PhPCryptor, only two steps are required, (1) specify the input sources
and (2) setup the Project Key from License Parameters dialog. All the other parameters are optional;
The default parameters setting fulfill the need for the most projects.
a. Explore the Output DirectoryTo explore the compiled project, click Display Output topic from menu or toolbar to launch the compiling process.
To prevent any name colision with output compiled project, the application wrap each compiled project within ID directory CRY_*. Exploring the output path : e:\Projects_web\output, selected as output compiled directory; The current compiled results are set inside a new directory CRY_20171025_155809, which we name it CRY_ID
b. Understanding the output itemsExploring the output path : e:\Projects_web\output, selected as output compiled directory;
b.1 - Compiled Items directory 'SRC_*'The directory contains the compiled project, the structure of the
output are identical to the input source.
b.2 - phpcryptor_bin directory itemsDecoder directory; move this directory 'AS IS' without altering
the contents to the root of http server for the default configuration or use phpcryptor.ini to
custumize the paths.
b.2.1 - PhPCryptor Universal DecoderPhPCryptor Universal Decoder Directory; Do Not Alter the Contents.
b.2.2 - PhPCryptor Project LicenseThe external license are generated anytime when you compile a project;
ignore the file if you select embeded license.
4. Deploy the Compiled Projectx. Deploy a Compiled Project - intro These sections describe how to deploy and configure the compiled project.
a. Deploy a Compiled Project
After compiling a project with PhPCryptor, the output results are composed of four parts:
The compiled project have the same repartition as the source project. To run the compiled project, move the compiled project and phpcryptor_bin to your http server. phpcryptor_bin directory must be in the path of the http root or his parent path. ex: if the http root directory is defined as : /dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/webroot
The valid paths are :
/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/webroot/phpcryptor_bin
/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/phpcryptor_bin /dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/phpcryptor_bin /dir1/dir2/dir3/dir4/dir5/dir6/dir7/phpcryptor_bin /dir1/dir2/dir3/dir4/dir5/dir6/phpcryptor_bin /dir1/dir2/dir3/dir4/dir5/phpcryptor_bin /dir1/dir2/dir3/dir4/phpcryptor_bin /dir1/dir2/dir3/phpcryptor_bin /dir1/dir2/phpcryptor_bin /dir1/phpcryptor_bin The file phpcryptor.ini is provided to customize the decoder directory path, licenses path and take a full control to decoding process. The next section describe how to use the configuration file. b. Setting a Configuration File
Configuration file allow to customize, phpcryptor_bin name and the path, the license path,
enable or disable decode message errors and the action to take in fatal error cases.
Under the section phpcryptor_01, four keys are used to configure the phpcryptor decoder.
Important Notices:
PhPCryptor, User Manual v1.20 |