Installing and using the Scriptol to PHP Compiler

Home page: https://www.scriptol.com/



Installing the Scriptol compiler under Windows

1) Extract the zip archive inside a directory, for example:

   c:\scriptolp
This can be achieved by several free tools, 7-Zip or Advanced Explorer, for example.

2) Make the compiler accessible either by moving it into the php directory or by adding the Scriptol directory to the path.
For this purpose, change the path variable, into autoexec.bat on old systems:

   path=%path%;c:\scriptolp
Under Windows, you have to reach the path variable through the start menu:
  1. click on the start menu
  2. select the configuration panel
  3. switch to the classical display
  4. click on the "system" entry
  5. click on the "advanced" button
  6. click on the "Environment variable" button
  7. select the path variable
  8. click on the "modify" button
  9. add the new path to the line, separated by a semi-colon: ;c:\scriptolp

Installing the PHP interpreter under Windows

1) Download the PHP interpreter from www.php.net.

2) Unarchive the files into a directory, for example:

c:\php

3) Let this directory included in the path, add c:\php to the path variable.

4) Copy the file "php.ini-dist" into the Windows directory, under the name "php.ini".

5) Set the path of extensions:

For that, use the Universal Configurator or edit php.ini:
Search for the "extensions_dir" string in the section "Paths and directories". Put here the path of the extensions provided along with the php archive, or got from other sources:

 extensions_dir=c:\php\extensions
(No quotes.)

6) Select the extensions you will use:
Search then for the list of extensions in the section "Dynamic Extensions".
Each of them is prefixed with a semicolon.
For each extension you want to use, remove the semicolon.
For example, if you want to process images, you must search for this line:

extension=php_gd.dll
And remove the semicolon at start.

7) Set the parameters:
If you use the PHP interpreter for application, the default max execution time will be too short.
Change it for a longer time, 5 hours for example:

max_execution_time = 18000
memory_limit=128M
To allow php code use html variables, change this flag:
register_globals = On

Now, you are ready to work.

Running the compiler

Using the compiler:
The solp.exe compiler is executed from the command line under window, with a file name as parameter and an option. To get the list of options, type:

solp

If you want to compile and run a script, type:

solp filename

To compile only a source into php, type:

solp -c filename

If you want to compile a page with scriptol code embedded inside, type:

solp -w filename
php -q filename.php > test.htm

Under Windows, you can make a batch file with these commands and %1 as node of the filename.
Example:

solp %1
php -q %1.php

Installing the compiler under Linux

1) Copy the archive inside your personal directory.
2) Extract the archive with this command (or from the file manager):

tar -zpxvf scriptol.tar.gz
The scriptol directory is created.

Running under Linux

Using the Scriptol PHP compiler, type:

solp -c xxxx
to create a xxxx.php file from a xxxx.sol scriptol source, type:
solp xxxx
to create and run a php program.