Working with PHP frameworks

ExeOutput for PHP is being developped in order to work with PHP frameworks. Since they generally work with a lot of PHP includes, ExeOutput for PHP will intercept all files requested by the PHP runtime and makes them available (see accessing files in PHP).

However, this can slow down your application: that's why ExeOutput for PHP has a feature called External Files that allows you to keep the PHP files composing the framework outside the application (usually in a "vendor" subdirectory). Thus, your application remains reactive even if it requires several tens of thousands of files.

If your favorite PHP framework does not work fine, please see the Advice for getting started with PHP applications in ExeOutput for PHP topic. For instance, if PHP displays "missing file" errors and warnings like "php failed to open stream", you can try to mark files in the File Manager (select your files, click File Properties and turn this option on: Unpack the file(s) to virtual memory at startup) or better keep them external.

Redirect directory requests to the router script (homepage)

Some PHP frameworks support pretty URLs, similar to Apache's mod_rewrite in specific cases.

Note

Be sure to turn on the option to redirect all of these non-files requests to the router index.php script of your framework.

Custom redirection rules

If you would like to have your own redirection rules, you can use the "Redirection Rules" feature of ExeOutput for PHP.

Initial page / Base URL

If your homepage index.php shouldn't be the first URL to be displayed, you can provide your own URL for application bootstrap: see Application Startup URL.

Base URLs should begin with https://heserver (see Accessing Files in Compiled PHP Applications).

List of PHP frameworks tested and compatible with ExeOutput for PHP

The following PHP frameworks were successfully tested:

Laravel

In order to work with Laravel, you have to configure the "storage" and "bootstrap/cache" folders to be kept outside the EXE, so that files can be written to it. We also recommend you to keep the "laravel" (and "vendor" if any) subdirectory outside the EXE. In ExeOutput for PHP, go to the File Manager, select each folder above, click Properties and turn this option on: Keep the selected file(s) external and copy them to the "Data" subfolder.

Please refer to the dedicated External Files topic for further instructions.

CodeIgniter

In order to work with CodeIgniter, you have to configure the "application/cache" and "application/logs" folders to be kept outside the EXE, so that files can be written to it. In ExeOutput for PHP, go to the File Manager, select each folder above, click Properties and turn this option on: Keep the selected file(s) external and copy them to the "Data" subfolder.

CakePHP

In order to work with CakePHP, you have to configure the "logs" and "tmp" folders to be kept outside the EXE, so that files can be written to it. In ExeOutput for PHP, go to the File Manager, select each folder above, click Properties and turn this option on: Keep the selected file(s) external and copy them to the "Data" subfolder.

And finally, edit www/app/Config/core.php and add this line: Configure::write('App.baseUrl', env('SCRIPT_NAME'))

Fat-free framework (F3)

No specific instruction required.

Other Frameworks

This is an incomplete list: a missing framework doesn't mean that your PHP application based on it won't work once compiled with ExeOutput for PHP.

Accessing Files in Compiled PHP Applications

How compiled PHP applications work