Advice for Getting Started with PHP Applications

  Please note that applications created with ExeOutput for PHP are not intended to operate exactly as they would on a web server. You may need to adjust your application and PHP code accordingly. We recommend reviewing the General Demonstration included with ExeOutput for PHP by clicking the Application Menu button and selecting Start General Demo.

Note

As an exception, it is still possible to create an HTTP server application: your compiled application can simulate an HTTP server using the External HTTP Server option.

By default, PHP error and warning messages are displayed. Your PHP website may not function correctly in a compiled state initially, so these messages can help you debug issues. You can disable them in the PHP Settings => Debugging page by unchecking Display PHP error messages at runtime and Enable PHP error logging. Errors will be saved in the php_errors.log file located in the same folder as the EXE.

Fatal PHP errors cannot be suppressed: an error page will be shown (Fatal PHP Error). You can customize the error message using the SPHPFatalErrorMsg resource string.

If you encounter "file missing" errors or "php failed to open stream" warnings, refer to accessing files in compiled applications.

If your PHP website requires extensions, configure them first on the PHP Extensions page.

If your PHP website needs MySQL, ExeOutput for PHP can include a portable MySQL server (MariaDB) with your PHP application and manage it automatically when your application starts or stops.

If your application requires redirections to a script router, ensure they are configured using the redirection feature. Note that .htaccess files for Apache are not supported.

You can adjust PHP parameters using the built-in PHP.INI editor.

If your PHP code uses getcwd to retrieve the current directory, consider replacing it. The current working directory (when launching the EXE) is available in the global variable named HEStartCurrentDirectory.

For security reasons, the "View source code" option in the final browser is disabled by default. You can enable it for debugging HTML code generated by your PHP scripts on the Components => Context Menu page by selecting EnableShowSourceCode.

If you are using a PHP framework, refer to the dedicated page.

Finally, don't hesitate to post your questions or problems in our forum; solutions are generally available.

See also: How Compiled PHP Applications Work