Skip to content

PHP Settings - Main Settings

PHP Version

Use the combo box to indicate which PHP version you would like to use.

Further explanation available about PHP versions available in ExeOutput for PHP and system requirements. Be sure to read this topic too!

Warning

Changing the PHP version will reset the PHP.INI and associated PHP extensions.

Use a custom path for the virtual "Data" subfolder

By default, the "Data" virtual subfolder is placed in the folder where the EXE is located. If the path to your EXE file is e:\my folder\myprogram.exe, the path to the "Data" subfolder will be e:\my folder\data

If you want to include the path of the directory where your application's executable file is located, you can use the %EXEDIR% placeholder, which will be replaced at runtime with this path. The replaced path does not include the final backslash (). For example, you can enter %EXEDIR%\MySubfolder or %EXEDIR%\wwwroot.

👉 For security reasons (such as placing virtual files in an inaccessible folder), you may want to choose a custom name for the "Data" virtual folder. ExeOutput for PHP's virtualization engine allows you to choose any virtual folder, even on a drive that does not exist! To choose a custom name for the "Data" subfolder, enable this option and enter an absolute path such as X:\My Application\123456\Data.

Warning

Be sure to choose a path unique to your application!

Application Startup URL

ExeOutput for PHP lets you define the full URL that should be loaded by the application at its startup. If you leave the field blank, the URL to the homepage as selected in the File Manager is used. This feature is useful if you use frameworks or want to display remote websites: for instance, some PHP frameworks use the PHP's PATHINFO server variable in order to display pages, like Kohana. A PHP application can be started with

index.php/Welcome

where /Welcome tells the framework to show the "Welcome" view.

Another example: if you enter

http://www.exeoutput.com

the application will start and display the ExeOutput's website. This is useful if you want to create your own website browser.

Home page arguments

If you want to customize the homepage at runtime depending on application command-line arguments for instance, you can use the following code (to be added to the UserMain HEScript script):

procedure OnStartMainWindow;
begin
 // When the main window is going to be displayed (just before the homepage is shown).
 if ParamStr(1) = "/mode=debug" then
 begin
 SetGlobalVar("HomePage", "index.php?debugmode=1", false)
 end;
end;

Additional file extensions that should be processed with PHP

Lets you define more file extensions that should be considered as PHP scripts and thus passed to the PHP interpreter. If you have different extensions, you can separate them with ;, e.g. .EX1;EX2. For instance, if you enter .PNG, all PNG files will be passed to the PHP interpreter.

Use secure HTTPS for internal protocol

(https://heserver/ instead of http://heserver/)

ExeOutput for PHP uses its own internal protocol for displaying web content in the web browser engine. This protocol begins with https://heserver/ (secure protocol) or http://heserver/ or ghe://heserver/ By default, the homepage at startup will be opened using the secure protocol, unless you deactivate this option.

Enable custom router handler in HEScript (OnRouterURL event)

Lets you enable the router handler script at runtime, so that you can configure custom redirections for all requests directly in HEScript.

Read more about the custom router handler in HEScript

Reroute all non-file requests such as directories to the homepage (useful for PHP frameworks which use an index.php router script)

Info

This option is an easier alternative to the custom router handler in HEScript.

Lets you add support for pretty URLs in your PHP applications, similar to Apache's mod_rewrite in specific cases. For instance, all URLs that do not point to a file with an extension will be rewritten as if the file that is considered as the homepage was requested. Of course, the homepage should be the index.php router script of your framework.

For instance, http://heserver/Welcome or http://heserver/myapp/myaccount/1234/ would be rerouted.

See also PHP Debugging Options and PHP.INI.