Installation stuck on installing application files

Hi, I am new in October CMS and I need ASAP help :slightly_smiling_face:
I am installing a clean installation of October CMS in the /autonom/ directory on the autonomtechnology.cz domain. But I still get the message “is_dir(): open_basedir restriction in effect. File(/home/nologin/.composer/cache) is not within the allowed path(s): (/usr/lib/php: /usr/local/hosting/home/autonomtechnology.cz)”. Can someone help me?
Install log:
[2024/11/18 03:21:02] Install step: composerInstall
[2024/11/18 02:21:03]
[2024/11/18 02:21:03] Handler error (onInstallStep): is_dir(): open_basedir restriction in effect. File(/home/nologin/.composer/cache) is not within the allowed path(s): (/usr/lib/php:/usr/local/hosting/home/autonomtechnology.cz)
[2024/11/18 02:21:03] Array
(
[0] => Trace log:
[1] => #0 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap{closure}()
#2 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/composer/composer/src/Composer/Factory.php(131): is_dir()
#3 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/composer/composer/src/Composer/Factory.php(176): Composer\Factory::getCacheDir()
#4 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/composer/composer/src/Composer/Factory.php(329): Composer\Factory::createConfig()
#5 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/composer/composer/src/Composer/Factory.php(629): Composer\Factory->createComposer()
#6 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/october/rain/src/Composer/Manager.php(284): Composer\Factory::create()
#7 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/vendor/october/rain/src/Composer/Manager.php(80): October\Rain\Composer\Manager->makeComposer()
#8 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/install_files/php/Installer.php(218): October\Rain\Composer\Manager->require()
#9 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/install_files/php/InstallerHandlers.php(187): Installer->runComposerInstall()
#10 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/install_files/php/Installer.php(47): Installer->onInstallStep()
#11 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/install_files/php/boot.php(87): Installer->__construct()
#12 /usr/local/hosting/home/autonomtechnology.cz/web/www/autonom/install.php(1): include(‘…’)
#13 {main}
)

Hi @petrfid

You may need to disable the open base directory restriction in PHP or change the composer cache directory to something inside the project (via environment variables).


Disabling the Open Base Directory Restriction: The open_basedir restriction in PHP is a security feature that limits the directories PHP can access. If your setup requires PHP to access paths outside of the permitted directories, you might encounter errors when running Composer.

To disable open_basedir:

  • Locate your PHP configuration file (php.ini).
  • Find the open_basedir directive.
  • Remove or comment out the line by adding a semicolon ; at the start or modify it to include the required paths.

Changing the Composer Cache Directory: Alternatively, you can instruct Composer to use a directory within the allowed paths by setting the COMPOSER_CACHE_DIR environment variable.

Here’s how to set it:

  • Open a terminal or shell in your project directory.
  • Run the following command before executing Composer commands:
export COMPOSER_CACHE_DIR=/path/to/your/project/composer_cache
  • For a permanent solution, add this environment variable to your server configuration or .env file in your project (if applicable).

Thnx for quick reply, but…
As far as I know, I can only use composer on local files on my computer. How do I then transfer the edit to the website?

I did it! :slight_smile: THNX!!!

1 Like