Installing the Scriptol to PHP Compiler

and all required tools.

Mail: webmaster@scriptol.com
Home page: http://www.scriptol.com/


Node:Top, Next:, Previous:(dir), Up:(dir)

Table of Contents


Node:The Scriptol to PHP compiler under Windows, Next:, Previous:Top, Up:Top

The Scriptol to PHP compiler under Windows


Node:Installing the Scriptol to PHP compiler, Next:, Previous:The Scriptol to PHP compiler under Windows, Up:Top

Installing the Scriptol to PHP compiler

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

   c:\scriptol
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:\scriptol
Under Windows XP, you have to reach the path variable through the start menu:
- click on the start menu
- select the configuration panel
- switch to the classical display
- click on the "system" entry
- click on the "advanced" button
- click on the "Environment variable" button
- select the path variable
- click on the "modify" button
- add the new path to the line, separated by a semi-colon:
  ;c:\scriptol


Node:Installing the PHP interpreter under Windows, Next:, Previous:Installing the Scriptol to PHP compiler, Up:Top

Installing the PHP interpreter under Windows

If you have got the Scriptol CD, you have just to click on the "PHP" entry to install the interpreter.
You can also the the Universal Configurator program furnished on the CD to configure PHP.
Otherwise you have to download it from www.php.net, (the full archive, not the small executable) and process as following:

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

  c:\php

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

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

4) 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.)

5) 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.

6) Set the parameters:
If you use the PHP interpreter for application, and especially for applications with a Java GUI, 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.


Node:Installing the Java extension, Next:, Previous:Installing the PHP interpreter under Windows, Up:Top

How to install the Java extension for PHP or C++

1) Installing Java for PHP

Search for the java path, example:

  c:\jdk1.4
Search for the php extensions path, example:
  c:\php\extensions

The extension directory must hold these files:

  php_java.dll
  php_java.jar

Set these lines into php.ini (in the Windows directory)

  extension_dir = c:\php\extensions
  extension=php_java.dll

Search for the [java] section in php.ini - java.class.path
must be assigned the path of all jar or class files including php_java.jar, separated by a semi-colon. (You can use a dot to designate the current path for yours jar or class file) - java.home
must be assigned the path of Java. - java.library
must be assigned the path of jvm.dll. - java.library.path
must be assigned the path of php extensions, that hold php_java.dll and php_java.jar and the path of any Java class you want to use.

- If these classes are inside jar files, the jar filenames are a part of the path.
- If several paths are required, they are separated by semicolons and enclosed in double quotes.

Example:

  [Java]
  java.class.path = "c:\php\extensions\php_java.jar;c:\myclasses"
  java.home = "c:\jdk1.4"
  java.library = "c:\jdk1.4\jre\bin\client\jvm.dll"
  java.library.path = "c:\php\extensions;c:\jdk1.4\jre\lib"

2) Installing Java for Scriptol C++
- The jvm.dll must be in the path.
- The jvm.lib, jni.h, jni_md.h files must be in the directory of the source.
- The JAVA_HOME variable must be assigned the path of the JDK (ex: c:\jdl1.4).
- See the README file if you encounter problems...


Node:Running the Scriptol to PHP compiler, Next:, Previous:Installing the Java extension, Up:Top

Running the Scriptol to PHP 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

Read the manual for more details.


Node:The Scriptol to PHP compiler under Linux, Next:, Previous:Running the Scriptol to PHP compiler, Up:Top

The Scriptol to PHP compiler under Linux


Node:Installing under Linux, Next:, Previous:The Scriptol to PHP compiler under Linux, Up:Top

Installing 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.


Node:Running under Linux, Next:, Previous:Installing under Linux, Up:Top

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.


Node:Index, Previous:Running under Linux, Up:Top

Index