Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

enadabuzaid's avatar

Composer issue

I deploy my project on shared host using php 8

https://security-circles-group.uk/phpinfo

but when write "composer update" or "composer install" I get this

  Problem 1
    - Root composer.json requires php ^8.0.2 but your php version (7.3.33) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires laravel/sanctum ^3.0 -> satisfiable by laravel/sanctum[v3.0.0, v3.0.1, 3.x-dev].
    - laravel/sanctum[v3.0.0, ..., 3.x-dev] require php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 3
    - Root composer.json requires laravel/pint ^1.0 -> satisfiable by laravel/pint[v1.0.0, v1.1.0, v1.1.1, v1.1.2].
    - laravel/pint[v1.0.0, ..., v1.1.2] require php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 4
    - laravel/framework[v9.19.0, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
    - Root composer.json requires laravel/framework ^9.19 -> satisfiable by laravel/framework[v9.19.0, ..., 9.x-dev].
0 likes
45 replies
Sergiu17's avatar
composer.json requires php ^8.0.2 but your php version (7.3.33)

switch to php 8

Snapey's avatar

you have php 7 at the command line

enadabuzaid's avatar

@Snapey

php -v 

PHP 8.1.5 (cli) (built: Apr 20 2022 02:13:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies
[email protected] [~/public_html]# 

enadabuzaid's avatar

@Snapey in root when check php -v

give me this

php -v
PHP 7.3.33 (cli) (built: Apr 20 2022 00:03:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.3.33, Copyright (c) 1999-2018, by Zend Technologies

in public_html folder give me as above php 8.1

enadabuzaid's avatar

@Sinnbeck yes it is active on my domain folder I'm trying to make root is php 8 but blue host is default 7.3

enadabuzaid's avatar

@Sinnbeck when try it gives me the same issue and I can't update PHP version on the root server,

can I install composer and update the version just on the publc_html folder?

Sinnbeck's avatar

@enadabuzaid strange. This command should use the php version in the directory you are in. Are you sure you are in the directory that says 8.1?

php /opt/cpanel/composer/bin/composer install 
enadabuzaid's avatar

@Sinnbeck

~ :

@security-circles-group.uk [~]# php -v 
PHP 7.3.33 (cli) (built: Apr 20 2022 00:03:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.3.33, Copyright (c) 1999-2018, by Zend Technologies

/ :

@security-circles-group.uk [/]# php -v
PHP 7.3.33 (cli) (built: Apr 20 2022 00:03:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.3.33, Copyright (c) 1999-2018, by Zend Technologies
[email protected] [/]# 

public_html :

@security-circles-group.uk [~/public_html]# php -v
PHP 8.1.5 (cli) (built: Apr 20 2022 02:13:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies
``
Sinnbeck's avatar

@enadabuzaid exactly. So go into public_html and run that command

Or find a way to change php version for all of your folders

enadabuzaid's avatar

@Sinnbeck I will try to install the new version composer in public_html folder

composer self-update
Upgrading to version 2.4.1 (stable channel).
   

                                                                                           
  [Composer\Downloader\FilesystemException]                                                
  Filesystem exception:                                                                    
  Composer update failed: "/opt/cpanel/composer/bin/composer" could not be written.        
  rename(/opt/cpanel/composer/bin/composer): failed to open stream: Read-only file system  
                                                                                           
Sinnbeck's avatar

@enadabuzaid can you please run the command I gave you inside public_html and post the output like you did with php -v

enadabuzaid's avatar

@Sinnbeck I'm sorry if I bother you :) thank you for your time

@security-circles-group.uk [~/public_html]# php /opt/cpanel/composer/bin/composer install 
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php ^8.0.2 but your php version (7.3.33) does not satisfy that requirement.
  Problem 2
    - brick/math is locked to version 0.10.2 and an update of this package was not requested.
    - brick/math 0.10.2 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 3
    - fruitcake/php-cors is locked to version v1.2.0 and an update of this package was not requested.
    - fruitcake/php-cors v1.2.0 requires php ^7.4|^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 4
    - laravel/framework is locked to version v9.27.0 and an update of this package was not requested.
    - laravel/framework v9.27.0 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 5
    - laravel/sanctum is locked to version v3.0.1 and an update of this package was not requested.
    - laravel/sanctum v3.0.1 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 6
    - league/commonmark is locked to version 2.3.5 and an update of this package was not requested.
    - league/commonmark 2.3.5 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 7
    - league/config is locked to version v1.1.1 and an update of this package was not requested.
    - league/config v1.1.1 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 8
    - league/flysystem is locked to version 3.2.1 and an update of this package was not requested.
    - league/flysystem 3.2.1 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 9
    - nunomaduro/termwind is locked to version v1.14.0 and an update of this package was not requested.
    - nunomaduro/termwind v1.14.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 10
    - psr/container is locked to version 2.0.2 and an update of this package was not requested.
    - psr/container 2.0.2 requires php >=7.4.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 11
    - psr/log is locked to version 3.0.0 and an update of this package was not requested.
    - psr/log 3.0.0 requires php >=8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 12
    - psr/simple-cache is locked to version 3.0.0 and an update of this package was not requested.
    - psr/simple-cache 3.0.0 requires php >=8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 13
    - ramsey/uuid is locked to version 4.4.0 and an update of this package was not requested.
    - ramsey/uuid 4.4.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 14
    - symfony/console is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/console v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 15
    - symfony/css-selector is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/css-selector v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 16
    - symfony/deprecation-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/deprecation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 17
    - symfony/error-handler is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/error-handler v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 18
    - symfony/event-dispatcher is locked to version v6.1.0 and an update of this package was not requested.
    - symfony/event-dispatcher v6.1.0 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 19
    - symfony/event-dispatcher-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/event-dispatcher-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 20
    - symfony/finder is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/finder v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 21
    - symfony/http-foundation is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/http-foundation v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 22
    - symfony/http-kernel is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/http-kernel v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 23
    - symfony/mailer is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/mailer v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 24
    - symfony/mime is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/mime v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 25
    - symfony/process is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/process v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 26
    - symfony/routing is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/routing v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 27
    - symfony/service-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/service-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 28
    - symfony/string is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/string v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 29
    - symfony/translation is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/translation v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 30
    - symfony/translation-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/translation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 31
    - symfony/var-dumper is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/var-dumper v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 32
    - laravel/breeze is locked to version v1.12.0 and an update of this package was not requested.
    - laravel/breeze v1.12.0 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 33
    - laravel/pint is locked to version v1.1.2 and an update of this package was not requested.
    - laravel/pint v1.1.2 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 34
    - nunomaduro/collision is locked to version v6.3.0 and an update of this package was not requested.
    - nunomaduro/collision v6.3.0 requires php ^8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 35
    - spatie/flare-client-php is locked to version 1.3.0 and an update of this package was not requested.
    - spatie/flare-client-php 1.3.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 36
    - spatie/ignition is locked to version 1.4.1 and an update of this package was not requested.
    - spatie/ignition 1.4.1 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 37
    - spatie/laravel-ignition is locked to version 1.4.1 and an update of this package was not requested.
    - spatie/laravel-ignition 1.4.1 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 38
    - symfony/deprecation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
    - fakerphp/faker v1.20.0 requires symfony/deprecation-contracts ^2.2 || ^3.0 -> satisfiable by symfony/deprecation-contracts[v3.1.1].
    - fakerphp/faker is locked to version v1.20.0 and an update of this package was not requested.
enadabuzaid's avatar

@Sinnbeck

@security-circles-group.uk [~/public_html]#  /usr/local/bin/php -v
PHP 8.1.5 (cli) (built: Apr 20 2022 02:13:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.5, Copyright (c), by Zend Technologies
enadabuzaid's avatar

@Sinnbeck I am sorry but this is strange right

@security-circles-group.uk [~/public_html]# /usr/local/bin/php /opt/cpanel/composer/bin/composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php ^8.0.2 but your php version (7.3.33) does not satisfy that requirement.
  Problem 2
    - brick/math is locked to version 0.10.2 and an update of this package was not requested.
    - brick/math 0.10.2 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 3
    - fruitcake/php-cors is locked to version v1.2.0 and an update of this package was not requested.
    - fruitcake/php-cors v1.2.0 requires php ^7.4|^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 4
    - laravel/framework is locked to version v9.27.0 and an update of this package was not requested.
    - laravel/framework v9.27.0 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 5
    - laravel/sanctum is locked to version v3.0.1 and an update of this package was not requested.
    - laravel/sanctum v3.0.1 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 6
    - league/commonmark is locked to version 2.3.5 and an update of this package was not requested.
    - league/commonmark 2.3.5 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 7
    - league/config is locked to version v1.1.1 and an update of this package was not requested.
    - league/config v1.1.1 requires php ^7.4 || ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 8
    - league/flysystem is locked to version 3.2.1 and an update of this package was not requested.
    - league/flysystem 3.2.1 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 9
    - nunomaduro/termwind is locked to version v1.14.0 and an update of this package was not requested.
    - nunomaduro/termwind v1.14.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 10
    - psr/container is locked to version 2.0.2 and an update of this package was not requested.
    - psr/container 2.0.2 requires php >=7.4.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 11
    - psr/log is locked to version 3.0.0 and an update of this package was not requested.
    - psr/log 3.0.0 requires php >=8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 12
    - psr/simple-cache is locked to version 3.0.0 and an update of this package was not requested.
    - psr/simple-cache 3.0.0 requires php >=8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 13
    - ramsey/uuid is locked to version 4.4.0 and an update of this package was not requested.
    - ramsey/uuid 4.4.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 14
    - symfony/console is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/console v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 15
    - symfony/css-selector is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/css-selector v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 16
    - symfony/deprecation-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/deprecation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 17
    - symfony/error-handler is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/error-handler v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 18
    - symfony/event-dispatcher is locked to version v6.1.0 and an update of this package was not requested.
    - symfony/event-dispatcher v6.1.0 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 19
    - symfony/event-dispatcher-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/event-dispatcher-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 20
    - symfony/finder is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/finder v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 21
    - symfony/http-foundation is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/http-foundation v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 22
    - symfony/http-kernel is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/http-kernel v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 23
    - symfony/mailer is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/mailer v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 24
    - symfony/mime is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/mime v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 25
    - symfony/process is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/process v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 26
    - symfony/routing is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/routing v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 27
    - symfony/service-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/service-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 28
    - symfony/string is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/string v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 29
    - symfony/translation is locked to version v6.1.4 and an update of this package was not requested.
    - symfony/translation v6.1.4 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 30
    - symfony/translation-contracts is locked to version v3.1.1 and an update of this package was not requested.
    - symfony/translation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 31
    - symfony/var-dumper is locked to version v6.1.3 and an update of this package was not requested.
    - symfony/var-dumper v6.1.3 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 32
    - laravel/breeze is locked to version v1.12.0 and an update of this package was not requested.
    - laravel/breeze v1.12.0 requires php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 33
    - laravel/pint is locked to version v1.1.2 and an update of this package was not requested.
    - laravel/pint v1.1.2 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 34
    - nunomaduro/collision is locked to version v6.3.0 and an update of this package was not requested.
    - nunomaduro/collision v6.3.0 requires php ^8.0.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 35
    - spatie/flare-client-php is locked to version 1.3.0 and an update of this package was not requested.
    - spatie/flare-client-php 1.3.0 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 36
    - spatie/ignition is locked to version 1.4.1 and an update of this package was not requested.
    - spatie/ignition 1.4.1 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 37
    - spatie/laravel-ignition is locked to version 1.4.1 and an update of this package was not requested.
    - spatie/laravel-ignition 1.4.1 requires php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 38
    - symfony/deprecation-contracts v3.1.1 requires php >=8.1 -> your php version (7.3.33) does not satisfy that requirement.
    - fakerphp/faker v1.20.0 requires symfony/deprecation-contracts ^2.2 || ^3.0 -> satisfiable by symfony/deprecation-contracts[v3.1.1].
    - fakerphp/faker is locked to version v1.20.0 and an update of this package was not requested.

Sinnbeck's avatar

@enadabuzaid ok that I cannot explain. Ask support how you are supposed to run composer with your chosen php version. They must know

enadabuzaid's avatar

@Sinnbeck

I am tried to install new composer in public_html and mv to file

@security-circles-group.uk [~/public_html]# mv composer.phar /opt/cpanel/composer/bin/composer
mv: try to overwrite '/opt/cpanel/composer/bin/composer', overriding mode 0755 (rwxr-xr-x)? yes
mv: inter-device move failed: 'composer.phar' to '/opt/cpanel/composer/bin/composer'; unable to remove target: Read-only file system
[email protected] [~/public_html]# mv composer.phar /opt/cpanel/composer/bin/composer
enadabuzaid's avatar

@Sinnbeck

the support sent to me this :

The following is the set of PHP paths depending on their installed PHP version on the server:

  1. 7.2.34 - /opt/cpanel/ea-php72/root/usr/bin/php
  2. 7.3.33 - /opt/cpanel/ea-php73/root/usr/bin/php(Default)
  3. 7.4.29 - /opt/cpanel/ea-php74/root/usr/bin/php
  4. 8.0.18 - /opt/cpanel/ea-php80/root/usr/bin/php
  5. 8.1.5 - /opt/cpanel/ea-php81/root/usr/bin/php

Currently the PHP version 8.1 is set for the document root i.e. public_html. However, the full PHP path with PHP version 8.1 should be as: /opt/cpanel/ea-php81/root/usr/bin/php

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@enadabuzaid Ah ok

So this works?

/opt/cpanel/ea-php81/root/usr/bin/php /opt/cpanel/composer/bin/composer install
enadabuzaid's avatar

@Sinnbeck thank you it's work

/opt/cpanel/ea-php81/root/usr/bin/php /opt/cpanel/composer/bin/composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.  

  laravel/breeze .............................................................................................................................. DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  livewire/livewire ........................................................................................................................... DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE

80 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

composer update also

/opt/cpanel/ea-php81/root/usr/bin/php /opt/cpanel/composer/bin/composer update 
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.  

  laravel/breeze .............................................................................................................................. DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  livewire/livewire ........................................................................................................................... DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE

80 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
You made a reference to a non-existent script @/usr/local/bin/php artisan vendor:publish --tag=laravel-assets --ansi --force

but when use this composer update return same problem

 [~/public_html]# composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ^8.0.2 but your php version (7.3.33) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires laravel/sanctum ^3.0 -> satisfiable by laravel/sanctum[v3.0.0, v3.0.1, 3.x-dev].
    - laravel/sanctum[v3.0.0, ..., 3.x-dev] require php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 3
    - Root composer.json requires laravel/pint ^1.0 -> satisfiable by laravel/pint[v1.0.0, v1.1.0, v1.1.1, v1.1.2].
    - laravel/pint[v1.0.0, ..., v1.1.2] require php ^8.0 -> your php version (7.3.33) does not satisfy that requirement.
  Problem 4
    - laravel/framework[v9.19.0, ..., 9.x-dev] require php ^8.0.2 -> your php version (7.3.33) does not satisfy that requirement.
    - Root composer.json requires laravel/framework ^9.19 -> satisfiable by laravel/framework[v9.19.0, ..., 9.x-dev].

** I wnat update this for livewire, all the website work good but the part of livewire didn't work can you help me about that ... thank you so much

Sinnbeck's avatar

@enadabuzaid Awesome. Please make a fresh thread for the livewire issue and we will try and help you fix that as well :)

Sinnbeck's avatar

@enadabuzaid Oh and you should never run composer update on your production server. Instead you update locally, ensure it works, and then push an updated composer.lock file to production, and then run this command again

/opt/cpanel/ea-php81/root/usr/bin/php /opt/cpanel/composer/bin/composer install
1 like
enadabuzaid's avatar

@Snapey yes I create the .htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*) public/ [L]
</IfModule>
enadabuzaid's avatar

@Sinnbeck last question I promise

so every time I want to update the composer

I should use this Right?

/opt/cpanel/ea-php81/root/usr/bin/php /opt/cpanel/composer/bin/composer
Snapey's avatar

how can a directory have a different php version? This is not something I have ever come across?

Sinnbeck's avatar

@Snapey I think it's a cpanel feature. It makes sense on shared hosting if each user can pick their own php version

enadabuzaid's avatar

@Sinnbeck yes because that when talk to support for hosting told me can't update server settings to PHP 8

Snapey's avatar

@Sinnbeck Sure. Implemented by .htaccess not the file/permissions system

to run a different version at the command line you need a different path

Please or to participate in this conversation.