Symfony, CodeIgniter, Yii on ISPmanager hosting

All modern PHP frameworks are installed the same way as Laravel: a site with a public folder, Composer in the Shell client with --no-scripts, then manual setup.

Running external programs from PHP is disabled on the hosting, so without --no-scripts Composer stops with a proc_open error. Run what the scripts did with the commands below.

Common steps

  1. Create a site with PHP 8.4, "Use PHP Composer" ticked and the website public directory from the table below.
  2. In the Shell client clear the panel placeholders from the site folder and install the project.
  3. Create a database and set it in the project settings.
Website public directory
Website public directory
cd ~/www/example.com
rm -rf public composer.json composer.phar .composer index.html

Symfony

Public directory: public.

composer create-project symfony/skeleton . --no-scripts

After installation: php bin/console cache:clear; database — DATABASE_URL in .env.local.

CodeIgniter 4

Public directory: public.

composer create-project codeigniter4/appstarter . --no-scripts

After installation: cp env .env, in .env — CI_ENVIRONMENT = production, app.baseURL, database.default.*.

Yii 2

Public directory: web.

composer create-project yiisoft/yii2-app-basic . --no-scripts

After installation: in config/web.php put a random string into cookieValidationKey; database — config/db.php.

Check Symfony: php bin/console --version, CodeIgniter: php spark --version.

Folder permissions

Cache and log folders must be writable: Symfony — var, CodeIgniter — writable, Yii — runtime and web/assets. Files are created by your user, usually nothing needs changing. If the site reports a write error, set the folders to 755.

Production mode

  • Symfony: APP_ENV=prod and APP_DEBUG=0 in .env.local.
  • CodeIgniter: CI_ENVIRONMENT = production.
  • Yii: in web/index.php remove or comment out the YII_DEBUG and YII_ENV lines.

Run framework scheduled tasks via Cron with the full command: /opt/alt/php84/usr/bin/php /var/www/LOGIN/data/www/example.com/bin/console ....